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

learn more… | top users | synonyms (1)

1
vote
5answers
24 views

How to split single address field into 4 fields (House No., Direction, Name, Suffix)

I have to do some massaging of our parcel data to make it usable by a program in sheriff helicopters. The program requires one of the following address formats within the fields: Our addresses are ...
0
votes
0answers
10 views

Using TauDem Tools in Python (like Arcpy)?

This may be a completely ignorant question so have some patience. But is it possible to use TauDem tools within an Python (Arcpy) script as per the other tools in ArcGIS? When you look at the help ...
1
vote
1answer
11 views

Using update cursor with list of shapefiles

I'm still pretty new to using cursors. What I'd like to do is create a list of shapefiles. Within those shapefiles I would like to populate a field "NAME" with the shapefile name less the .shp ...
0
votes
2answers
7 views

Error 000865 when using arcpy.ASCIIToRaster_conversion

I don't know what I'm doing wrong. I always get the error 000865 when using arcpy.ASCIIToRaster_conversion. I'm new and do not have much Python experience right now – so sorry for that. >>> ...
2
votes
2answers
68 views

Loop with arcpy.ListFiles

I'm super new on here and have also not much experience with Python but I really like to learn to work with this language. I'm tying to write a script for this: I think I need a for loop instead ...
-1
votes
0answers
16 views

How to Add Polyline ID when it is created from points pair coordinates with arcpy?

The following link provide me the solution except i need to add Line ID from "Line_ID" field in same Excel. I could not make comment directly on that link to "Chad Cooper" as I am a new user here: How ...
2
votes
1answer
31 views

Using get count with if statment

Pretty simple question though I am struggling with how to operationalize this, I want to rename a shapefile based on the number of features it contains. My initial thoughts are that I would need to ...
1
vote
1answer
28 views

Import arcpy using PyScripter or IDLE gives No module named RuntimeError?

I'm trying to figure out this problem. Yesterday I installed PyScripter and since then, scripts doesn't work. When I run any script (in PyScripter or IDLE) which uses "import arcpy", I get this error ...
1
vote
1answer
49 views

How to write output from subprocess to disk (using multiprocessing)

This code was developed from another question I posted about how to kill an arcpy tool if it takes longer than a specified time. See How to cancel tool execution in python. Using the multiprocssing ...
0
votes
0answers
30 views

Fileinput error - input already in use [on hold]

I have a short script I'm using to create a feature class and then populate from a text file to create a polygon. I can create the fc ok but it hangs up on the latter part of the script with the ...
0
votes
1answer
32 views

Split a line from point but with a certain distance [duplicate]

I am using ArcGIS 10.2. I need some suggestion about this problem, maybe there is a certain tool, but I think no. I think some python code... but I do not know from where to start :( I have two ...
1
vote
1answer
52 views

Extremely slow processing time to map lat/lon data onto census shapefile with ArcPy?

I am a newcomer to ArcGIS and Python so I would greatly appreciate any and all input on this issue. What I am trying to do is very simple: map 400K business locations using lat/lon coordinates onto a ...
0
votes
1answer
31 views

How to create polygon feature class from UTM coordinates?

I am working to create a polygon from UTM coordinates. The script I am using fails with a "must be a sequence, not float" error: Traceback (most recent call last): File "F:/sample/clipTiles.py", ...
2
votes
1answer
29 views

ArcGIS Spatial Statistics: Distance to 3rd/4th/5th closest feature

We have an algorithm which requires us to produce a score based on the distance from any given cell in an output raster to a score calculated from the distances of the 3rd closest, 4th closest, and ...
1
vote
2answers
30 views

How to find the minimum pixel value within a region of interest?

I am working on a Python script for dark object subtraction, a radiometric correction method for remotely sensed data.To accomplish this, I need to find the minimum band pixel value of a waterbody ...
3
votes
2answers
31 views

ArcPy Data Access Insert Cursor not writing geometries to feature class?

I'm running ArcGIS 10.2.1 and am having troubles with the Insert Cursor in the arcpy module. I have an empty feature class in my geodatabase and have created the short script below to try and find the ...
0
votes
2answers
31 views

Export Raster Data to TIFF, BMP, or PNG File Using Python

I am writing a Python script to export a Raster Dataset to a TIFF, BMP, or PNG file, as I would manually by right-clicking on the layer, choosing Data | Export Data, and then make my choices in the ...
1
vote
0answers
18 views

arcpy fieldmappings: can't set output field name for fieldmap

I am testing out some code in the Python window of ArcGIS so that I can insert it into a standalone script later. I want to create a copy of a table and add a new field that is the result of ...
2
votes
0answers
33 views

How to check whether an optional FeatureSet parameter was set by the user in a geoprocessing script tool?

I have created a custom geoprocessing script tool which contains an optional FeatureSet parameter. When unpacking the parameters in the script, the FeatureSet is defined as a RecordSet object, even ...
1
vote
1answer
37 views

Calculating fields using a list of features

I've written some basic code which creates a new .dbf and adds two fields to it: 1 for today's date, another which should contain the names of shapefiles located in another folder. What I'd like to do ...
0
votes
1answer
26 views

List index out of range error

I've been writing a script that clips large datasets based on a selected feature. It works fine when I run it in a test workspace where only related layers are active and running. However, when I run ...
0
votes
1answer
27 views

sum of raster counts

I'm trying to get the sum of "counts" in a raster. I have the code below which can successfully read the counts of each row in raster attribute and stores the counts in a list provided below. ...
1
vote
0answers
20 views

Creating data driven pages via arcpy

We have a data driven pages enabled MXD. Refreshing this mxd in arcmap works and gives me 9000+ pages. Via python however, mxd.dataDrivenPages.pageCount returns 0. Even after ...
0
votes
0answers
30 views

how to create a shapefile containing attributes from a list?

I have a list of features and each feature is a dict in that list. following you can see the structure: [ {"FID": 0, "Shape": polyline, "Nodes": [0,1]}, {"FID": 1, "Shape": polyline, "Nodes": ...
6
votes
2answers
122 views
+50

Conflict between ArcPy and GDAL/OGR?

TL;DR I can't get an installation free version of GDAL/OGR to work from within ArcMap 10.0. I get an ImportError: DLL load failed on _mod = imp.load_module('_gdal', fp, pathname, description). ...
0
votes
1answer
47 views

ArcPy script error - NoneType object has no attribute X

I'm familiarising myself with using scripting in ArcMap 10.2 and as part of this I'm using the following to extract vertices from some polygons. ... ... import arcpy ... from arcpy import env ... ...
2
votes
3answers
101 views

Iterating using search cursor and layer selection performance?

I'm trying to use the results of a search cursor to iteratively make selections on a feature class and then create new feature classes (so you get a new feature class or shp for each unique value in a ...
0
votes
0answers
21 views

ArcPy select and merge dropping records from table?

I'm working on a python script for ArcGIS using the arcpy module. I have ArcGIS 10.1 and Python 2.7 on Windows 7 machine and using Notepad ++ and IDLE to run it. The script selects specific records ...
0
votes
4answers
45 views

Using Arcpy, how can I determine min and max elevation from a raster DEM layer within my current extent?

Using Arcpy, how can I determine min and max elevation from a raster DEM layer within my current extent? I'm currently using Data Driven Pages to centre the layout on each feature extent. I need to ...
0
votes
0answers
15 views

CreateObject cannot open map document error when cycling through list of MXDs

I have a stand alone Python script that aims to make a list of data sources from a series of folders/sub-folders full of MXDs. However I am continually getting the: CreateObject cannot open map ...
0
votes
1answer
37 views

Using a Search Cursor with a list

I'm hoping someone knows the answer to this as I am pretty new to Python. What I'm attempting to do is create a list of .dbf tables using a wildcard which I've managed to do. From there my goal is to ...
1
vote
0answers
29 views

arcpy.Describe.extent not working [closed]

I have a script using ArcPy that I used a year ago and calculates the extent of all the features in a shapefile: # -*- coding: utf-8 -*- import arcpy from arcpy.sa import * import os, os.path ...
0
votes
1answer
60 views

Summing column values in table using arcgisscripting?

I need to create a python script that sums a column's values in a table. Thereafter, the script is supposed to get the percentage of each individual row in that column and populate this percentage ...
1
vote
0answers
20 views

How to check if layers in a dataframe with Arcpy

I working on mxd (I work with ArcMap 10.2.2 & python 2.7.5.) that have 100 layers. I'm trying with python script to add layers to dataframe and check if the layers are within the dataframe. if it ...
2
votes
2answers
48 views

Duplicating polygons in Layer using ArcPy cursors?

I am trying to Duplicate some polygons in the same layer with the same attributes, But it will duplicated them with Null Geometry, i have tried getValue() method, but i got error import arcpy ...
0
votes
1answer
56 views

Create polylines from point array Python

I am working on building polylines from an array of points I have created from a csv file and am completely lost in building the lines. My code works as follows: I have the point array working, I need ...
2
votes
1answer
71 views

How would I group values in a field based on range of number using python, and then update the attribute table?

An example of what I'm trying to accomplish is described below, however they don't describe how to use the data update cursor to update the attribute column. data - Group values based on range of ...
2
votes
2answers
36 views

ArcPy Feature To Line failing on 'large' datasets?

I knew that FeatureToLine had issues with large datasets and I have seen other questions revolving around the same error, but I am completely baffled by this. Basically, this function works perfectly ...
1
vote
2answers
73 views

How to merge dbf files(zonal statistics as a table) in GIS environment.?

I am not very savvy at using Python. Actually I have around 1000 output files from using the tool zonal statistics as table in ArcGIS. The names of the files are jan_60, feb_60......dec_13. These all ...
0
votes
1answer
33 views

Spatial ETL Tools won't run “AttributeError: 'module' object has no attribute, etc.”

I have a python script that runs 5 Spatial ETL tools that I wish to run as a scheduled task. Each of the tools will run successfully from ArcCatalog and also from the ArcCatalog Command line. If I ...
0
votes
0answers
22 views

Unable to load shapefiles fully using shapefile.py

I am trying to load my shapefiles directly via Python rather than loading them from Arc Catalog to ArcMAP. I load these modules first: import sys import os import arcpy import numpy Then I add a ...
0
votes
1answer
44 views

Updating file geo database table

I have an input csv file that I process using a python script and generate a new output csv file. I then, in the same python script use Table to Table (Conversion) in order to store the data from the ...
1
vote
1answer
40 views

How do I output PolygonNeighbors into a special format?

I need Polygon Neighbors to give me data in a specific format. Every polygon should have its own line in the output. Take this, for example(it's obviously not ArcGIS formatted, but it serves the ...
0
votes
1answer
29 views

Clip a shapefile based on raster extent with high accuracy

I am trying to clip a shapefile based on the extents of a smaller raster. I find the extent of the raster using this code: Extents = arcpy.sa.Raster(MyRaster).extent` Then, I use these lines to ...
0
votes
1answer
48 views

Iterating shapefiles using ModelBuilder or Python?

What tool can I use to run many shapefiles to intersect with a shapefile as a output? It looks like that Iterate tools is use for feature classes or datasets and I don't see any for the shapefile. ...
0
votes
1answer
25 views

Setting Layer Properties Using ArcPy

I am writing an ArcPy script that creates a Point Density Raster file, and then changes the following properties in the resulting layer: Symbology Classified Classes = 10 Classification Method = ...
0
votes
1answer
31 views

count attribute in raster

I'm trying to calculate the total number of counts a raster contains using python script. When I ran the script, I didn't get any error. However, I also didn't get the number of counts for each row in ...
1
vote
1answer
41 views

sum count column in raster attribute

I am a beginner to python coding in GIS. I want to calculate the total number of counts in raster attribute table. In order to do that: I would like to build a attribute table of raster data use a ...
3
votes
2answers
37 views

Importing external bookmark (.dat) files into many MXDs using arcpy?

Does anyone know any python script to use for arcview to import a bookmark (saved as a .dat) that was created and saved externally using ArcMap? I tried with this script but without a result: import ...
0
votes
1answer
39 views

Converting Raster datasets into layers using ArcPy/ModelBuilder?

I am new to ArcGIS and ArcPy (just started using them on Wednesday). I am using a model to create a Point Density plot from a Shape File, with the output being a Raster dataset. I want to ...