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
0answers
12 views

Matching GPS coordinates to associated Census GEOID

I am brand new to GIS and have no idea how to go about coding this. If I have a shapefile of Census blocks and a CSV of GPS coordinates, how would I associate the GPS coordinate file to associated ...
1
vote
0answers
14 views

Generate irregular 3d Buffer of polyline

I have a 3D polyline That i would like to 3D buffer 300 Feet XY and 100 Feet in the Z direction. I think it may be something similar to this but in 3 dimensions rather than 2 (Buffering point with ...
1
vote
0answers
41 views

Converting every pixel of TIFF file from decimal to binary

I have a folder of .tif-files. I would like to convert every value in each of these files from decimal to binary. This code mostly works. The inner loop correctly outputs the binary equivalent for ...
0
votes
0answers
13 views

Exporting to jpg exact extent of image

I am trying to export the exact extent of a georeferenced image layer to jpg format using the exporttojpg function in arcpy. However, I am having issues setting the appropriate scale and dataframe ...
1
vote
0answers
21 views

Customizing ArcGIS toolbox layout [duplicate]

I am trying to create a customized tool in ArcGIS using Python Toolbox. Does anyone know how I can change the appearance (for example, size of a textbox or position of a parameter) of a parameter on ...
1
vote
1answer
54 views

Converting text field to date field in ArcGIS Pro

How to convert date, which is in text formated field to date formated field? Also, there is dates which have only year, without days and months and empty fields. I've tried Convert Time Field. But it ...
0
votes
1answer
28 views

Replicating ArcInfo Projection Default Values

I am working to replicate an ArcInfo AML processing script in Python and am running into issues precisely replicating the raster output. In brief, the AML script reprojects input data from a Lambert ...
0
votes
1answer
21 views

How to estimate overlap of certain pixel colors in a raster image and a linestring shape added on top of it?

I am trying to calculate how much of the electric feeders exist underneath tree covers. I am using NAIP infrared satellite imagery and have a shp file for a feeder circuit. Like so: I need to find ...
2
votes
1answer
33 views

Count Blanks, Spaces, and Hardcoded Nulls

I want to get counts of Blanks, Spaces, and Hardcoded Nulls in fields using arcpy.SearchCursor. Is it possible? When I try to filter am getting None values only. I tried the below code. cursorfields ...
1
vote
0answers
19 views

Reload table cache in ArcGIS Pro?

In ArcMap, it is very easy to reload table cache where it will call the CSV that was previously used to create the feature class to update the feature with any new data from the same CSV. In ArcGIS ...
1
vote
0answers
30 views

UpdateCursor is only updating the first letter from the value of my dictionary [closed]

I am using an update cursor to update an attribute field with the value of my dictionary. Both the field and the value are strings. I am confused why the update cursor is only updating the field ...
2
votes
1answer
30 views

Area calculation in “Thomas Fire analysis”

I am studying this notebook: California wildfires 2017 - Thomas Fire analysis I can follow the first part of the notebook. But I have got confused in this cell to calculate the burnt area: ext = {&...
1
vote
0answers
18 views

sequence size must match size of the row

I am looking for some help on proper syntax in ArcGIS Pro/ Python 3. I am trying to read data from a feature class and write to another feature class. The attribute fields are different so I am ...
2
votes
1answer
99 views

ArcPy can I delete the 9th column if I don't know its field name?

Is there a way to delete a field based on its number, rather than field name? For example, if the field name is FID_myshp I would do arcpy.DeleteField_management(newshp, ['FID_myshp']) but the name of ...
1
vote
1answer
16 views

Error using ArcPy SearchCursor to get list of unique values in multiple fields

I'm trying to extract a list of unique values in two fields in a shapefile. I think I am misunderstanding how the search cursor works, because I get the same error on which ever variable (x or y) I ...
2
votes
1answer
38 views

Soil Adjusted Vegetation Index in ArcPy

I am attempting to run the SAVI function (found within the Spatial Analyst module) in ArcPy. However, this function is not showing up for me regardless of there being multiple ArcGIS pages with code ...
1
vote
0answers
15 views

NetCDF to raster layer, spacing in their coordinate values

I'm trying to convert a NetCDF file to a raster layer in ArcGIS Pro, in order to make a space-time animation. But I'm getting a error message that I don't know how to solve: ERROR 000276: One or both ...
1
vote
1answer
53 views

Updating Fields with values from Python list using ArcPy UpdateCursor

I'm currently trying to update the fields of a shapefile, with a list I've compiled outside of the arcpy environment. Trying both UpdateCursor which I can't seem to get to work, and FieldCalculator. ...
0
votes
0answers
11 views

Visual Studio 2019 intellisense for arcpy not working in code window

Using Visual Studio 2019 intellisense works for the immediate window but not the coding window. How can I activate intellisense for coding window?
2
votes
1answer
30 views

Using external table to iteratively change parameters into ArcPy code

I am working with Python 2.7 and ArcPy under Jupyter notebook environment. I would like to adapt iteratively my code to a reference table. This is my reference table which contains the 3 variables ...
2
votes
2answers
78 views

Looping through two raster datasets and performing raster calculation on them with Arcpy

I have 2 raster datasets of temperature and precipitation from WorldClim. Is there any way to loop through 2 raster datasets at the same time and perform raster calculation on them. So that the ...
-1
votes
0answers
32 views

Change temporary files folder in ArcGIS Pro [closed]

Edit: Turns out this was not related to my ArcGIS scripts - it was a separate Windows problem which I am investigating, where Windows is writing thousands of files to C:/Windows/Temp and filling up my ...
-1
votes
1answer
35 views

Add shapefile into ArcMap project using PyCharm and ArcGIS 10.8

I am using ArcGIS 10.8 and PyCharm. I need something very simple apparently, but I can't do it. I want to add an existing shapefile to my ArcMap project using Python from PyCharm. With my project open ...
0
votes
1answer
29 views

Web AppBuilder geoprocessing tool output display message

I have written a script and would like to display some message at the Web Tool instead of just "Output Feature has been drawn on the map" I have tried the following, they can be displayed in ...
0
votes
0answers
21 views

AttributeError: Object: Tool or environment <TrainSupportVectorMachineClassifier> not found

I am new to coding and do not know what I am getting the error message: AttributeError: Object: Tool or environment not found. My first line of code is the typical "import arcpy....." I ...
0
votes
3answers
28 views

Separate boundary from adjacent polygons [closed]

I have a list of polygon features that share a common boundary. Is it possible to extract that line somehow? I am thinking about making a spatial join that shows me polygons that share a line segment, ...
0
votes
1answer
54 views

Error in “Extract values to point” in arcpy

I am working on spatial interpolation. To extract values for my required points, I am using "Extract values to points" tool from Spatial interpolation toolbox. The tool is working good in ...
-2
votes
0answers
33 views

Add output toolset to table of contents Python

When I run my toolset every time, the output does not appear in the table of contents. I have to import the output from outputfolder manually. I have tried this: arcpy.env.addoutputstomap = true but ...
0
votes
0answers
34 views

Graphic (Dynamic) Table missing from PDF mapbook export when arcpy script tool used

When exporting a mapbook (data driven pages) using a Python script tool, the Graphic Tables are missing all rows on the exported PDF pages (but the table header is there). When exporting the mapbook ...
3
votes
3answers
150 views

Creating points along 3D stream at inflection points

My goal is to generate points along my stream centerline at any positive inflection points (0.5 feet in elevation or greater). I used a Water Surface Grid (Raster) to convert my stream centerlines to ...
1
vote
0answers
20 views

Getting tile cache creation status on ArcGIS Server

I am creating a server side tile cache on ArcGIS Server 10.6.1 using ManageMapServerCacheTiles_server with the wait option as the Python/ArcPy example suggests. Unfortunately this process takes 10+hrs....
3
votes
2answers
122 views

Expression in arcpy.CalculateField_management

I am working on a toolset, and one of the inputs is a field of a shapefile. I have defined the field and I have used it in multiple functions, and it is working without any error. The problem is that ...
0
votes
0answers
8 views

Spatial join with field mappings yields zero value when inputs are layers made from feature classes

this might be more of a bug report than a question, but I encountered this strange behavior in ArcPy and was wondering if anyone else has experienced the same issue. Summary: I was trying to perform a ...
2
votes
1answer
32 views

Cursor Select by Location Append Value to List

I have a point layer of Manholes and a point layer of start points for StormSewer pipes. I need to determine where Manholes intersect a start point of a StormSewer pipe (I used the Vertices to Points ...
0
votes
0answers
33 views

Creating Raster Colorizer with ArcPy for ArcGIS Pro

I'm having trouble trying to write the Colorizer code for an NDVI Raster in ArcGIS Pro. The raster is single band, and if I set the discrete colorizer through the Symbology window, I then can access ...
0
votes
1answer
26 views

Create TIN with modified resolution with arcpy

I have the polyline feature file myfeature.shp from which I create a TIN file: import arcpy arcpy.CheckOutExtension("3D") arcpy.CreateTin_3d("mytin","Coordinate Systems\CH1903 ...
0
votes
0answers
21 views

Using select by attributes then doing spatial join on selection in ArcPy?

I am using ArcMap 10.6. How can I write the code to run spatial join on each match between Layer A and Layer B? First step is to select 1st value in Layer A field (GUID) and select matching records in ...
0
votes
0answers
19 views

Creating Generic Transverse-Mercator projection in ArcPy with ArcMap

I'm attempting to create a Transverse-Mercator projection in arcpy. However I keep running into an error trying to set the latitudeOfOrigin, even when the documentation explicitly says this is a ...
2
votes
1answer
33 views

Find same names (duplicates) in one field using another feature class field

I have 2 tables (UML, PalmOil) and I would like to check record by record within PalmOil, if there are duplicates intersecting NameUMLwith NamePalmOil UML ID | NameUML | 1 NAME1 2 NAME2 3 ...
0
votes
1answer
45 views

ArcGIS Enterprise 10.8.1: Trying to create feature layer with referenced data in Python

I am trying to write a script that creates feature layers in ArcGIS Enterprise based on layers in an ArcGIS Pro Project. I do not want to copy the data to the server, only reference it. The data comes ...
0
votes
1answer
42 views

ArcPy import arcgiscripting

I created a new environment in Conda and installed Python 3.6.9 along with certain modules including ArcPy in that new environment. Now, when the script in Spyder tries to import arcpy, I get the ...
1
vote
0answers
23 views

Cursor on selected features [closed]

I'm working on code, and I'm trying to select features by location. After the features are selected, I want the cursor will add "Yes" to "NearPoint3" field, only to the features ...
1
vote
1answer
29 views

ArcGIS Reclassify fails in Python Toolbox

I'm trying to build a Python Toolbox to analyze submarine landslides. Among other things I want to run the aspect tool and then reclassify the aspects into groups with a 45 degree interval. Therfore I ...
5
votes
1answer
188 views

How to ensure centroid is calculated within polygon?

I am working with a Search Cursor approach to calculate centroids within polygon features. You can see from the screenshot that the script calculates centroids within polygon features, however, some ...
0
votes
0answers
28 views

Creating new layout using arcpy.mp in ArcGIS Pro

Our team uses arcpy.mp to automate production of large volumes of maps. We have created an ArcGIS Pro project which contains several commonly-used map templates (as layout objects), such that team ...
1
vote
1answer
52 views

Is there any fast looping through too many shapefiles in a folder using ArcPy?

Looping through shapefile using arcpy.ListFeatureClasses() is very slow for many shapefiles. because first thing first, it writes all in memory as a list and then read each shapefile one by one. Is ...
0
votes
0answers
35 views

Autopopulating field based on values from different field

When we ID our utilities (water pipes, storm manholes, etc.) we use ID's derived from a grid system. Our city is divided into grids that have a letter and number attached. "J14", "J15&...
0
votes
1answer
29 views

Unable to create one-way EGDB --> EGDB replica

I have an Enterprise geodatabase with 30 feature datasets, each containing multiple feature classes. Both parent and child are Oracle databases. I've successfully created replicas for 28 of those ...
0
votes
1answer
36 views

Editing file geodatabase while other users read/view it gives ERROR 000224

Is there way to edit data within a file geodatabase while other user read/view data only. I deployed a file geodatabase and other users view the data but my process scripts can not edit the data and ...
1
vote
0answers
81 views

Run Python script with arguments or return values in ArcGIS Workflow

I found out how to run Python script in custom Step in ArcGIS Workflows. It is possible if I use Executable Execution Type, as executable to run is called python.exe and argument is path to the script....

1
2 3 4 5
186