Tour of the Planetary Geologic Mapping Python Toolbox

Video Transcript
Download Video
Right-click and save to download

Detailed Description

A tour of the Planetary Geologic Mapping Python toolbox, a suite of GIS tools from the Astrogeology Science Center.


Date Taken:

Length: 00:07:34

Location Taken: Flagstaff, AZ, US


Welcome to the MRCTR GIS Lab video tutorial, "A Tour of the Planetary Geologic Mapping Python Toolbox". The PGM toolbox is simply a collection 

of python tools that support common GIS workflows and best practices,

and is publicly available at the MRCTR GIS Tools website.

Python tools operate like any other geoprocessing tool and can be executed wherever the toolbox is saved.

Today we will demonstrate how each tool may be used as well as some of their limitations.

The first tool we'll demonstrate is the Merge Files tool. This may be used when data saved as separate files needed the merged into one.

In this example the geologic units of the map were saved out as separate shapefiles and we need them together in one feature class.

The first thing you want to do is open the Show Help window, which provides useful information 

about each parameter. I'll set the workspace where the files are located;

if I want to merge certain files in the workspace then I can add it to the optional filter. For example, *.shp for just shapefiles.

Then set the geometry type.

If files are stored in subfolders within the work space, check the box to enable the recursive search option.

Lastly, set the output feature class, and run.

You'll see in the output feature class that all common fields have been retained,

and a new field named "Filename" has been populated with the name of the import files.

Next, we'll use the Topology Check tool to test our contact linework before building geologic units.

Topology is simply using rules to define the spatial relationships features may have based on the 

logic associate with that type of data and the geometry.

It is a powerful, but largely unknown, concept to most GIS users

because of how confusing it can be the setup.

To help with this the Topology Check tool creates a new topology class, adds the feature class, 

and appropriate rules for the geometry type of that feature, and validates it.

For polygons the rules are "Must not overlap" and "Must not have gaps";

and for lines they are "Must not have dangles", "Must not have pseudo-nodes", "Must not intersect", and "Must not sell overlap".

What users still need understand, though, are some requirements and limitations to working with a topology class namely that a topology can 

only be created in a geodatabase (i.e., no shapefiles) and that a feature class can only participate one topology at a time.

This means that once the tool is run and a topology class is created you must re-validate it through the Catalog window. If it's run again

without deleting the topology class and the ancillary output feature classes the tool will fail.

The parameters for this tool are simple; the input dataset and the cluster tolerance, which is the distance at which points are considered

coincidental (this may be increased as scale decreases, but we typically recommend leaving it empty.

Once the tools executing "dirty areas"are identified by red points, lines, and areas, but the actual 'error 

features' are written to the associated output feature classes,

which end in _line, _point or _point. Here we can see that a number of pseudo-nodes have been identified,but we have already verified that they

are points where different contact types come together and not actual errors.

There is one error, though, and we'll correct it now.

To do so we'll zoom in to the feature,

begin editing the Contacts feature class,

adjust the vertices, and snap it to the adjacent vertex,

then save our edits and close.

Again, if we wanted to verify that all errors were corrected we would right-click the topology class and select Validate.

With good contacts were ready to build geologic units.

The first time contacts are converted to units they must be attributed by hand, but once the iterative

editing process begins it is much easier to edit the contacts and carry forward existing units

so that only the changes have to be addressed.

This tool automates the process of converting polygons to points, and then converting lines 

to polygons while carrying forward the attributes from the points.

The parameters this tool are also very simple - 

the input line feature class,

the optional polygon feature class

(in this case the geologic units created from the Merge Files tool, but in practice the last version of your geologic units),

and output feature class.

We recommend you follow versioning convention that makes it easy to determine the most current units.

If this were the first iteration and there were no units to carry forward and we would omit the input polygons and the resulting polygon feature 

class would have a new text field name "TYPE", ready for attribution.

The last tool we'll demonstrate is a Slope & Aspect tool; a more specialized tool that can quickly 

determined slope or aspect of points typically the result strike and dip analyses.

Opening the tool we see the parameters include input point feature class,

field containing the original values,

DEM to be used for the analysis,

the test type,

and output feature class.

The output of the tool is a duplicate of the input points along with the original values and calculated 

slope or aspect values, which allow for number of comparative analyses.

The Planetary Geologic Mapping Python Toolbox was created as a living product which will be  maintained as bugs are identified and expanded

for additional use cases, but we hope that users will continue to suggest ideas that may be useful for the planetary geologic mapping community.

More advanced users may want to modify these tools for their own uses, and as part of public domain this toolbox is freely available for

modification; we just ask that the original authors are cited.

As always, we hope this has been helpful in your mapping endeavors. Please feel free to contact either Trent or Marc directly with

feedback, questions or recommendations for new tools. Thank you!