For this week's lab we began using Python in both ArcGIS Pro as well as Spyder and ModelBuilder to run geoprocessing tools to complete geoprocessing tasks in ArcGIS Pro. For the final part of the lab we wrote a script to add XY points and a dissolved buffer to a shapefile of hospital sites. I began my process by first importing arcpy, as the script was run in Spyder and not the Python window of ArcGIS Pro, and then imported the env module of arcpy in order to establish a workspace. I then used the workspace tool in env to establish a workspace of my Module 3 Data folder so that all of the preexisting data to be used in the code could be accessed by the Spyder program. I also set the overwrite output to true, so the code would overwrite preexisting files and could therefore be run several times in order to test the code. I used the XY management to create XY points on the copied shapefile and print GetMessages to confirm the successful running of the tool without an error, and did the same with the create buffer tool. I also added the dissolve section at the end of the inputs for the tool after bypassing unused parameters by leaving blank spaces. The successful running of both parts of the tool produced this output message.
Comments
Post a Comment