Sunday, June 7, 2020

Geoprocessing

This week, we built a model that clipped, selected, and erased specified features of a geodatabase.  We then wrote a stand-alone script to add XY coordinates to a layer, create a buffer around those data points of 1000 Meters, and dissolve the buffers into single, combined features when necessary.  We also printed the functionality of the code with a get.Messages function.  The image below shows the results of my final code.


1        My thought process for creating the above script was to examine the basic code descriptions provided by ArcGIS help and get a feel for how each of the tools worked. 
2        I then thought it would be good to start with the basics of setting my environment and allowing files to overwrite.
3        Once I had done that, I pasted a skeleton version of the add XY code and input the correct file paths and adjusted everything according to our desired outcome and the layers we were working with.  I ran the debugger to make sure all of my code worked.
4        I then used the buffer analysis tool with the dissolve option and input the given parameters. I ran the code to make sure it worked.
5        Once I knew the code functioned without error, I created the print statements using the get.Messages function and everything worked.
6        I chose not to add the dissolve tool separately as another piece of code to supplement the add XY and buffer, but used the dissolve abilities of the buffer analysis tool to complete that in one step and achieve the same result.
7        My overall strategy was simply to go step by step, gain as good an understanding as possible of the meaning behind each of my actions, and keep at it until everything worked.

This was a great lab to get a taste of how Python is integrated into everything we do in arcGIS Pro.  I look forward to digging deeper into the world of Python.

No comments:

Post a Comment