Questions tagged [arcpy]
ArcPy is a Python module for interacting with ArcGIS tools. The module was developed by Esri, the company that makes ArcGIS. ArcPy offers a high-level implementation of Esri's ArcObjects programming library. The best place to ask about ArcPy is the Geographic Information Systems sister site.
18 questions
2
votes
1
answer
28
views
Join ArcGIS tables in Python of plant greenness in response to prior month's rainfall
I am using Python 3.8 with ArcGIS Pro 2.5. This code creates a joined table where I match values for plant greenness in the current month with rainfall X number of months into the past. Each loop ...
7
votes
1
answer
174
views
Python - Displaying messages in ArcPy/IDLE
I have created a wrapper for displaying messages with ArcPy and IDLE (as that is all I have available to myself due to certain circumstances) as I frequently use both to test and develop new tools. ...
2
votes
0
answers
122
views
Extract cell values from multiband rasters
I have the following function and code snippet to extract cell values for multiple years, format it, and save to a list. Each raster has 365 bands — one for each day. A separate operation is performed ...
3
votes
0
answers
116
views
Select polygons that overlap with other polygons within a single feature class
I am running a script to identify polygons that overlap with other polygons within the same layer. I have managed to do this with the code below but the problem is that it is very slow (about 3 ...
5
votes
3
answers
421
views
Python code for buffer creation and intersection
The script below uses an ArcPy package which helps to create buffer of the impact around a location where a blast occurs(user entered), intersects with building footprint which is the point of ...
5
votes
1
answer
158
views
Python toolbox for OpenStreetMap data
Background
My project is a Python toolbox. This is my first bigger coding project and it took me quite some time to code this toolbox. I learned a lot from the start point to this day. I changed this ...
2
votes
0
answers
383
views
Fully Constrained Least Squares (FCLS) Linear Spectral Mixture Analysis Method
I have written code using Python for Fully Constrained Least Squares (FCLS) Linear Spectral Mixture Analysis, which could be applied for unmixing multispectral image successfully.
However, the ...
1
vote
0
answers
91
views
Writing a table of national park data
I'm working to produce a Lookup table using the Arcpy module that contains descriptive statistics for US National Parks.
The original data, found in tbl, has 12 ...
2
votes
1
answer
116
views
Creating Access tables based on a comparison of tables from ArcMaps
This script creates a an Access table that my boss uses for making a report in Access. The data comes from a comparison of data in more than a few tables in Arcmaps. Right now this script works in an ...
1
vote
1
answer
381
views
File names to database table
I have files in subfolders on a network drive. I want to create a list of files, and insert that list into an Oracle table.
I can successfully iterate through the files in the subfolders and do the ...
2
votes
1
answer
101
views
Reading from a database and comparing values
I wrote some code that uses the arcpy module to read from some tables and checks to see if those values are in another table then if they aren't it writes them to a txt document. I made a change so I ...
4
votes
0
answers
366
views
Generate NDVI Rasters from USGS EarthExplorer Landsat 8
I've written the following using Python Dictionaries and Pathlib Module. I'd like to improve the first function: list_landsat_bands.
I've created a list of file patterns to match, which I then use ...
7
votes
1
answer
254
views
Raster processing for climate change model
I am working on a project on how climate change may affect the development of spruce budworm larvae throughout each year (historical and projected) using different climate change models and emission ...
2
votes
1
answer
406
views
Arcpy script to check for TIFF files and add them to different lists
My script goes through sub folders in my main directory and based on a wildcard checks if a tiff file exists or not, if it exists then the file path is appended to the corresponding list. For example, ...
3
votes
1
answer
138
views
ArcPy script to analyze land use in counties
We have written a Python script using arcpy modules. It is was written by Python beginners and many parts of the code are written in 'unpythonic way'. The goal is ...
1
vote
2
answers
205
views
Updating ArcPy feature classes
I am looking for the way to speed up my script. The final output is as required, but it's clunky and really slow. I know it's slow because of the double for..in.. ...
4
votes
1
answer
81
views
Downloading 2 tables from db, does calculation and uploads resulting table
I have written this script that downloads two tables from the db, preforms an intersection on them and adds 2 new columns to the resulting table, and uploads the resulting table to the db. It's a bit ...
7
votes
1
answer
266
views
Extracting nodes from a road network
My code takes 143.023 seconds for extracting nodes from a road network of city like Göteborg in Sweden. Please check it out if I can optimize it.
...