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 [gis.stackexchange.com](https://gis.stackexchange.com/) sister site.

Filter by
Sorted by
Tagged with
7
votes
1answer
217 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. ...
7
votes
1answer
198 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 ...
5
votes
3answers
179 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
1answer
97 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 ...
4
votes
1answer
72 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 ...
4
votes
0answers
255 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 ...
3
votes
1answer
107 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 ...
3
votes
0answers
35 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 ...
2
votes
1answer
145 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, ...
2
votes
1answer
87 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 ...
2
votes
0answers
45 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 ...
2
votes
0answers
91 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
2answers
157 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.. ...
1
vote
1answer
74 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 ...
1
vote
1answer
73 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 ...
1
vote
0answers
50 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 ...
1
vote
0answers
70 views

List comprehension that contains a query

I'm trying to compare some entries in a table to some entries built from some other tables in arcgis using python. When I ran similar code to this, the script took no longer than 15 minutes. I moved ...