Tuesday, August 5, 2014

Module 11: Sharing Tools

This week's assignment involved properly packaging and sharing a tool.  This required setting correct parameters, relative file extensions, and providing metadata.  The tool generated an array of random points placed within a specified area, then created a buffer around each point (screenshot at right).  The Description for the tool was edited in ArcCatalog so that it was more user friendly, providing easy-to-follow parameter requirements.  The script from which the tool was based was then directly embedded into the tool and password protected.  Embedding the script in this way reduces the number of individual files that must be sent to another user for the tool to run properly, and it provides security (using password protection) against unwanted interceptors of the tool's script.

As this is our last module, below is a recap of the GIS Programming Course...
Employing the existing capabilities of a GIS, Python scripting can be used to complete otherwise time-intensive geoprocessing tasks.  This GIS Programming course provided a solid foundation for future work within the field.  We started with an introduction to pseudocode, a near-English version of a script that provides a workable rough draft for the author and a potential reference to another user.  We then explored similarities and differences between Python scripting and ModelBuilder in ArcMap.  Next, were several modules that involved writing and editing Python scripts to perform various tasks and produce desired outputs.   During these weeks, a level of comfort in working with Python was achieved.  Both raster and vector datasets were manipulated and scripting proficiency was quickly increasing.  Debugging and error checking procedures were followed in PythonWin so that script issues could be quickly discovered and fixed.  Finally, custom tools were created and shared.  Python is a fundamental tool in the GIS professional’s tool belt as it allows for complex analysis and timely output production.  This course was broad and deep in content and thorough in delivery – a great experience overall.

Friday, August 1, 2014

Module 10: Creating Custom Tools

Custom Tool window
Script Message output
 This week's assignment involved creating a new geoprocessing tool in ArcMap using Python scripting.  Creating custom tools is an important aspect of GIS Programming because time-intensive geoprocessing operations may be completed in a quick, automated manner.  The general steps of creating a custom tool are as follows:
1.       Generate a script that contains unspecified input and output variables and will complete a process of interest
2.       Create a new toolbox in ArcMap using the Add > Toolbox dropdown in ArcCatalog
3.       Add the script (the script generated in step 1) to the toolbox
4.       Set the parameter options for the script/tool
5.       Connect the input parameters of the tool to the input and output variables in the script
6.       Add messages to check for progress of the tool and for debugging issues.

7.       Check to see if output is as desired, if not then debug script