Friday, May 30, 2014

GIS4102 Module 2: Geoprocessing in ArcGIS


ModelBuilder in ArcMap was used to create a model designed to reduce a large soils file down to a much smaller area of land with soils suitable for farming. This was done using the clip process to reduce the area of concern down to a particular basin. The result of an SQL to select those soils not suitable for farming was then erased from the basin polygon. The results of the geoprocessing are shown here: 
Areas Suitable for Farming
Prior to making the model, workspaces were identified which kept the saving of the outputs in the same location and sped up the entire process. Making the model itself was quite intuitive and easy to do within ArcMap by dragging tools into ModelBuilder as needed and then having prompts for features and output. After the model was constructed the input and output variables were all set as Model Parameters which give the option to change the input features or output name and filepath. The model was saved and named before being exported as a Python script to be run in PythonWin. That's when my troubles began....

Executed in PythonWin, the script generated a number of errors, apparently more than just those noted in the assignment instructions. Updating the input lines to correct for the script being unable to find the input parameters was unsuccessful as were other suggestions recommended in the discussion board. This was an exercise in eye-straining scrutiny trying to find an extra space or typo of some sort that would prevent the script from running to completion. Something that was noted for future models exported to Python Script is the importance of taking screenshots of script and error messages before making changes...at least while in the learning process. Although the script was not completed to success, the learning process was valuable, and the script will be figured out with some additional help. 

No comments:

Post a Comment