GIS Programming Module 3
In module 3 we carried out various operations by using models and scripting in ArcPro. In the practice exercises for this Module we carried out simple geoprocessing functions and practiced geoprocessing in batches. The assignment for this Module was split into two parts. The first part had to do with the creating a model that would Clip, Select and Erase data from two provided shapefiles. The process was fairly straightforward. Below is the resulting data that was produced in the model. The data shown represents soils within a basin area with areas that were not classified as Prime Farm lands excluded.
The second part of the assignment this week was to write a script in an IDE that will complete the following tasks:
1. Add XY coordinates to a shapefile containing hospital locations as point features.
2. Create a 1000 meter buffer around hospitals points.
3. Dissolve the edges of the created buffer.
In order to orient myself and ensure that I included everything I needed in the script I created the following flowchart.
After writing the script I achieved the results below.
The script I wrote ran successfully. I checked the destination folder to ensure everything was there and I opened a new ArcPro project in order to visualize the results.
The shapefiles represented above show the created buffer with dissolved edges along with the original hospital point locations. In the screenshot above you can see the data table for the hospital points shapefile with the added XY coordinate fields.
Overall I thought this assignment will be very helpful for future tasks that I have to perform in ArcPro. As we learned in previous modules small details such as correct file paths and spelling have a great impact on how your code works. One of the most important parts of this assignment for me was ensuring that I added a line of script to allow for the overwriting of results. Allowing the overwriting of results allowed me to test and try new things when writing the code without running into the issue of having different files with the same name which would cause an error.
No comments:
Post a Comment