Questions tagged [arcpy]
A site-package created by Esri to expose ArcGIS Desktop (ArcMap and ArcGIS Pro) geoprocessing, mapping, etc, to Python.
10,656 questions
0
votes
0
answers
19
views
Retrieve Raw Service Pixel Value with ArcPy from image service [closed]
I need to make a python tool to intersect a mosaic dataset (shared as an image layer) and a line and retrieve the pixel values every x meters on the line.
I managed to do this with this method :
use ...
1
vote
1
answer
31
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
24
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
votes
0
answers
45
views
Can an arcpy.da.UpdateCursor be used on a layer in a geopackage? [closed]
Can an arcpy.da.UpdateCursor be used on a geospatial layer in a geopackage? Within a Jupyter notebook in ArcGIS Pro v3.5 I have been using arcpy.da.SearchCursor to process records in a layer in a ...
1
vote
1
answer
63
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
39
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
52
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
48
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
60
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
37
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
155
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
37
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
102
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 ...
1
vote
1
answer
52
views
ArcGIS Pro, Extract Band ArcPy function: Extract using band_name does not match any extract using band_id
Unexpected behaviour is seen in several RGB rasters in ArcGIS Pro. In this example, a test dataset is used – sample data from the Ordnance Survey (OS) 1:25k Scale Colour Raster: https://www....
1
vote
0
answers
111
views
Python Toolbox Record of Parameters and Parameter Setting Re-use
I am working on a python toolbox.
The following snippet is intended to serve a simple utility, in principal; I want each run of the script to export something containing a record of all parameter ...