Tuesday, June 6, 2023

Module 4: Geoprocessing

 Module 4: Geoprocessing


The image above displays that my script Mod4_BTims.py is working. The first step the code does is print out the "Adding XY coordinates to the shapefile...", it adds the XY points for the hospitals shapefile. It also prints the messages out from interpreter from when the code started and finishes, using GetMessages(). 
The next line of code executes a buffer analysis on the shapefile hospitalsXYpts.shp. The buffer extends to 1000 meters around the hospitals XY coordinates and also dissolves the hospital buffers into a single-feature layer. This line of code also uses the GetMessages() to get the start and end time of the code from the interpreter.

Process Summary Notes:

-It is recommended to use arcpy.env.workspace instead of from arcpy import env followed by  env.workspace.

-arcpy.<class>.<property>

-arcpy.<toolname>_<toolboxalias>(<parameters>)

-You can use the "\n" character to add a space after each message, making messages easier to read.


No comments:

Post a Comment

Module 7 Google Earth

 Google Earth For this week's lab we were tasked with creating a dot density map of south Florida in Google Earth. The map also includes...