GIS5103 Module 4: Geoprocessing
This week's lab in GIS Programming gave us insight on geoprocessing operations. We focused on creating and modifying scripts, using ModelBuilder within ArcGIS Pro to create scripts, and understanding toolboxes (in ArcGIS Pro).
![]() |
| Successfully ran script results |
1
Adding XY Coordinates:
Following the Exercise instructions helped guide me throughout this lab. I understood if I were to run something in Python that may include arcpy, I would need to first import arcpy – this isn’t necessarily needed when working in ArcGIS Pro Notebooks as ArcGIS is already aware of arcpy. I wanted to be able to import my environment workspace, so I needed to communicate effectively in writing the location of the data. Because we were tasked to focus on the hospitals shapefile, I made that the in_features. I then used the arcpy.management.AddXY(in_features) code to apply XY coordinates to hospitals, and created a print code that printed what the task was that would be completed.
2 Creating Buffer (1000 Meter)
To create a 1000 Meter buffer around the hospital feature, I utilized the Buffer python code:
arcpy.analysis.Buffer(in_features, out_feature_class, buffer_distance_or_field, {line_side}, {line_end_type}, {dissolve_option}, {dissolve_field}, {method})
Because the bracketed ({}) items are optional, I decided to keep the essentials and cut the code down to necessities in this lab. I inputted my variables in my modified script, and created a print message to indicate what process was happening when the script indicated it was ran successfully.3 Dissolving the Buffer
arcpy.management.Dissolve(in_features, out_feature_class, {dissolve_field}, {statistics_fields}, {multi_part}, {unsplit_lines}, {concatenation_separator})
Again, I didn’t necessarily need several of these line items (indicated in brackets), so I parsed through to determine which were relevant for this lab – however, unlike when parsing through for the essentials in the Buffer script, the Dissolve script needed clarification that it is a single part instead of a multi part. Due to this, an empty quotation was put in each of the preceding optional fields so “false” would be applied to the multi part parameter. Once again, I created a print message to indicate what process was happening when the script indicated it was ran successfully.Lecture Notes
-
Geoprocessing: Action of preforming spatial
analysis and automation of tasks where
tasks are: reproject, clip, buffer, etc.
o
Series of actions that produce particular
results
o Should have (in order): input data(s), process/tasks, output data
- Custom made tools live within “toolboxes” and when in toolbox, considered toolset
- GUI = Graphical User Interface
- Batch mode can run one kind of tool at a time, not sequence of tools
- To run sequence of tools, use ModelBuilder w/i ArcGIS Pro
- 4 elements of a model: data variables, value variables (linear units), connector, tools
-
Exporting a model doesn’t always create a 100% reliable
standalone script – consider if will be ran in Python, etc.

Comments
Post a Comment