Skip to main content

Questions tagged [arcpy]

A site-package created by Esri to expose ArcGIS Desktop (ArcMap and ArcGIS Pro) geoprocessing, mapping, etc, to Python.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

Kalman filtering using ArcPy in ArcGIS Pro 3

I am trying to run a Kalman filter in ArcGIS Pro 3.1. I have pulled together and tried running the following code. It runs without error, but the featureclass that it creates is empty. Can anyone ...
purnima Acharya's user avatar
-3 votes
1 answer
39 views

Seeking ideas for project [closed]

I currently can't decide what ArcPy project to do I have tried to do geocoding and network analyses by python script and it is just too difficult , it's way easier to do them manually. In order to get ...
Dena Abuothman's user avatar
0 votes
0 answers
24 views

AttributeError: module 'arcpy.mp' has no attribute 'TextSymbol'

I am trying to geocode using ArcPy Python script in ArcGIS Pro and I keep getting this error: Traceback (most recent call last): File "C:\Users\Owner\Desktop\Python Scripting for ArcGIS\...
Dena Abuothman's user avatar
0 votes
0 answers
22 views

Exporting bitmap files with a known color change

I know that to export a raster with a given color, you need to export it. You need to specify the parameters in the "Data Export" section in the Output raster section: Color. model and RGB. ...
Maksir's user avatar
  • 1
2 votes
1 answer
133 views

How to move a layer to a group using Python code in ArcGIS Pro?

I am trying to move a layer to a group using python code. Both the layer and the group are in the current/same map in ArcGIS Pro. I have the following code (the layer to be moved to the group "...
HKN's user avatar
  • 45
1 vote
1 answer
36 views

Getting Spatial Join statistics in ArcGIS Pro

I am using ArcGIS Pro 3.3. I have a point feature class with the field "Elevation" containing elevation in meters. I am trying to determine if, for each point, it is the highest within a ...
William's user avatar
  • 161
0 votes
0 answers
22 views

ArcPy Con and SetNull do not recognize constant value

I have a script that requires the SetNull and Con tools to change values in a raster. Here's some examples: # changing 0 to NoData, all other values to 1 background_removed = arcpy.sa.SetNull( ...
Sam's user avatar
  • 1
0 votes
0 answers
31 views

How can I Delete all Empty Datasets in ArcMap? [closed]

Now i have mxd and contain a lot of layers but many empty and i want to remove it from mxd but in automatically method
Mohamed Metwaley's user avatar
0 votes
0 answers
26 views

Writing tool for stacking point features on given co-ordinate

I am trying to write a Python code for creating a geoprocessing tool which will be added as a toolbox in ArcGIS Pro (v2.6). The tool will Ask for a "Target point feature" as input for the (...
Mahmud A.'s user avatar
1 vote
1 answer
26 views

How to clip a multipart polygon inside an iterator in ModelBuilder in ArcGIS Pro

I have two shapefiles: a 300x300m grid and land use, and a Model Builder with the structure below. I want for every grid a 300m buffer, and each buffer is used to clip the land use shapefile, but the ...
Augustus Inyang's user avatar
0 votes
0 answers
30 views

Calculating Length of Polylines in Miles Based on Individual Point Features

I am using ArcMap 10.8. I may be trying to do too much in one query, but I'm hoping there is a way to do what I'm trying to do without repeating the process 1,657 times. I am trying to analyze the ...
GISDawg_1785's user avatar
0 votes
0 answers
27 views

Arcpy - Avoid creating tables and use the generated features directly

We have a database containing line segments. Due to certain particularities in our project, we need to perform some analysis operations line by line instead of just performing the operation in the ...
Daniel Möller's user avatar
1 vote
0 answers
20 views

Nested cursors with arcy.da.SearchRelatedRecords

I am trying to use python (arcpy) to filter through some data in my Ancestry-GIS. All inside the same geodatabase I have: A point feature class called places shape | placename | GlobalID | Two non-...
DOMINUS MIHI ADIUTOR's user avatar
0 votes
1 answer
43 views

Getting arcpy has no attribute mapping error when running python code for Loop of MXD layer change

I am brand new to Python and trying to change out a shapefile in several MXDs to a GDB layer. When I run the following I get the error 'arcpy has no attribute mapping' error. I have seen where this ...
Anonymous's user avatar
0 votes
0 answers
10 views

Python IDLE crashes while trying to remove a Layer from an mxd containing a lot of layers using ListDataFrames

Problem My ArcGIS 10.8.1 crashes whenever I try to open an MXD project that contain Basemap layers. I need a script to remove Basemap layers without opening these MXDs but Python IDLE also crashes ...
Dan G. Ochoa's user avatar
0 votes
2 answers
43 views

Workspace is of wrong data type - ArcPy

I am trying to run this script inside of python in ArcGIS Pro to reconcile saved edits and post them to the default database (around line 7). I keep getting this error message "workspace is of ...
George's user avatar
  • 11
0 votes
1 answer
20 views

Get centroid xy of selected polygon feature for UTM

Building a Script Tool that will take a selected polygon feature iterating through a 1 deg x 1 deg grid feature class. The tool creates a new geodatabase with name from [GEOCELL] field of selected ...
atv5150's user avatar
  • 63
1 vote
1 answer
39 views

Using CreateMosaicDataset_management and AddRastersToMosaicDataset_management in ArcPy

I have a standalone ArcGIS Enterprise Server 10.8.1. I am also using ArcPy with Python 2.7.18. I want to publish an Image Service to my server by creating a SD file, given a folder of DEM .tif files. ...
Someone's user avatar
  • 25
0 votes
1 answer
34 views

Python notebook causing ArcGIS Pro to crash

On my laptop are student licenses to ArcGIS Pro 3.2, ENVI 6.0 and Agisoft Metashape 2.0.3. I'm in an intro to GIS programming class and when I try to open a Python notebook in ArcGIS Pro (from the ...
Sully's user avatar
  • 1
-1 votes
2 answers
48 views

Python Script to grab .geojson files from my N drive in many different folders and place in one folder? [closed]

Is there a Python Script to grab .geojson files from my N drive in many different folders and place in one folder? My ultimate goal is to then take this folder full of .geojson files and run a ArcGIS ...
spatialuser201235's user avatar
0 votes
0 answers
18 views

Pairwse Buffer using table of values

I'm trying to use a list of items that reference a distance to then use in a buffer. I'm having a hard time getting the table to work. I'm trying to create a drop down so they'd select Item1 and it ...
Davec433's user avatar
0 votes
1 answer
41 views

Re-writing FeatureLayer to memory causes ArcGIS Pro to Crash [closed]

I am working with Jupyter notebooks in ArcGIS Pro and would like to write some Feature layers to memory to speed up my operation. Currently it is taking roughly 24 hours. I have to emphasize it is ...
CCurtis's user avatar
  • 103
1 vote
1 answer
37 views

Runtime in ArcPy versus ArcGIS Pro

I have at least two hundred huge TIFF rasters that I'm trying to process into floodplain polygons. They are cursory flood depth rasters for pluvial, fluvial and coastal flooding. First, I need to set ...
Tebetheia's user avatar
0 votes
0 answers
20 views

Appending SEDF (or arrow table) to Enterprise Feature Class

I have a Notebook that takes a Civil 3D CAD .dwg and converts it to a spatially-enabled dataframe. I want to take that dataframe and append it to an existing feature class in an Enterprise DB. However,...
R_ww_D's user avatar
  • 1
-1 votes
1 answer
52 views

Returning value from ArcGIS Pro custom tool (.py)

How do we return a value from a custom .py tool, so that when I run the tool in another script, it will return a value (such as a number, string, or tuple)? Notice in the execute class function, I ...
Clouseau's user avatar
0 votes
0 answers
14 views

Error while installing any libraries in ArcGIS Pro Python notebook

I'm trying to install libraries, but the same error is shown for all library installation.
mangotree's user avatar
0 votes
0 answers
45 views

Using Python to populate a field based on multiple attribute criteria

Based on results from multiple fields, I want to populate a results field with Fail, Partial Fail, and Pass. My criteria statements seem to be right, but I'm having trouble actually passing the ...
JohnnyMc's user avatar
0 votes
0 answers
23 views

Automating Trajectory Processing in ArcGIS Pro

I'm currently working on a project where I'm processing a year's worth of Sentinel-6 data as it passes over different locations. I've been able to automate much of the process, but I haven't been able ...
Will Joca's user avatar
0 votes
0 answers
54 views

ERROR 000210: Cannot create output in_memory\SLR_Union.shp and ERROR 000354: The name contains invalid characters

I'm receiving the following errors: Traceback (most recent call last): File "f:\tst_root\GIS_WORKSPACE\sprice\PatchSize_SSG_Methods_Rework\SSG\Python\SSG_Analysis_Part1_BlockListClip.py", ...
S. Price's user avatar
  • 311
0 votes
2 answers
50 views

Updating data sources in .aprx files

I am about to break a lot of data sources in our team's .aprx files because we are overhauling the places we are storing our data. Our data is stored in shapefile and file geodatabase formats. Is ...
Joshua Chan's user avatar
0 votes
0 answers
42 views

arcpy.SelectLayerByAttribute_management

I have a scripts that was created some time ago, probably in an earlier version of Python. I have several Python programs to use and get different error. I guess that's to be expected. Code snippet: ...
FSR's user avatar
  • 1
0 votes
1 answer
29 views

Packaging projects or maps without data source connections in ArcGIS Pro

I have 4 map layers that each have the exact same data sources/layers but the colours are different (four different basemap designs). I want to package the project or map layers to share it without ...
user240437's user avatar
0 votes
0 answers
28 views

Finding closest feature of polyline layer to point layer using ArcPy with ArcGIS Pro

In ArcGIS Pro, I have 2 layers. One layer called X has data points which contains data for count points in a certain point of a road. This layer has an attribute (column) called Direction. This is ...
Barsino Larushku's user avatar
0 votes
0 answers
22 views

How to open/display the attribute table from a GDB with Arcpy to help QC previous notebook code steps before moving on to the next steps in script?

Within ArcGIS Pro 3.1, I've created a Jupyter notebook that automates pulling records from an SDE feature class, then filters those based on a Geocode Score. The records above 80 remain in the ...
LuisVazquez's user avatar
0 votes
0 answers
34 views

arcpy.management.CreateBuildingSceneLayerPackage fails when run outside ArcGIS Pro - ERROR 003266: Absolute Z values used

I have an arcpy script that loads a BIM IFC file and then creates a building scene layer package (slpk) with it. It's pretty simple and it works well when running it from the ArcGIS Pro Python console,...
user1226019's user avatar
1 vote
0 answers
34 views

Legend label rounding with Python in ArcGIS Pro

In a legend of feature layer, I would like to format the subtitle so that it doesn't print the full number, but rounds the category limits to 2 decimal places. I want to implement the format shown in ...
GisT's user avatar
  • 91
0 votes
1 answer
48 views

Batch editing ArcGIS Layout file text elements and exporting in ModelBuilder

I regularly have large series' of maps/layouts in ArcGIS Pro which I need to export for various different documents, but each layout has a required text element in it that states what document it's ...
Xandian97's user avatar
0 votes
1 answer
55 views

How to generate sequential numbers for list of input table fields written to a text file (ArcMap script tool)?

In order for a script tool I'm writing in ArcMap to read fields in a source CSV correctly as text, I need to automate the writing of a shema.ini file in the source directory. In order to do that I ...
Paul DiGirolamo's user avatar
0 votes
1 answer
82 views

AddFieldDelimiters not correctly adding field delimiters in arcpy

Basic arcpy script (ArcMap 10.8), I'm trying to add field delimiters for a query, however it's adding double-quotes " " instead of square brackets [ ] around my field name, which then makes ...
Midavalo's user avatar
  • 29.7k
0 votes
0 answers
37 views

Preserve string field type and leading zeros when using arcpy.conversion.TableToTable to go from CSV to GDB table? [duplicate]

I'm building an ArcMap script tool that will be run on many different input table schemas for geocoding purposes. When importing from CSV to GDB table using the arcpy.conversion.TableToTable function ...
Paul DiGirolamo's user avatar
0 votes
1 answer
25 views

Using ArcPy to Intersect Line and Polygon Features of the Same Name

I have a file geodatabase containing line and polygon feature classes of the same name. Below is an example: NATGAS_6IN_Line NATGAS_6IN_Polygon CAD_ARD_6IN_Line CAD_ARD_6IN_Polygon I have 20 line ...
BNew's user avatar
  • 11
1 vote
0 answers
54 views

How to update the Z value using an UpdateCursor

I'm trying to update the Z value using UpdateCursor, the problem is the update is not working. import arcpy from collections import defaultdict import random from statistics import StatisticsError, ...
sam's user avatar
  • 11
1 vote
1 answer
48 views

Are some XTools Pro Tools hidden from use with ArcPy scripting in ArcGIS Pro

I am using ArcGIS Pro v2.9 and XTools Pro v22. I can successfully access XTools when scripting by making calls such as arcpy.xtagp.PolygonsToPolylinesTool(infeats, outfeats) xtagp is the alias for ...
lumbrjak's user avatar
0 votes
0 answers
35 views

Running all custom tools in separate tool script in ArcPy

I created a toolbox with a bunch of scripts for ArcGIS Pro. I created a separate tool, RunAll, that runs all the tools within that toolbox. It runs at a good speed when I just run it as a python ...
Clouseau's user avatar
2 votes
1 answer
130 views

Move an existing layer into a group layer using ArcPy in ArcGIS Pro

I have a map object and I am trying to move an existing layer from that map object into a newly created group layer in the same map object. aprx = arcpy.mp.ArcGISProject("Current") mp = aprx....
Kat's user avatar
  • 181
0 votes
1 answer
44 views

How to make labels in AGOL look exactly the same as they do in ArcGIS Pro

I recently prepared a very good looking map with labels in ArcGIS Pro (v3.2.1) and published it in AGOL. Now in AGOL labels are not looking the same way as they do in ArcGIS Pro! How can I export my ...
gisgis's user avatar
  • 602
0 votes
1 answer
73 views

Joining by attribute using Fuzzywuzzy module (Python Script)

I'm hoping to get some assistance of debugging my script using fuzzywuzzy attribute joins. I have housing permit data that needs to be joined to parcel data. Unfortunately, the housing permit data is ...
Warren Navarro's user avatar
0 votes
3 answers
80 views

After converting CSV file to polygon, polygons are not falling on correct location

I have a CSV file with records in below format. area confidence boundary 159.1512 0.8084 POLYGON((87.7185491791352 22.5667828312016, 87.7184590804737 22.5667864311825, 87.7184519272495 22....
gis's user avatar
  • 123
0 votes
1 answer
48 views

Hosted layer in ArcGIS not getting updated

I'm encountering a peculiar issue while trying to add records to a Hosted Layer in ArcGIS using Python. I am using ArcGIS Pro 3.1.3 with ArcGIS Enterprise 11.1. I am running this code from the Jupyter ...
Mir Muhammad Murtaza's user avatar
1 vote
0 answers
42 views

ArcPy Check if layer is finished drawing

I have a script that creates a kind of time series by toggling on and off a bunch of raster layers in sequence. I have a counter that waits a certain amount of time before going to the next raster. ...
JUNGLE's user avatar
  • 510

1
2 3 4 5
212