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

learn more… | top users | synonyms (8)

3
votes
1answer
292 views

Problems with Reclassify and RemapRange in ArcPy?

I'm having a bit of trouble with a script that uses ArcPy. I keep getting the following error: ExecuteError: ERROR 000622: Failed to execute (Reclassify). Parameters are not valid. ERROR 000628: ...
0
votes
2answers
28 views

Converting multiple csv automatically to shp using ArcPy?

I have more than 300 csv files. Every csv file contained different Longitude, Latitude and other parameters (e.g. Date, Longitude, Latitude, Elevation, Max Temperature, Min Temperature, Precipitation, ...
0
votes
0answers
106 views

Converting layer to raster coming up blank after two hours? [on hold]

I am looping through files, selecting out building footprints one by one and converting the selected building footprint to a raster. The script worked fine for about 2 hours this morning then stopped ...
11
votes
4answers
4k views

ArcGIS 10.0 Python SearchCursor file locking

I have a script that gets a value from a shapefile's field to return to the user. It seems that only when the arcpy.SearchCursor is called ArcMap locks the file and it doesn't get removed after the ...
2
votes
1answer
727 views

arcpy export - unable to set exact extent of dataframe

I am trying to use arcpy's ExportToPNG function to produce tiles for Nasa WorldWind, which will require very specific extents of outputted tiles. Pretty simple code - abbreviated below: mxd = arcpy....
0
votes
0answers
21 views

Delete feature class attribute from sde database arcpy script

I want to write a python standalone script which compares two feature class from SDE geodatabase. For Example, fc1 contains 10 attribute rows and fc2 contains only two rows which match with the fc1 ...
3
votes
1answer
190 views

Export Stretch Function values - Arcpy

I'm looking for a way to export Stretch Function values from images that’s stored in a Mosaic dataset. Not values from the whole set, but specific stretch functions per image. The set is stored in ...
2
votes
1answer
197 views

Creating a line along an existing polyline from a point

I have a large data set of points, all of which lie on a river network and have x, y co-ordinates. I want to calculate the slope of the river channel at each point from the underlying DEM by taking ...
5
votes
3answers
5k views

What is Python equivalent of ModelBuilder's Iterate Feature Selection?

My data consists of two featureclasses: Points = points representing trees Polygons = Polygons representing % canopy area by area. Each polygon in the FC has a % canopy measurement in the ...
0
votes
0answers
15 views

Using text file to store tool parameters for ArcPy tools that have many arguments? [on hold]

How would I pull in script parameters from a text file to use in a script running as a scheduled task? I need to create a connection file, and cannot store the credentials in the same place the script ...
0
votes
1answer
11 views

replacing shapefile data source in subdirectories with feature class

I have lots of mxds in subdirectories of this folder. I would like to walk through them and replace a shapefile with a feature class from a geodatabase with something like this. This code here is not ...
0
votes
2answers
13 views

Errors when publishing map services in ArcMap 10.3

I am using the python script provided by arc help to publish map services but keep getting this error. I am using desktop ver 10.3 and publishing to arc server 10.1. Different version isn't a problem. ...
1
vote
0answers
21 views

How to save raster output in different directory without duplicate in set workspace? Arcpy

I am using the Weighted Overlay tool in Arcpy and I've not had this issue before with other tools. I'm wondering if it's a tool-specific problem. The output I get from the weighted overlay tool saves ...
2
votes
0answers
33 views

Pixel based Regression

I have 80 .tif files, and each pixel value represents NDVI. The whole stack of images is a time-series. I want to run a regression for each pixel using NDVI and time. I have tried to approach this ...
3
votes
1answer
329 views

Unsupervised raster classification using GDAL

Is there an equivalent in GDAL to the Arcpy ISO data unsupervised classification tool, or a series of methods using GDAL/python that can accomplish this?
1
vote
1answer
54 views

Updating a table using outputs and insert.da.cursor

I have the following code however I need the outputs in a table which can be analysed further. How can I take the outputs from the code below and input into the table. Ive used insert cursor but am ...
1
vote
4answers
84 views

Run a model in arcpy

I have been looking at ways to run a ArcGIS model directly in arcpy, without having to export it and correct all sorts of things in the code. But somehow I can't seem to make it work. This is how I ...
0
votes
1answer
36 views

Multiple select by location in arcgis using arcpy

I wanted to know whether there is there any way of selecting features by using select by location multiple through arcpy, like "SelectLayerByLocation_management".
0
votes
0answers
37 views

Auto update map service when feature class is updated

I wrote a python script to create an MXD from template and auto publish it. The following is the excerpt of my code: #publish MXD method def PublishMXDToArcGISServer(id, in_arcgisAgs, in_publishWS): ...
0
votes
0answers
23 views

NameError when attempting to auto increment field with python script [on hold]

I am getting the following error when trying to run my code and I am not sure why: NameError: global name 'rec' is not defined Here is my code: field = "id_num" rec=0 def autoIncrement(): ...
1
vote
1answer
328 views

Automated map export, iterating layers and editing text

So just a beginner here. I've been automating a few map exports with ArcMap, I've used stack exchange to mash together some scripts to export maps with one FC symbolised using different fields and ...
0
votes
1answer
25 views

UpdateCursor error

I have a problem with arcpy.UpdateCursor. The script has to fill a table with data of an xml file. The script is the following: newtable = arcpy.TableToTable_conversion(selectlayer,outputlocation,...
0
votes
0answers
8 views

How to set parameters for maxp-regionalization tool? [on hold]

I am really new at using code in arcgis. I've recently found pysal library and I'm very interested in using the script on maxp-regionalization. Does anybody have an idea on how to set the ...
0
votes
0answers
102 views

Create Vertex and add empty attributes to it [on hold]

How can I create a vertex(and then a point feature on the vertex) on a polyline and give it some empty attributes(create fields), move an existing vertex, delete vertex? I am in ArcGIS environment and ...
6
votes
1answer
2k views

Adding Table to Layout View using ArcPy?

I am using ArcGIS 10.1 and I have a non-spatial table and some layers in a Data Frame. When I switch to Layout View I want to be able to show the map in a data frame element and the table in another ...
0
votes
0answers
2k views

insert cursor and arcpy.da.editor [on hold]

I am trying to insert geometries and attributes to a featurclass the has attachments enabled. The featureclass is in an sqlserver SDE 10 database with service pack 2 installed and the featureclass is ...
0
votes
1answer
992 views

ArcPy SelectLayerByAttribute Error and how to control GP output layer name [on hold]

I have a rather long script that first references an SDE feature class (non-versioned) to perform an attribute selection based on a SQL selection. I've been unable to figure out why the script will ...
0
votes
0answers
41 views

Failed to connect to database

I'm getting 'Failed to connect to database' error when trying to open a file geodatabase in both ArcMap and ArcCatalog. In addition to closing Arc and restarting I've tried the following - ...
-3
votes
1answer
45 views

Subtracting two ascii files using ArcPy?

I have many files with name format yyyymmddhhmm_tprate.asc 201508010600_tprate.asc , 201508011200_tprate , 201508011800_tprate, 201508020000_tprate and so on .......... I want to subtract ...
0
votes
1answer
29 views

Create 1' Contours Using Bare Earth Lidar .XYZI Point Data

I have 42 tiles of Lidar .XYZI point data containing approximately 800,000 points each and i need to create 1' contours out of the data. I have access to ArcMAP 10.3 and the 3D Analyst and Spatial ...
1
vote
1answer
794 views

How to add Table View to Data Frame using ArcPy in ArcMap 10.0?

How does one add a table to the current map in ArcMap 10.0? 10.1 has the function arcpy.mapping.AddTableView, but this function does not exist in earlier versions. Must the table be made into a layer ...
0
votes
0answers
19 views

How to pass variables of a Python script to another Python script on ArcGIS [duplicate]

I'm using Python window of ArcGIS 10.2 to run a Python script. But now I need to pass values from another python sript to main script, so I tryed this: import arcpy import subprocess subprocess.Popen(...
4
votes
3answers
3k views

Create an ArcCatalog OLE DB Connection using Python

Is it possible to create an OLE DB connection (*.odc) to a database in ArcGIS 10 , but using Python instead of the ArcCatalog GUI wizard? I don't need to necessarily create a file on disk, just make ...
2
votes
2answers
380 views

ArcPy Data Driven Pages AttributeError: PageLayoutObject: Error in executing ExportToPDF

I am trying to export a series of datadriven pages. Executing on a single page fine no issue, executing on a few pages no issue. executing on many pages serious drama. Initially i thought it might be ...
3
votes
1answer
41 views

How to set up Python/ArcPy with ArcGIS Pro 1.3

My ArcGIS Pro install recently updated from 1.2 to 1.3. In reading Python in ArcGIS Pro 1.3 I discovered that Esri have changed how ArcGIS Pro uses Python/ArcPy. Legacy: In ArcGIS Pro 1.0 ...
0
votes
1answer
23 views

Creating network dataset from template

I am using a script based on Esri's one, to create a network dataset from a template. I am using ArcGIS Pro 1.3. The problem is that the network dataset is not not created and I get no errors, so can'...
0
votes
1answer
597 views

arcpy.Clip_analysis() Automatically Affixing .shp.shp to Target Feature Class Name?

I created a Python script that was previously working fine, but is now giving me an error when I try to use the arcpy.Clip_analysis() function in arcmaps 10.2.1. I am not adding a filetype extnsion ...
5
votes
0answers
130 views

Determining Thalweg line of river without bathymetry?

I have the boundaries and centerline of a river. The Thalweg line defines the deepest elevation of a watercourse (see Image taken from Google). I do not have accurate enough bathymetry or Digital ...
0
votes
0answers
111 views

Copy Raster Catalog from .mdb to .gdb, but only within a certain extent with arcpy? [on hold]

I am trying to copy a raster catalog from a personal geodatabase to a newly created file geodatabase but only within a certain extent. Using the script below gives me a new file geodatabase with a new ...
1
vote
1answer
26 views

Q: Is there a Model builder/Python method to view an in-line variable's value in a model parameter's dialog box?

I've developed a model that summarizes road attributes (e.g., volumes) across a digitized polyline. The model has input/parameter dialog boxes for a road feature class, workspace, and attribute ...
2
votes
0answers
85 views

Reading feature class attributes with or without quotes in ArcPy?

I'm working on a script that clips a batch of feature classes by a selection made in another feature class. The way it works is by reading the clip feature fields, then allowing the user to select the ...
1
vote
1answer
21 views

How to execute a clip after a buffer in a custom script tool

I'm working on a script which Buffers roads in a layer, then clips the buffered roads from an area Here is my script thus far: import arcpy import os from arcpy import env env.workspace = "C:/...
1
vote
1answer
66 views

how to skip creating an empty feature class using featureclass to featureclass in arcpy

I have a script that finds points outside of selected areas and creates a feature class in a file geodatabase. However, sometimes there are no points outside of the selected area. Currently, the ...
0
votes
1answer
24 views

Can a model or python script prompt the user to select a feature?

I'm trying to create a tool in python where a user splits a road (a polyline feature of shapefile) and the tool automatically recalculates the road ranges depending on where it was split. I know how ...
0
votes
1answer
21 views

Script with searchCursor crashing arcmap

I was trying to make a script that counts the max lenght found in each field of a table with data in it, but it immediately crashes arcmap upon executing I know there might be a tool available on the ...
1
vote
1answer
316 views

How to auto-increment attribute fields using cursors and conditional statements?

I am trying to create unique IDs for an attribute named "FACILITYID" (str) and have got a ton of help from related posts and online python tutorials. I selected the rows I wished to create unique ID's ...
1
vote
2answers
62 views

Python Add-in using arcpy.mapping.ListLayers() does not update when run multiple times

I am developing a Python Add-in for ArcMap 10.4 that, upon a click on a map, opens a wxPython GUI that contains a combo box listing the layers in the map document. Here's a current snippit from my ...
1
vote
1answer
40 views

Alternative to self.Destroy() for wxPython in Arcmap?

I have created a Python Add-in for ArcMap 10.4 that involves a wxPython UI to display upon a click on a map. The UI is populated with default values as well as a combobox displaying the layers on the ...
0
votes
1answer
41 views

calculating first quarter of a raster by zonal statistics

I want to calculate the 1th quarter of raster values (beneath polygons) by zonal statistics but it does not have quarter. Zonal statistics has :MIN, MAX, MEAN, MAJORITY,RANGE,.... and does not have ...
1
vote
2answers
284 views

Accessing advanced symbol levels with python in ArcMap

Does anyone know if it is possible to access the symbolgy levels in ArcGIS10 with python? I have a layer "temp" that I print to a pdf. The symbology is printed correctly but is drawn in the wrong ...