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
0answers
7 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
0answers
10 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
0answers
9 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
18 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
16 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
15 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
35 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
23 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
26 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
30 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
23 views

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

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
27 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
59 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
29 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
22 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
45 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 [on hold]

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
15 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
32 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
19 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? [on hold]

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
19 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
0answers
18 views

Loop through multiple GDB and run frequency statistics

I need to find some statistics on two separate tables within a GDB. I have the following code which is fine when I specify a GDB. import arcpy arcpy.env.workspace = r"D:\Zahir\AIS\Raw_AIS_Data\2013\\...
1
vote
2answers
55 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
13 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
28 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
32 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
10 views

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

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
35 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
27 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
69 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 ...
0
votes
1answer
39 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
32 views

calculating sinuosity of each road segment

I want to calculate the sinuocity of each road segment of a vector shapefile which contains roads. I have downloaded the python script from enter link description here but I don't know what to do ...
-4
votes
0answers
25 views

Explanation of Python statement within GIS [closed]

How do I write a python program for the pseudo-code below (rather than the program I used further below)? Create a feature class for the wells Set up the field list to be used by the update cursor ...
0
votes
1answer
37 views

Combining two search cursors (one for table and other for feature class)?

I have a problem from combining two search cursors (one for a table and other for a feature class), there are missed records in the first table, that have not been considered by the first search ...
-5
votes
0answers
13 views

Export list of shape files in a folder to csv [closed]

import arcpy from arcpy import env arcpy.env.workspace = 'E:\Temp\Amudalavalasa' fcs = arcpy.ListFeatureClasses("*.shp", "") for shp in fcs: print shp
-3
votes
0answers
20 views

Converting .shp file to .txt file in ArcPy to print data? [closed]

Is there any way in python to convert a point shp file to a txt file so that I cant print the x, y coordinates in txt format? import arcpy arcpy.env.workspace = "C:\Users\Brett\Desktop\lesson_6\...
0
votes
0answers
26 views

Looping extract by mask from raster list using ArcPy gives ERROR 99999? [closed]

I am getting an error when I try to iterate raster files through the extract by mask tool. I am running ArcMap 10.2.2 and the Arcpy script I am try to use follows: # Import arcpy module import arcpy ...
-1
votes
0answers
68 views

How to speed up python script using in_memory [on hold]

I've written a script that works, but am aware that I should be able to get it to run more quickly by storing temporary variables in the RAM memory rather than writing to the temporary geodatabase. ...
1
vote
2answers
27 views

TypeError: list indices must be integers, not str when trying to calculate new records in several fields

I am trying to calculate new records in several fields by looping through each field in a list and dividing the value of each record by its shape area. My code is as follows: inFeature = outFeature ...
1
vote
0answers
27 views

Arcpy standalone script: Tool is not licensed error [on hold]

I'm trying to execute a standalone python script using arcpy and spatial analyst extension. I've arcmap installed with a trial license. The script is the following: import arcpy,arcinfo import sys ...
0
votes
1answer
20 views

Dynamically editing items in combobox of Python AddIn?

I'm trying to dynamically edit the list of items in a combobox I made using python add in for a toolbar I'm working on. The list is calculated by another button. Here is the relevant code: class ...
1
vote
1answer
30 views

Select By Attribute and Export with Arcpy

I have 4 folders with shapefiles in them, and for each folder I am selecting by attribute and then exporting the new shapefile. My code runs with no error but the output folders have no files in them ...
1
vote
1answer
29 views

Applying symbology to raster layer in ArcPy without using symbology layer (layer file)?

I have a raster layer with 3 unique values (1,2,3) and I want to apply a unique color to each using RGB values or hex codes, without the use of a symbology layer (layer file). Is it possible to ...
0
votes
0answers
33 views

ReplaceDataSource of SDE layers in map documents (mxd) with old feature classes newly organized under feature datasets in the same ArcSDE

I need some help to replace the data source of old SDE layers in the map documents. The replaceDataSource method in the code below is not working properly resulting in a broken link of the target ...
1
vote
0answers
17 views

Retrieving user information in ArcGIS Server token protected geoprocessing service using ArcPy?

I have a geoprocessing service on ArcGIS server 10.3 that is protected with tokens. This GP Service is a python script. Is it possible to retrieve the user information, such username and password, ...
0
votes
1answer
17 views

Avoiding unexpected raster search with Python script?

I am trying to write a python script that will find all raster files in my server including 'GRID'. Here is my sample script: import os import arcpy path = r"F:\Geodaten" for root, dirs, files in os....
-3
votes
1answer
52 views

Code Works in Python Window but not Script

This code successfully completes inside the ArcMap Python window but fails as a script with identical code in a toolbox. The source data is a collection of feature classes directly inside an ...