Wednesday, August 3, 2016

Sharing Tools

GIS Programming - Mod 11

Our final assignment for this course was Sharing Tools.  We started with a script that was already written and a tool that was already made.  The script had a couple paths that were hard coded to non-existent files or locations so our first step was changing those paths to parameters defined by the tool.  To do that we used the sys.argv[] function, which is very similar to GetParameterAsText() as it always returns string objects.
 With the variables set to pull the paths from the tool parameters the tool then ran correctly and added random points and put buffers around them, so we moved on to clean up the tool a little bit.

The dialog box has a help window that explains the purpose of the tool and the requirements for all the parameters, but it doesn't just magically appear with the creation of a tool, so we entered it by editing the Item Description in ArcCatalog.  Since this tool was a combination of two existing tools, Create Random Points and Buffer, the explanations could pretty much be copied from those tools with just a little tweaking.

Once the script and the tool were both cleaned up and grade A professional looking the script was imported to the tool so the tool could more easily be shared, requiring only the passing of the toolbox.  And to make sure nobody could sneak in and sabotage all my hard work on this my last GIS Programming assignment, I password protected it with a diabolically clever password nobody would ever figure out in a million gazillion years.

While I really enjoyed the entire course, I think what I enjoyed most was learning how to create custom tools.  It frustrates me to use a program and always wonder how it knows what to require of me and what to do with the information I give it.  Creating custom tools gave me a behind the scenes, behind the screen, view of what is going on.  Now I have a sense of what goes into the making of dialog boxes and what the limitations and possibilities can be.  I think that is something that can come in very handy in the future, especially for making GIS more usable to others who don’t have time to learn the program.  They only have to learn how to enter the data required, and they’re making their own maps.

Another thing I really enjoyed was debugging.  I just don’t feel I have a deep enough knowledge yet to really be very successful at it.  Hopefully once I get back to work I’ll have the opportunity to use Python and get to really dig deep into it. 

No comments:

Post a Comment