Today's Surfer 13 new feature series article discusses querying attributes of objects in base map layers. Below is a republishing of Sabrina Pearson's recent newsletter article (Issue 79, published July 2015) about querying attributes in Surfer 13.
In the previous article, we covered an important component of base maps, attributes, and how they can be easily accessed and edited. This article will dive into the details of querying map objects based on those attributes, object type, or object properties. This useful query tool allows you to quickly drill down into the details of your map and effortlessly access all of your map properties.
To demonstrate the querying abilities, Weld county Colorado drilling permit data has been downloaded from http://cogcc.state.co.us/COGIS/drillingpermits.asp. Although the well names are real, well locations have been moved. The well information, Weld county outline, and township-range areas have been combined into a single GSI file that's available for download should you wish to follow along in Surfer 13. Each object in the file includes attribute information. Since all of the data is in a single GSI file, a base map can be created by clicking the Map | New | Base Map command in Surfer 13, selecting the GSI file and clicking Open.
The initial map is created, displaying all of the information from the GSI file.
Now that we know what attributes are in the base map layer, we can use the Map | Query Objects command to select objects by object type, by attributes, or by object properties. If you've previously opened it with the Map | Open Attribute Table command, the Attribute Table can remain open during the query process. This makes it easier to get the values of attributes to enter into the Query dialog.
The query command works on individual objects within a single base layer, similar to the geoprocessing commands. To activate the Query Objects command,
The Editing group text will appear in the top left corner of the
plot window until Arrange | Stop Editing Group is clicked.
Selecting objects by type
One common use-case for querying objects is to select all of the objects of a certain type. For instance, we might want to select all of the symbols in the base map layer. To do this,
Set the Select objects of type to a single type and leave the conditions
empty to select all of the objects in the base layer of this type.
Once you click OK, all of the points in the base layer are selected. You can then change the symbol properties in the Property Manager. You can also click the Arrange | Order Objects | Move to Front command to move all of the selected objects to the top of the base map layer. This would ensure that no polygon fill will cover the points.
After selecting all of the symbols, the symbol properties were changed
to show smaller filled circles instead of the larger crosses.
Selecting objects by attribute
Another common use-case for using a query is to select all of the objects that meet a certain criteria, as set by an attribute. The wells file that was downloaded from the Colorado website contains multiple target objectives. If we want to have the points be different colors based on the objective, we can use the query again.
The Query dialog allows objects to be selected by a single condition or by meeting multiple conditions.
Once you click OK, all of the proposed wells in the Niobrara objective are selected. You can then change the properties of all of these objects at once in the Property Manager. For instance, you can change the symbol shape and color.
After selecting the Niobrara wells, the symbol shape and color were changed.
Selecting with wildcards
We could further select only the wells in the Niobrara target that were permitted by the Barrett corporation. To do this, the condition option would be changed to [Operator_N]. Because Barrett could be in the base map file in multiple ways, we can use a wildcard to select them all.
The wildcard * or ? can be used as a replacement for characters in the conditions field.
The query result includes wells that have the company name Barrett, Barrett Oil, Barrett Corporation, Barrett Corporation* Bill, and any other options. The object properties can be edited in the Property Manager or the objects can be deleted from the map, if desired. In the image below, the Barrett* points have been changed to a different symbol shape and color.
The wildcard options in the Query dialog can be used to select a subset
of objects that contain a partial match for an attribute.
Selecting objects by object properties
Similar to selecting objects based on attribute values, objects can also be selected based on specific object properties. For instance, objects can be selected based on object ID, perimeter length, area, number of vertices, or even the number of sub-polygons (islands/lakes) inside the polygon. This would be very useful to identify large land owners. In this map, a query can be made to find "small" township/range blocks. A normal township/range block is 6 miles on each side, resulting in a 36 square mile area (93,239,494.7236 square meters). If we wanted to identify any blocks that were smaller than this, we could use the query option again. The units on the property should be checked before creating the query. If the values are input in the query incorrectly or in wrong units, objects may be selected that are not desired.
Select objects based on properties about the object, such as Area.
It is easier than ever to create informative and professional maps with the
new query command and enhanced attribute tools.
Surfer 13's improved attribute management and new querying abilities allow you to drill down into your map and easily explore map properties. To be able to pinpoint the exact object of interest is a powerful new feature in Surfer's 3D visualization software that will quickly take your maps to the next level.
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 firstname.lastname@example.org.