Questions tagged [arcpy]
A site-package created by Esri to expose ArcGIS Desktop (ArcMap and ArcGIS Pro) geoprocessing, mapping, etc, to Python.
10,657 questions
-2
votes
1
answer
73
views
Optimize ArcPy code
I have the following ArcPy code, which I need to run on very large datasets. Are there any suggestions for making it run faster? It's taking upwards of an hour and half to run the section I posted ...
0
votes
1
answer
52
views
ArcGIS Pro Python Toolbox set environment extent errorsni
I have a Python toolbox (.pyt) that pulls elevations from an image service for points along lines. Because the service has processing extent limits the extent environment variable needs to be ...
0
votes
0
answers
26
views
How to extract layer list in ArcGIS 10.9.1 Standalone Server?
We have an Standalone ArcGIS Server 10.9.1 environment.
The objective is to fetch layer list within all services using arcpy or python API.
I did found some help articles and stack results, but can't ...
-1
votes
1
answer
85
views
Using ArcPy UpdateCursor to remove Z geometry
I am trying to remove my Z values from a points layer, and the Z Val field has already been field calc'd to 0, but when I select a point the z geometry is still populated with an integer > 0. I ...
1
vote
1
answer
39
views
Python tool fails once shared in Portal : ERROR 000840 : The value is not a Raster Dataset
I created a custom python toolbox (atbx) in ArcGIS Pro 3.5. This tool takes 2 inputs : a Mosaic Dataset and a line vector (Feature Set). It is supposed to return a json file with the pixel values at ...
0
votes
0
answers
35
views
arcpy.mp - How to remove (or retain) entire group layer including sublayers from map
I'm trying to work with group layers in ArcPy. I have several group layers and I want to remove all but one (sublayers included within the layer). However when I use the approach below, it removes all ...
1
vote
1
answer
69
views
Import ArcMap Project into ArcGIS Pro using ArcPy in ArcGIS Notebook
I know this can be done manually quite fast and easily in the ArcGIS GUI, but I need to autmate it with ArcPy. This is because I will be moving several hundred ArcMap projects (.mxd) into .aprx in ...
0
votes
0
answers
48
views
Writing Python script to decide which polygon to delete
I'm working through a project where I'm trying to identify upstream wetlands associated with various stream crossings in a large area. To model the event of a blocked stream crossing, I'm trying to ...
0
votes
1
answer
60
views
Find paths from before moving / better way to move projects
I was tasked to help moving excisting projects from one server to another.
The two options we have considered, are not ideal. Please let me know if you know other options.
Option 1: a project could be ...
0
votes
1
answer
49
views
arcpy PointsToLine produces no output and no error
I have a situation where the arcpy tool PointsToLine silently fails. Ie, it produces no output and no errors.
My script runs the following code:
arcpy.PointsToLine_management(position_history_lyr, ...
1
vote
1
answer
73
views
Update raster symbology by unique values using ArcPy
I am using ArcPy in a Python script to cycle through producing a large number of map layouts, swapping out rasters for each map. The raster layers are all comprised of cells with integer values of 1 ...
0
votes
1
answer
46
views
Cannot Share Feature Layer with AGOL using ArcPy
I'm trying to share / publish a Feature Layer to my AGOL account as a Hosted Feature Layer using arcpy. I was able to do this using ArcGIS Pro and want to automate it. I use R / reticulate, code is ...
2
votes
1
answer
179
views
Using ArcPy Search Cursor
I am trying to update some scripts to Python 3.9.x. I am copying a dataset from an enterprise geodatabase to a file geodatabase. Once copied, I would like to have a search cursor go through the owner ...
0
votes
0
answers
41
views
Populating tags with Python in ArcMap - Map automation through LRM
I am trying to fix a broken map in map templates that is generated through Land Resource Manager (LRM) where we manage all our data. When we generate maps we select the features we want to map, and ...
1
vote
1
answer
123
views
Script fails to execute as ArcGIS Pro Toolbox Tool
This script works fine when the paths are hard coded for testing and executed in a Python IDE. After porting to a toolbox tool and tested with the same data the tool closes without error. No output ...