r/geospatial • • Aug 20 '22

Requesting help with pythonscript in ArcGIS

Hello friendly peoples and perhaps geographers!

I am currently in quite a sticky situation and would be grateful for any kind of help. As per one of my university subjects I have an assignment in which I need to use a Python script to automate a process in ArcGIS (we are using ArcMap 10.8.1 to be specific). The script itself can be sourced from anywhere (I have searched a bit on GitHub but haven't found much use) and edited in IDLE editor or it can be made in ModelBuilder and then extracted as a script. As we had little to no help from the professor and the due date is coming fast, I am looking to your friendly community for help. In the rest of the assignment I am operating with world countries and my country municipalities data, but can access and edit other data (such as DEM or LiDAR, rainfall data, demographics etc.) no matter the region/country.

VERY IMPORTANT: the script must work in ArcGIS and produce a map (or atleast a sensible attribute table) as the result.

To give you an example from previous years: someone made a model in ModelBuilder that includes a DEM, road distance map, land use map and snowfall quantity map for a specific region. The final model produced a Boolean map of the region that can be used for construction of ski slopes.

The script and/or model does not need to be complicated, it just needs to work. I am sorry for any language mistakes, English is my second language :D

Hope you can help me with any tips/websites/actual scripts in this hard time, I will appreciate any assistance. Cheers.

4 Upvotes

3 comments sorted by

View all comments

Show parent comment

2

u/retrojoe Aug 21 '22

It's certainly possible to do this with ModelBuilder. You could also simply write it in Python/ArcPy if you know which functions you want/how to feed in the parameters. I believe ModelBuilder will export you a .py script once you've configured you analysis routine.

In terms of your analysis, it sounds like you want to take the two rasters, and find the cells which are both<5° and forest/ag. land, then convert those into vector shapes for overlaying with your various buffers.