A site-package created by Esri to expose ArcObjects to Python.

learn more… | top users | synonyms (1)

0
votes
1answer
59 views

Adding Maximum and Minimum Latitude and Longitude as features in ArcGIS for Desktop?

I have an Excel file with the coordinates (Latitude/Longitude) for an area. The file contains the coordinate of two corners in the latitude/longitude format. How can we do to use Python to iterate ...
0
votes
0answers
15 views

What's a python script to get count of attributes in feature class? [duplicate]

I would like to count the number of attributes in my feature class with python.
2
votes
1answer
44 views

How can I extract the data showed in Version Changes before reconcile/post process?

I want to make a script in python to extract the data about version changes before make the reconcile/post process. Is that possible? I trying to avoid use C# or VB script.
4
votes
2answers
107 views

Selecting points on one side of the road

I am a newby in python scripting in GIS. I have 2 shapefile: first one with roads and second one with points that contains address number and street name. I want to select these points from right ...
2
votes
1answer
83 views

import arcgisscripting gives ImportError: DLL load failed: %1 is not a valid Win32 application

i am trying to import arcgisscripting and getting following error. Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import arcgisscripting ImportError: DLL ...
0
votes
0answers
25 views

How to generate histograms of multiple fields?

I have a large shapefile and I'm trying to automate a process to generate histograms of several fields with the MakeGraph tool, but I'm receiving the following error. class ...
2
votes
3answers
76 views

Insert layer file to MXDs with multiple data frames using ArcPy?

I have 4 mxd's and I want to insert layer file to each mxd with position in the TOC. Each mxd has 3 and more data frame. I don't know why it does't work. I'm trying this code: import arcpy,os,sys ...
2
votes
3answers
66 views

Remove layer file from MXDs with multiple data frames using ArcPy?

I have a bunch of mxd's and I want to remove layer file from them. Each mxd has 2 and more data frame. I don't know why it does not remove. I'm trying this code: import arcpy,os,sys,string import ...
1
vote
0answers
132 views

ArcMap “One or more layers failed to draw: An invalid SQL statement was used”

I created a model involving the tool Make XY Event Layer because I want to plot latitude and longitude points in CSV file columns. The model runs without errors and appears to have plotted the points ...
0
votes
0answers
51 views

Python script suddenly freezes and start to consume memory

I have a Python 2.7 script that generates multiple polygons around certain polygon (see picture). The meaning is determinate the effectivity of windbreaks. I don't know if my solution for this problem ...
3
votes
0answers
76 views

SetNull in Python script for Arcgis assign 0 value

I am writing a script in Python where I assign to few Tiff defined in a function as inputRaster a NoData value as follows: whereClauseSetNull = "VALUE > 100" outSetNull = SetNull(inputRaster, ...
1
vote
1answer
39 views

Change Data Source of Raster Layer Added to Map Display? Unexpected default

I have a script that I'm using to generate raster maps and automatically add them to the map display, but when they are added they are sourced to a temporary location. I use the same code for ...
2
votes
2answers
59 views

ArcGIS 10.2 : How to prompt a “parameter window” during the execution of a script tool (or model)

I am pretty new to ArcGis and ArcPy, so I apologize if my question seems straightforward. However, I have been looking on the web for quite a while and didn't find any answer so far. I am using ArcGis ...
1
vote
1answer
103 views

ArcPy SearchCursor getValue leads to NoneType object has no attribute lstrip?

I am having a little bit of a dilemma. I am having a problem with using getValue() and striping the value that is returned. For instance, take the following code. import arcpy as ap mxd = ...
1
vote
1answer
21 views

Trouble inserting name of feature in TOC into attribute table using arcpy.calculateField

I currently have about fifty rivers and creeks in a map, and none of the features contain the name of the waterbody. However, the features are named correctly in the table of contents Ideally, I ...
1
vote
0answers
37 views

set extent for jpeg programmatically

I feel like this should be easy, but how can I set coordinates for a jpeg image using Python? I have a python add-in that draws a polygon and then uses its geometry to post a query request to a REST ...
3
votes
0answers
61 views

arcpy.mapping.ExportToTIFF fails to render layer?

Has anyone else had this problem? I have an mxd file with two layers in it, one of which is fairly 'heavy' (i.e. takes a minute or so to draw). All layers are visible by default. I have the ...
4
votes
2answers
151 views

Why does arcpy.da.SearchCursor() class not autocomplete within Eclipse?

I am very new to GIS. I just installed eclipse luna with pydev plug-in and ArcGIS 10.1 for Desktop. When I write a script, trying to import arcpy.da.SearchCursor I see that no SearchCursor is ...
2
votes
1answer
106 views

How I can do event with two clicks using python add-in wizard?

How I can do event with two clicks using python add-in wizard, I have found a way to do event with one click by adding a New Tool in the wizard, but I need "first click To copy the attributes from ...
0
votes
1answer
22 views

Problem in adding raster layer from arcpy

I am using the following code to add the raster layer using arcpy in arcmap def AddRasterLayer(path,layerName): layer=os.path.join(path,'new'+str(layerName)+'.lyr') ...
1
vote
2answers
48 views

How to change field defined as REQUIRED to NON_REQUIRED in ArcGIS Geodatabase

I have created some feature classes in a geodatabase and also some fields using this sample code: arcpy.AddField_management("schools", "ref_ID", "LONG", 9, "", "", "refcode", "NULLABLE", "REQUIRED") ...
0
votes
1answer
46 views

Tools/Software for QA/QC of data

I currently have written a few custom scripts that run basic checks (null values, geocoding errors, fullness of metadata) using Arcpy(10.2 with almost all licenses) and gdal. I'm interested to know ...
2
votes
0answers
142 views

Using arcpy.da.editor on a transactional version raising errors

I've run up against a wall trying to get an edit session to work on a version. These are the scenarios Ive gone through in the code and their error mesages: Setting up an edit session not as a ...
3
votes
1answer
35 views

ArcPy Slope Script - Trouble Saving

I have an ArcPy script that applies the slope function to raster files in ArcGIS. I tried running the script with two raster files in the table of contents, and the script runs, but only saves one ...
2
votes
0answers
58 views

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

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 ...
0
votes
0answers
22 views

buffering one feature class by different distance, the result is the buffer distance become same 100 feet.

try: # Import modules import arcpy from arcpy import env # Set the workspace env.workspace = r"C:\Esripresspython\GISTPython\Data\City of Oleander.gdb" # Create a variable with the name of ...
1
vote
2answers
38 views

Automating procedure to add shapefile to multiple map templates using ArcPy?

I have a project that has me create a package of about a dozen maps for a client and I do this multiple times per week. I am trying to figure out if there is a way to automate this with python. I am ...
1
vote
1answer
48 views

slow Python script pulling from an iSeries database

I've converted and updated some python scripts that exported data from an iSeries database (HTE) to Access to export the same data to a fgdb. My biggest issue is the time it's taking to export the ...
4
votes
2answers
114 views

Best way to get a bounding polygon of all features in a file .gdb

I have an arcpy script that dynamically creates a filegeodatabase and its featureclasses from uploaded spatial data, currently point and line features and possibly polygons in the future. I am ...
1
vote
1answer
93 views

ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Layer Name or Table View: Dataset L does not exist

Hi I am trying to create a loop so that each layer is produced in its own map. This is my code: import arcpy path = "C:\Users\Et\Documents\ArcGIS\Default.gdb" mxd=arcpy.mapping.MapDocument(path ...
1
vote
1answer
35 views

Wrong coordinates after Usage of NumPyArrayToRaster(…)

My Project I am currently working at should enable cellvalue manipulation on raster files using ArcPy. My Script works fine except I am not getting the right Y-Values (northing values) for the ...
3
votes
0answers
87 views

Select and copy attributes features in ArcMap using Python add-in tool?

I'm trying to add a tool to an add-in toolbar to select features from an existing feature class and copy attributes to another feature class,from point to point. TopoHeight_Field_Name='Comment' def ...
4
votes
1answer
85 views

SQL-query in arcpy - SELECT WHERE feature between two values

I need to select features between two values in python with arcpy. However, whenever I try to run the code below, it returns with error message "An invalid SQL statement was used". whereclause = ...
2
votes
1answer
186 views

Error with da.UpdateCursor and SDE feature classes

I am making my first attempt at editing an ArcSDE feature class with python through a da.UpdateCursor. I'm essentially taking code I've written for a file geodatabase feature class and applying it to ...
2
votes
1answer
39 views

Arcpy PointGeometry does not carry forward the ID

I used this as starting point I have the following code: Test data data = numpy.array([(0, 51.1047664, -114.3722785, 1205, ...
0
votes
1answer
74 views

How to list attributes in a field using Python?

I'm using ArcGis 10.2.2 and I'm creating a model in ModelBuilder. I want to know how I can list the attributes of a field and then make a selection for each unique attribute using Python. I have a ...
3
votes
1answer
141 views

ArcGIS 10. Convert dbf to csv or similar in ArcPy without cursors

I have many dbf's created by the Spatial Analyst Sample tool. I would like to convert those dbf's into csv's or space delimited (or any text for that matter). I can't seem to find the ArcPy equivalent ...
2
votes
1answer
68 views

How to use the tool “Polygon to Raster” with arcpy when the polygon is a row from a Shapefile?

I tried to iterate over the rows from a Shapefile with the search cursor. Every row is a polygon and I want to make a raster out of this polygon so I tried this with arcpy.PolygonToRaster_conversion. ...
2
votes
0answers
32 views

A list of layer names that you want to be turned off when Layers name are in Right to Left Such as persian

When I ran this code I got "UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal" error I don't know why I tried many way but I ...
1
vote
2answers
37 views

How to read page size from a MapDocument object

I hope this isn't a duplicate question, I have had a look but couldn't find an answer. I have a set of 30 MXD's with different page size. I would like to export maps with their name file which include ...
3
votes
1answer
42 views

Clearing data frame projection of current mxd using ArcPy?

I am required to open a bunch (50 per week) of mxd's and 'Clear' the Coordinate system from the data-frame to make sure my students have all of their data projected in the same (correct) Coordinate ...
1
vote
2answers
58 views

Specify a GDB feature class using Python Tkinter dialogue box

I tried to specify a feature class from a GDB dataset through Python Tkinter tkFileDialog.askopenfilename. Below is the script. It worked for me in the past when I was dealing with .txt or .las files. ...
0
votes
1answer
39 views

Error Applying Symbology to Shapefiles

I'm trying to apply symbology to my dataset after it is populated to the map display, but I am getting the following error. Have I placed the ApplySymbologyFromLayer code incorrectly? Traceback ...
0
votes
2answers
29 views

Con function loop doesn't calculate for all the fifty rasters in a list

I have been trying this for hours and I know it should be easy but I can't make it work yet. I have a list of 50 rasters that I need to change the NoData to "0" values. I have the right arcpy ...
1
vote
1answer
40 views

Add Layers to Map Display from script with default symbology

I have a script that runs IDW iterations and I'd like for the files to be automatically added to the map display after they are produced and contain the default symbology that ArcMap generates when ...
0
votes
1answer
56 views

Convert python from arcpy.da.SearchCursor to work in 10.0

I am using code such as for row in arcpy.da.SearchCursor(polyFC, ["SHAPE@"], spatial_reference=SR): # create inner buffer polyBuff = row[0].buffer(buffNum * -1) # create hull rectangle to ...
1
vote
0answers
70 views

Mosaic many rasters in ArcGIS is slow

I am trying to merge 166 tiles into a single world raster (500 meters resolution) through ArcGis "Mosaic to new raster" tool with a simple Python script. The process seems incredibly slow. Before ...
2
votes
1answer
36 views

Clip_Management seems to delete shapefile?

We have some python code that clips a very large shapefile for further processing. We can see the process create all the output files, but then just as the process is finishing, they get deleted. ...
4
votes
2answers
85 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 ...
2
votes
1answer
57 views

Combining duplicate points while preserving their associated attributes

I'm working with building routes for a lit of technician's stops. In some cases, they have two "stops" at the same customer location -- turning on two types of service at a house, for example, is ...