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)

1
vote
0answers
20 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\\...
0
votes
1answer
596 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
125 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 ...
0
votes
1answer
19 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
11 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'...
2
votes
0answers
84 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 ...
0
votes
0answers
14 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
20 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
64 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
20 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
18 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
315 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
60 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
37 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
40 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
283 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 ...
0
votes
2answers
278 views

Can I use my SearchCursor in Select by Location

I am trying to select the largest polygon that contains each feature in a feature class but none of the features in another feature class. I have written the code that seems logical to me but (of ...
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 ...
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 ...
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, ...
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 ...
0
votes
1answer
572 views

Polygon Neighbors Analysis script (ArcPy 10.1) producing erroneous results?

I'm struggling with a python script that is supposed to calculate a field for a polygon feature class. The calculation is of the average of a field value (P_TOT_DEV) for each of a given polygon's ...
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
1answer
311 views

Manipulating distances in python. Problem with ShapeLength [on hold]

I have a question more than a problem. I'm getting the distance of a line using python with arcpy.da.SearchCursor or FeatureClassToNumPyArray. The result I get is a double. Example: arcpy.da....
0
votes
0answers
530 views

Adding HTML popup in exported PDF map? [duplicate]

I am producing some maps of a point layer using arcpy.mapping.ExportToPDF. Is there a possibility of creating HTML popup for the final PDF based on this link? http://help.arcgis.com/en/arcgisdesktop/...
5
votes
2answers
3k views

Running 64-bit background geoprocessing inside ArcMap?

I'm running ArcMap 10.2 and just set up 'ArcGIS for Desktop Background Geoprocessing (64 bit)' and now I have both the ArcGIS10.2 folder and ArcGISx6410.2 folder inside my python folder. I have ...
7
votes
1answer
2k views

Get shape filename in attribute field using field calculator

I apologize for crossposting against the ESRI geoprocessing forum, but it seems like this one gets answers. I'd like to have a modified append tool (ArcToolbox) that takes multiple shapefiles with ...
3
votes
1answer
1k views

After ArcGIS 10.2.1 update, Arcpy 64 bit import Error

I've updated my ArcGIS desktop version from 10.2 to 10.2.1 and have noticed that when I run the 64 bit version of IDLE I now get an error when trying to import arcpy: Python 2.7.3 (default, Apr 10 ...
4
votes
1answer
798 views

Has anybody used arcpy.mapping.ExportReport successfully on 64bit machine?

The online help for arcpy.mapping.ExportReport says that it has some restrictions on use but does not list 64bit machines amongst them. I am running the following test from IDLE under ArcGIS 10.1 SP1 ...
12
votes
2answers
2k views

SP1 for ArcGIS 10.1 has extension for 64-bit Python for background geoprocessing — implications for other Python use

If the 64-bit Background Geoprocessing for ArcGIS Desktop 10.1sp1 is installed how does that affect Python configuration for general use? Esri has released SP1 for the ArcGIS 10.1 product, and for ...
5
votes
1answer
53 views

Finding SDE permissions on feature class using ArcPy?

I am writing an arcpy script where an SDE feature class is removed then recreated. I need to set permissions on the recreated feature class that match the permissions before it was removed. Is there ...
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
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 ...
5
votes
3answers
3k views

Layer missing from Export to PDF from ArcPy?

I am using the arcpy module to loop through a number of map features (community areas), zoom to them, title the map with the name of the community area, and export to pdf. The trouble is that while ...
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 ...
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 ...
6
votes
6answers
3k views

How to get arcpy to work with Anaconda?

I am trying to follow the step-by-step directions in the answer to "how to separate Python installation with ArcGIS" but cannot find the path file, DTBGGP64.pth, in C:\Python27\ArcGIS10.2\Lib\site-...
5
votes
1answer
193 views

Configuration problem anaconda python in ArcGIS

I used Eclipse with PyDev to create a script in Python (windows 7 x64). My code runs perfect when I start the run in Eclipse, but when I add it as a Tool in ArcGIS 10.1, I have the following problems: ...
1
vote
2answers
35 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)?
2
votes
2answers
1k views

Using arcpy.Describe Method on Annotation layers

I'm testing layers in the current document using the Describe function. My code is: for lyr in arcpy.mapping.ListLayers(df): if(lyr.isGroupLayer == False and lyr.isRasterLayer == False): ...
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 ...
3
votes
0answers
68 views

Arcpy code only works when run in two chunks, not as one piece

I have a weird thing happening with my script. When I copy/paste it into the python cmd line within ArcMap, I get error messages. However, if I run the first part, then copy in the very last line by ...
1
vote
0answers
38 views

Feature Layer parameter showing only Polygon Shapefiles

I have created a Python Tool in ArcGIS where most of the paramaters musts be ONLY Polygon Shapefiles. You can also look on my previous question: Filter the Feature Layer parameter in Python Script ...
2
votes
0answers
158 views

Adding error message to parameter if seperate derived multivalue parameter is empty using ArcGIS tool validation? [on hold]

I have three tool parameters; an input point feature class, a (multivalue) list of fields derived from the input feature class and an output file location to export to Excel. I have filtered ...