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)

0
votes
2answers
24 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
14 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
2answers
12 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
20 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 ...
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
0answers
10 views

arcpy.Intersect_analysis gives table was not found [on hold]

I want to make a simple intersect between two feature classes in the same geodatabase and put the output in the same geodatabase. But arcpy.Intersect_analysis gives the error 'The table was not found'...
0
votes
1answer
34 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".
2
votes
0answers
32 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 ...
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(): ...
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
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
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
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
44 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
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(...
0
votes
0answers
20 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
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
24 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 ...
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 ...
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 ...
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:/...
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
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
25 views

Mosaicing rasters in arcpy

I am mosaicing rasters in arcpy but it is returning the error, AttributeError: 'module' object has no attribute 'MosaictoNewRaster_management' I am using the code: import arcpy from arcpy.sa import *...
0
votes
1answer
28 views

UpdateCursor not filling correctly with conditional statement

I am attempting to update a table so that a field, "ALLREADY", fills with "Y" or "N" depending upon if "dmready" equals "total_records" AND if "dm_stat" is equal to "Ready for DM". When I run my ...
0
votes
3answers
33 views

using where clause for selecting more than one value in the field in arcpy.Select_analysis

I have a problem in using the Select_analysis or Select by attribute, what I need t do, is to extract all the residential uses from a land use feature class, and make a feature class for residential, ...
0
votes
0answers
27 views

Calculate exact percentile for each rastercell and create new raster with percentile values [closed]

I need to calculate the exact percentile value of each raster cell in a raster layer, in order to create a new raster layer with this exact (decimal) percentiles. (In excel this function would be "...
0
votes
0answers
29 views

000800 error for versions only when working in a geodatabase that uses an Operating System Authentication for its connections

I wrote a toolbar that takes some input and uses it to modify an SDE geodatabase. It usually works well in a geo database that uses Database Authentication for its connections , but recently I ran ...
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 ...
0
votes
0answers
36 views

Export to PDF loses layer with symbology but exports other layer just fine

I am trying to export an mxd with two layers: layer ATOM is joined to layer symb which gives it symbology and layer taco isn't joined to anything. I tried the solution shown at Why is Layer missing ...
0
votes
1answer
26 views

How to add start and end coordinate to attributes of a road network?

I have generated a road network from open street map data. How can i add start and end coordinates (point_x, point_y) to its attributes table via toolbox or arcpy? That's how the roads look like. I ...
0
votes
2answers
51 views

Replicating the “Calculate Geometry” table tool in python

I'm trying to automate a very tedious process in our company that involves switching the data frame's coordinate system and performing calculate geometry on a couple of fields, these are the two ...
0
votes
0answers
25 views

Using UpdateCursor to populate new field based on conditional statement not updating field [closed]

I am attempting to populate a new field with a "Y" or "N" based on whether two integer fields are equal. My code seems like it should work, but when I run it, it does not update the field (the field ...
1
vote
1answer
21 views

How to loop through features in a layer, zoom to that feature and export to png

I have a large number of lines in a shapefile representing sites on a map. Each has a unique 2- or 3-digit Id. I want to zoom to each feature in turn and export the map as a PNG file. I have cleared ...
1
vote
2answers
41 views

Compare Two Tables and Delete matching Records based on a Field in Original Table

I am having an issue with this and think there is a simple solution. I have a large table, upwards of 500,000 records and need to add new records to it daily. Occasionally a new record will just be ...
0
votes
0answers
24 views

How to export a map or raster to JPEG2000 with a different quality (1…100)?

I writing a Python script for ArcGis. How can I export a map or raster to JPEG2000 with different values for quality (for example 1...100)?
0
votes
0answers
14 views

How to concatenate column attributes into a single column where we don’t know the number of columns or the names via arcpy? [closed]

I have lots shapefiles all with different columns except for a standard ‘name’ columns. Since the other columns are all different, I want to dump them into one large text column. It would be nice to ...
0
votes
0answers
20 views

How to reorder field in a file geodatabase without creating a new feature class? [duplicate]

I have a Script(toolbox) to reorder the fields into a file geodatabse and the output is a new feature class with fields in the order specified, is there any way to replace the existing feature by the ...
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
2answers
58 views

Removing duplicate pairs in Near Table

Generate Near Table or Near can be used on a single Feature Class to find the nearest feature to each feature. arcpy.GenerateNearTable_analysis(featureClass, featureClass, pairsTable) This ...
0
votes
0answers
14 views

Pass the onMouseDownMap X, Y from a python addin to a toolbox script tool

Is it possible to pass the onMouseDownMap X, Y coordinates to a script tool launched using GPToolDialog? The end goal is to have the user select the add-in tool, click the map to add a point, then ...
0
votes
1answer
33 views

Errors when looping through spatial join with python

I am attempting to loop through a list of inputs and create a spatial join for each. My code works as desired for the first object in the list, but then throws an error. Here is my code: # set ...
0
votes
1answer
29 views

Text time to datetime field not working [on hold]

I have a text field in a FGDB with time in the format hh:mm:ss and would like this to be a datetime object in a new field. I don't think FGDB can use only time and require a date, it would be fine if ...
2
votes
2answers
35 views

Python, Describe.spatialReference errors

Having trouble getting my code to work. Keep getting IOError that my parks.shp doesn't exist....not sure I understand what this is saying. import arcpy mxd = "D:\...\TravisCountyAustinTxx.mxd" ...
0
votes
0answers
11 views

How to obtain full pathway for feature service feature classes for use with Python scripts [closed]

I would like to be able to copy feature classes within a feature service layer over to a local file geodatabase using Python. I am unsure of what pathway to use for the input feature service feature ...
0
votes
1answer
33 views

Writing for loop for focal statistics?

Im trying to run Focal statistics on a list of parameters, where the radius changes for each input parameter and then save the resultant DTM with the radius attached in the name. I can do this for one ...
0
votes
0answers
36 views

Removing fields from output FeatureSet in ArcPy for geoprocessing service?

The geoprocessing service runs a script that is trying to output a FeatureLayer or a FeatureSet that will contains a selection with only some fields of the original FeatureClass. I dont want to copy ...
1
vote
1answer
31 views

How to rename unique value using arcpy

I work with several MXD files. In each map there a polygon layer with unique values: I try to change in the table of contents the "a" into "land use" by using this code: import arcpy,os,sys from ...
2
votes
1answer
72 views

Checking if feature class locked in ArcGIS using ArcPy?

I'm trying to find a way to determine whether a feature class is locked before trying to alter it. In one database I want to remove a feature class completely, and in another I want to add extra ...