Today's Surfer 13 new feature series article highlights new options for managing attributes of base map layers. Below is a republishing of Sabrina Pearson's recent newsletter article (Issue 79, published July 2015) about viewing and changing attributes in Surfer 13. Stay tuned for part two next week: querying attributes!
Your base maps contain important information, information that clarifies content, assists decision making, and supports the preservation of your data. This information is typically stored as attributes, or text information, associated with each object in a base map. For example, the attributes of a polyline representing a river might include the name of the river, its length, and the sediment load at a gauging station. Your maps are only as good as the underlying data; therefore, it is crucial to properly detail this information.
There are a few different ways to retrieve attribute information from objects in a Surfer base layer. You can:
- Click on objects and view their attributes individually.
- View all of the attributes for all objects in a single base layer at once using the attribute table.
- Query the attribute information and Surfer will automatically locate the objects matching your criteria.
This newsletter article will show you how to view and change the attributes via the individual object and the attribute table. Querying based on attribute information is covered in the newsletter article, Data Drill Down - Surfer 13 Querying Objects.
To demonstrate the attribute 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.
Individual Object Attributes
To start, let's look at a single object in the GSI file. Click near the middle of the base map, inside the township and range grid, but not directly on any wells. The top Polygon object in the base layer is selected. In the Property Manager, click on the Info tab. All of the attributes are listed and can be edited directly in the Property Manager.
The attributes for the selected object are listed in the Property Manager.
The image above shows only a portion of the attributes. Scroll down to view more attributes.
For this object, the Secondary attribute value is Weld. Let's edit this to say Weld County. Click to the right of Weld and add County. Press ENTER on the keyboard to make the change.
The attribute name (Secondary) can be changed, as well. This is most useful if you want to label the base map or perform a query on an attribute. The Secondary ID is used for all of the polygons. If we want to add the county name as a label to this object, but not for the other objects, we can rename the attribute for this object and use it to label this polygon. Click the pencil icon next to Weld County. In the dialog, type County and click OK. The attribute name updates to County.
The attribute name and value have been changed.
Attributes can be deleted, as well. All of the polygons and symbols on this map currently have every attribute. Many of these are blank. Click the red X button to the right of an attribute name to delete that attribute. Don't worry. If you make a mistake, you can easily undo the change with the Edit | Undo command.
The attributes are shown for the county outline
after removing the unused attribute fields.
After the attributes are changed, other properties for the area can also be changed. For instance, you can add a fill to the county polygon.
Editing attributes object-by-object in the Property Manager is fine when you only have a few objects, like the single county boundary. But, when you have multiple objects, this can grow tedious. Surfer 13 has added a new way to view and edit attributes for multiple objects.
To open the Attribute Table,
- Click on the base layer in the Object Manager to select it.
- Click the Map | Open Attribute Table command. The full list of attributes for the base layer is displayed.
The Attribute Table shows all of the objects and attributes in the base layer.
Similar to the Info page in the Property Manager for individual object attributes, the Attribute Table allows editing of attribute values, renaming of attributes, and deleting of attributes.
For example, the first object in the Attribute Table is the polygon for Weld county. But, this object and many additional objects are simply listed as Polygon. If you scroll to the right, you can eventually see a Primary field. This field contains the name of the township-range location, and the FIPS number for the county. If we want to use the township-range location later for labelling, we can remove the county number. Click in the cell, highlight the number, and use the BACKSPACE key to delete it. Click off this cell and you can see that the Primary attribute has been updated for this polygon.
Attribute fields can be renamed in the Attribute Table, as well. Let's change the Primary attribute field name to T-R. Click anywhere in the Primary column. Click the pencil icon at the top of the dialog. Type T-R as the new name and click OK. The attribute name updates.
Attribute fields can be added by clicking the button at the top of the dialog. This is an easy way to add a new attribute field to all objects in the base layer.
Attribute fields can be deleted in the Attribute Table, as well. All of the objects will lose the attribute. Let's click anywhere in the Hyperlink column. Click the button at the top of the dialog. The Hyperlink field is completely removed. But, again, don't worry. If you make a mistake, clicking the Edit | Undo command will add the attribute field back with all of the attributes for the various objects.
One additional nice property of the Attribute Table is that it stays open so that menu commands, the Property Manager, and the selection in the Object Manager or plot window are available. To see this, move the Attribute Table to the side of your Surfer window. Click on any object in the plot window. Back in the Attribute Table, note that the selected object is highlighted. This makes editing an attribute for selected objects very easy.
Click on an object in the plot window or Object Manager and the object's
row is automatically selected in the Attribute Table.
As you can see, Surfer 13's improved attribute handling provides quick access to the details of your map. This is another great example of Surfer simplifying workflows, so you can get your job done quickly and efficiently.
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.