Follow

Query across multiple layers in MapViewer

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.

MapViewer pin map of ficticious oil and gas wells in Wyoming
This pin map shows the location of various (fictitious) wells in Big Horn County, Wyoming.
  1. Download and unzip O&GMap.gsm.
  2. Open MapViewer 8, or the MapViewer 8 free demo.
  3. 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).
  1. 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 | Hyperlinkfrom 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.

 

  1. Click back to the O&GMap.gsm plot tab and click on the Well Locations 2013 (Pin Map) layer in the Object Manager.
  2. Click Analysis | Query | Query.
  3. 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:
    1. Under Query, use the first dropdown list to select Apply properties to.
    2. 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.
    3. To the right of the object type list, in the layer list, select both the Well Locations 2014 and Well Locations 2013layers.
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.
    1. 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.
    2. 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.
    3. 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.
    4. Double click the greater than (>) sign in the Operator list (gold below).
    5. Type 40000000 into the query string (where) box after the greater than sign.
    6. Scroll down and double click AND in the Operator list.
    7. In the list under the Object Data Column Lookup button, double click on Well Type.
    8. Double click the equal sign in the Operator list.
    9. Click the Object Data Column Lookup button (purple below).
    10. 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.
    1. 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.
    2. 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.
    1. Click in the bottom where query string box to the left of the layer selection (below the previous where string box; red below).
    2. 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.
    3. Double click on PID in the list (green below) under the Object Attribute Lookup button.
    4. Double click the equal sign in the Operator list (yellow below).
    5. Click the Object Attribute Lookup button (purple below).
    6. 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).
    1. Scroll down and double click OR in the Operator list.
    2. Double click on PID in the list under the Object Attribute Lookup button.
    3. Double click the equal sign in the Operator list.
    4. Click the Object Attribute Lookup button.
    5. 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 Lookupbutton rather than the Object Data Column Lookup button to get unique values, since the base map boundary objects have attributes and not linked data.
    1. 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.
    1. 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).
    1. 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.
  1. 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:
    1. Click Analysis | Query | Query.
    2. In the first query string, highlight “oil well” and press Backspace on your keyboard to remove it.
    3. Click (just once not double) on Well Type under the Object Data Column Lookup button.
    4. Click the Object Data Column Lookup button.
    5. Select gas well from the list. Click OK.
    6. Click the Symbol button.
    7. Use the dropdown lists to change the Symbol to Number 16, and the Fill color and Line color to Blue. Click OK.
    8. The rest of the query parameters have been remembered and are still valid, so click OK.
Final Well Map
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!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.