This week's new feature series focuses on MapViewer 8's enhanced query function that can now query across multiple layers! To discuss this advantageous new feature, I have included a recent newsletter article written by our resident MapViewer expert, MapViewer Product Manager Leslie McWhirter.
Learn More About Your Data With MapViewer 8’s New Query Across Layers!
Since version 4, MapViewer has had the ability to query maps so you can get more information about your data more easily than you would by digging into your worksheet. MapViewer 8 improves upon this by adding the ability to query across multiple layers, which previous versions could only dream about. If you’ve used the query before in MapViewer or other GIS software, you understand how powerful this addition is; but if not, you may be wondering “How is this useful?” It is for those of you in the latter group that the following example is presented.
Let’s take the example (below) of an oil and gas map. Say you have two years’ worth of well data, and you have a specific area of interest. You may want to call attention to the oil wells and the gas wells where the production value is $40,000,000 or more for either year. To do this, you would follow the steps below to query your map.
 |
This pin map shows the location of various (fictitious) wells in Big Horn County, Wyoming. |
- Download and unzip O&GMap.gsm.
- Open MapViewer 8, or the MapViewer 8 free demo.
- Click File | Open. Choose attached O&GMap.gsm and click Open. Notice there is one base map (containing township/range) and two pin maps (well locations for 2013 and 2014).
 |
The Object Manager shows two pin map layers (top and middle) and one base map layer (bottom). |
- If you want to view the raw data used to create the map, click on the Well Locations 2013 (Pin Map) layer in the Object Manager and then click Home | Data | View. This opens the linked data in the worksheet. Notice there are 5 columns (this is the same setup as the 2014 pin map data):
 |
The worksheet contains a number of columns containing data about the wells on the maps. |
Well ID – Unique well identifier that is used for the PID and Hyperlink of the pin map pins. Click View | Display | Hyperlink from the plot tab and move your mouse over the wells to see this Well ID.
Long – The X (Longitude) value of each well location.
Lat – The Y (Latitude) value of each well location.
Well Type – Each well is categorized based on whether it is a gas well, an oil well, an injection well, an abandoned well, or a dry hole. This column is used as the text data column that determines what symbol plots at each location for the pin map.
Production Value (USD) – How much money (positive values only) this fictitious oil and gas company made from each well. Injection wells and dry holes have a production value of 0. This is the value we will query.
- Click back to the O&GMap.gsm plot tab and click on the Well Locations 2013 (Pin Map) layer in the Object Manager.
- Click Analysis | Query | Query.
- To change the symbol color to red for the oil wells within Township/Ranges T 56N R 95W and T 56N R 94W (the two sections with the highest density of wells) with >$40,000,000 production value:
- Under Query, use the first dropdown list to select Apply properties to.
- In the object type list to the right of that dropdown, select Points and make sure all other object are deselected. You can deselect a selected object type by clicking on it in the list.
- To the right of the object type list, in the layer list, select both the Well Locations 2014 and Well Locations 2013 layers.
 |
The Query section defines what objects you’re querying on what layers, and what you want to do with the objects that meet the query conditions. |
- Click in the where query string box (red below). This is where you enter the actual query criteria. You can enter the query manually by typing it in, or you can enter it automatically by using the options in the Add to query string section above. This example will go through how to use the options under Add to query string.
- In the Add to query string section, set the Show data and attributes dropdown list (blue below) to either Well Locations 2013 or Well Locations 2014.
- In the list under the Object Data Column Lookup button (green below), double click on Production Value (USD). This adds “[Production Value (USD)]” to our query string.
- Double click the greater than (>) sign in the Operator list (gold below).
- Type 40000000 into the query string (where) box after the greater than sign.
- Scroll down and double click AND in the Operator list.
- In the list under the Object Data Column Lookup button, double click on Well Type.
- Double click the equal sign in the Operator list.
- Click the Object Data Column Lookup button (purple below).
- Select oil well from the list. Click OK.
 |
Use the various options in the Add to query string section to enter your query criteria into the “where” query string box. |
- At this point we are applying properties to all oil wells with a production value over 40000000. Now let's limit them to only apply the properties to those wells of that production value in the two specific township/range sections. Use the bottom left dropdown list under Query to select in polygons.
- In the layer list to the right of this dropdown, select the Township/Range layer (deselect all other layers).
 |
The second row in the Query dialog defines where the objects you're querying reside. In this instance, we only want to query the objects that are within specific polygons on the Township/Range layer. |
- Click in the bottom where query string box to the left of the layer selection (below the previous where string box; red below).
- In the Add to query string section, set the Show data and attributes dropdown list (blue below) to Township/Range. This updates the attribute list in the dialog for the attributes on the Township/Range layer.
- Double click on PID in the list (green below) under the Object Attribute Lookup button.
- Double click the equal sign in the Operator list (yellow below).
- Click the Object Attribute Lookup button (purple below).
- Scroll down and select T 56N R 95W from the list. Click OK.
 |
When you click the Object Attribute Lookup button, this Value Lookup dialog appears and lists all of the unique values for the attribute you selected (PID in this case). |
- Scroll down and double click OR in the Operator list.
- Double click on PID in the list under the Object Attribute Lookup button.
- Double click the equal sign in the Operator list.
- Click the Object Attribute Lookup button.
- Scroll down and select T 56N R 94W from the list. Click OK. Now our query is set up. Since we want to apply specific properties to the points, the next step is to choose the properties.
 |
Since we’re performing our query for objects within certain polygons on a base map layer, we use the Object Attribute Lookup button rather than the Object Data Column Lookup button to get unique values, since the base map boundary objects have attributes and not linked data. |
- Click the Symbol button.
 |
After the Symbol button has been clicked, the Symbol dialog appears. Here you can edit the symbol properties to be applied to points that meet your query criteria. |
- Use the dropdown lists to change the Symbol Set to GSI Oil and Gas, the Symbol to Number 74, and the Fill color and Line color to Red. Use the up/down arrows or type in the box to change the Size to 0.120. Click OK.
 |
This graphic shows what the Query dialog should look like when you’ve finalized your query (through step ab). |
- Now the query is complete. Click OK.
 |
After performing the query, you can see that six oil wells in the two township/ranges have been colored red, indicating they have a production value of $40,000,000 or more. |
- To change the symbol color to blue for the gas wells within Township/Ranges T 56N R 95W and T 56N R 94W (the two with the densest wells) with >$40,000,000 production value:
- Click Analysis | Query | Query.
- In the first query string, highlight “oil well” and press Backspace on your keyboard to remove it.
- Click (just once not double) on Well Type under the Object Data Column Lookup button.
- Click the Object Data Column Lookup button.
- Select gas well from the list. Click OK.
- Click the Symbol button.
- Use the dropdown lists to change the Symbol to Number 16, and the Fill color and Line color to Blue. Click OK.
- The rest of the query parameters have been remembered and are still valid, so click OK.
 |
After performing the second query, you can see that four gas wells in the two township/ranges have been colored blue, indicating they also have a production value of $40,000,000 or more. |
With the addition of the ability to query across multiple layers, MapViewer thematic mapping software has gained even more GIS capabilities and pulled farther ahead of its competition. Use this feature to draw connections and display patterns in your data you didn’t know existed, and look on with pride as your audience is wowed by your professional-looking map!
“Query Across Multiple Layers is REALLY powerful. You guys did a great job!” – Jim Lance, Independent Geophysicist
Download the PDF version of this article.
Stay tuned next week for a look at updates in customizing data labels!
Do you have any questions about this post? Do you have an idea for a blog post or have a topic you'd like to see featured? Let me know! Leave a comment, or send an email to jennifer@goldensoftware.com.
Comments