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

learn more… | top users | synonyms (1)

0
votes
1answer
35 views

Using insert cursor and search cursor to clone row

I'm using the code below in order to attempt to clone a row in a feature class and add that same row to the same feature class after updating its metadata (Name, date_start, date_end, etc.) The ...
2
votes
1answer
59 views

How to start an ArcMap editing session without displaying the Editor toolbar

I'm developing a toolbar with some geoprocessing routines and digitizing functionality. On this toolbar I have implemented a "start edit" button. I want to start an edit session by clicking that ...
1
vote
0answers
18 views

ArcPy Add Graph Window

The arcpy MakeGraph_management tool suggests that a graph is stored via an in_memory representation that can be either a) added to the host app or b) saved using SaveGraph_management. I can not find ...
0
votes
0answers
5 views

ArcSDESQLExecute class and toolbox help

I'm a complete noob when it comes to python and I've got a few questions about the ArcSDESQLExecute option for calling a SP. For my setup, we ran the SP and then use a SQL execute script to execute ...
1
vote
2answers
81 views

Using Python to connect to Multiple SDE Database Connections

I am writing a script that accesses multiple sde Database connections. I have set the script to include accessing the environment workspace: import arcpy arcpy.GetParameterAsText(0) ...
2
votes
2answers
118 views

Python script to export .csv tables from GDB

I am very new to Python programming and have been tasked with writing a program to export a csv file from a file geodatabase feature class. The csv should contain only certain fields and the records ...
-1
votes
0answers
15 views

Script tool not connecting with output features correctly

I don't know if this is a problem with my script or the system in general, but everytime I try to run a script through a script tool the output features appear disconnected in the table of contents. ...
0
votes
0answers
9 views

Need help in regard to referencing a table

I'm not sure what the best way is to go about this, but here's my situation: In short, I exported a domain to a table (and I exported the table as a CSV, too, just in case it might be easier to work ...
-1
votes
0answers
30 views

kriging interpolation of many z

I have similar questions with Iterating through z-values in ModelBuilder. I want to interpolate my z's with my specific interpolation extent raster and extract each value to specific grid points (I ...
0
votes
1answer
12 views

Rank cell values across multiple grids

I have multiple grids, one for each month of a year. I would like to create a new grid for each month/year combination that the cell value is the percentile rank of that cells value in the grid stack. ...
1
vote
1answer
61 views

CAD to GDB import using ValueTable function

I have several CAD files (DWG) that I want converted to Feature Classes within a file GDB. Each feature class will be based on a polyline attribute "LAYER" value, so I have a query filter applied ...
0
votes
0answers
19 views

Multiple Z point data kriging interpolation? [duplicate]

I asked this question yesterday and is on hold because I was not specific in my question. I have added my trail code for the question. The question is kriging interpolation of many z. To be more ...
2
votes
1answer
22 views

Merge feature classes in feature datasets

I'm trying to merge a group of like feature classes which are contained within separate feature datasets. I can merge feature classes within a file geodatabase without having issues by creating a list ...
2
votes
1answer
29 views

How to get the two nearest points between two polygons

I'm trying to draw the nearest line between the nearest polygons in a Polygon dataset (ESRI Shapefile). I know that for this purpose there is the Near Tool (ArcGIS), but it just return the point TO ...
8
votes
2answers
828 views

ArcMap running scripts slower if you import Arcpy

I am finding ArcMap runs slower, if you have written a script, which imports arcpy. You may wish to write a script that can be operated in ArcMap, through the python window, or as a standalone ...
0
votes
0answers
10 views

procedurally alter dimensions of embedded Picture_Element

Theoretically, should it be possible using arcpy to alter Picture Element dimensions whose images are embedded? My attempts haven't worked. I thought to clone these as a possible workaround but those ...
1
vote
1answer
35 views

Exporting lists of Feature classes and fields from SDE

I'm using matt wilkies' arcplus module http://gis.stackexchange.com/a/5943/16793 to export a list of feature classes within an SDE database to a text file. I've also written a tool to write field ...
4
votes
4answers
558 views

How to optimise and speed up Python code?

Again my lines of surface runoff... I made a script, solving the issue when lines cross other lines. Something like generalization. Like on the picture below. The problem is that I have to solve 30 ...
0
votes
1answer
29 views

Batch create maps using arcpy.mapping

I'm trying to create .mxd and PDF outputs for a series of feature classes in an SDE. I'll need to match 2 feature classes (one original, one buffered) in the SDE based on similar file names. The ...
1
vote
1answer
46 views

one-to-many join using arcpy

I have a feature class that contains polygon features with a unique ID column. This shape-file is to be joined with a csv table that I've exported to a file geodatabase table. The unique identifier in ...
0
votes
1answer
32 views

Editing KML breaks icons

Edit: Solved it. When I was creating my new zip/kmz my code was creating various folders within the zip/kmz. Changed: NewZip.write(addedfile) to: NewZip.write(addedfile, newfl) /Edit I have KMZs ...
2
votes
4answers
127 views

raster area calculation using python script

Hi I am a beginner to python programming in GIS and am trying to calculate the area of a raster. When I ran the program, I got error message below. I am also providing my code. Any help would be ...
0
votes
3answers
79 views

UpdateCursor 'is not defined' Python

I have several files (shapefiles). Table 1 has only one row with several fields whereas Table 2 has several rows. What I want is to take a value from Table 1 and populate all rows in Table 2. I used a ...
1
vote
1answer
40 views

SearchCursor returns strange value

my searchCursor look like this. arcpy.env.workspace = "C:\\Users\\Documents\\Scoring\\Ecodis_clip_split" #set workspace to folder with values eco = arcpy.SearchCursor ("NAME.shp", "", "", "area_ha", ...
3
votes
1answer
36 views

Which parameter data type is used in the Integrate geoprocessing tool for ranking?

I'm trying to figure out which parameter data type is used in, for example, the Integrate geoprocessing tool. It looks like this: I'd like to use it in a geoprocessing tool I'm making, but can't ...
1
vote
1answer
64 views

Executing tool comes back with an error arcpy.JoinField_management

I have this script snippet, written by Aaron. import arcpy import os #set workspace arcpy.env.workspace = "C:\\Users\\Documents\\Wetland\\New_Folder" #in the folder "New_Folder" is a geodatabase ...
3
votes
1answer
43 views

Does Avenue equivalent of pointPosition exist in ArcGIS 10.2?

There were a couple of awesome methods in Avenue for ArcView: point=polyline.Along(percentage) percentage=polyLine.pointPosition(point) Don't laugh, but one of the reasons I updated to 10 from 9, ...
0
votes
1answer
26 views

Geoprocessing service failure

I have a python script tool that I have published to a geoprocessing service. Every time I run the service it fails. Here's what I'm getting for errors: The python code in the tool is below: ...
1
vote
1answer
31 views

Con() does not recognize raster values

I have a problem when using the con() argument. What I want to do is to remap all raster of a raster file ("Red_SL") cells with values larger than 40 to the new value 5. All other values should be ...
0
votes
0answers
34 views

Unable to load shapefile as feature class into geodatabase file, with only 3 of the fields

I'm trying to automate importing census boundary shapefiles to feature class in a Geodatabase File, but somehow could not get it to work with this code: ### ======================== load boundary ...
0
votes
2answers
34 views

Check layer data type in gdb

I have path to layer or feature C:\base.gdb\test How to check is table or feature class by arcpy?
1
vote
2answers
47 views

How to use the 'if' function to set field value based on various other field values

I am trying to populate a field with a value from another field in the same row, the condition I have set for this to take place is if a third field is equal to 0. In order to achieve this I have ...
1
vote
1answer
22 views

Iso Cluster tool in script failing to open clip raster

I have been coding in Python for only a few months, so maybe I'm just overlooking a minor detail as a newbie. I have written the script below for a class project. It is supposed to clip two rasters, ...
1
vote
2answers
44 views

Create a table with open() in a loop using the SearchCursor and InsertCursor

I like to create a table with open() in a loop using the SearchCursor and InsertCursor, but I don't know how. Before I used a few geoprocessing tools to get a field for percent. The Attributtable of ...
1
vote
1answer
55 views

Calculating travel time from residential points to stores via public transit using ArcGIS for Desktop?

I don't know how to summarize it in just one title, but here is the problem: My goal is to calculate the travel time from residential points to stores via public transit. Basically this period of ...
8
votes
2answers
226 views

How is the data access cursor performance so enhanced compared to previous versions?

The data access module was introduced with ArcGIS version 10.1. ESRI describes the data access module as follows (source): The data access module, arcpy.da, is a Python module for working with ...
3
votes
2answers
249 views

Multiprocessing issues with ArcPy

I am using ArcGIS 'watershed' routine in a script which makes use of multiprocessing. This works fine, but during execution I get the message: Unable to remove directory. Possible causes: 1- Not ...
0
votes
1answer
36 views

How to add multiple feature classes from TOC as input by Model Builder?

I am tasked to create a tool using Model Builder. The tool requires input of multiple feature classes that are added in the Table of Contents of ArcMap. The user will then be able to select multiple ...
1
vote
1answer
27 views

RESTful Geoprocessing Service Request returns empty Result object without errors

This is a bit difficult for anyone here to test as our ArcGIS Server 10.2 instance is behind a firewall. I'll try to present all the necessary information, but feel free to ask for more and I'll ...
1
vote
2answers
28 views

Debugging SQL in arcpy.da.SearchCursor RuntimeError: An invalid SQL statement was used?

I am going through a python script in arcpy 10.1 to Select a field value (i.e. NEAR_DIST) based on three condition as 1) NEAR_DIST<=radius(i.e.500 or anything from user input) 2) ...
1
vote
2answers
42 views

Error 000732 - input raster does not exist when implementing script tool arcpy

I am trying to implement a script tool in ArcGIS 10 that completes a few equations with raster datasets. I seem to be getting the same error no matter what I try: <type ...
2
votes
1answer
82 views

Map algebra for loop

I have never coded in Python before and I am trying to loop a simple map algebra equation across 365 rasters. I am trying to calculate total water flow over cells but in the raster I have a negative ...
1
vote
1answer
36 views

raster to polygon conversion

I 'm trying to automate the conversion of raster to polygon and the rasters files are in "TIF" format which is a "unsigned integer". I have the code below. However, I 'm getting an error while ...
1
vote
0answers
41 views

ArcPy Multiprocessing 000714 - Working in Debug Mode

In an attempt to render an interactive window via matplotlib I am using an out of process script in a toolbox. If I debug the script, it is possible to step through and render the window as expected. ...
1
vote
0answers
31 views

How do you duplicate a point within a shapefile using Python?

How do you duplicate a point within a single feature class using Python? I have a partial sample script below, but in a nutshell, I want to duplicate a point, copy it into the same shapefile, and ...
2
votes
2answers
33 views

Selection of lines that lays mostly in defined zone (majority overlap)

I have lines of surface runoff and I need to select the ones that are lying mostly in internal buffer of polygon. I'm trying to make some script in python, but it's very important to make the script ...
7
votes
2answers
185 views

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). ...
3
votes
1answer
227 views

How come “Zoom to Polygon” always puts me in the middle of Nebraska?

This is an issue related to this question I'd asked a few days ago. I've got that code working, to an extent. Every time, though, that I double click on one of the Polygons in the attribute table that ...
5
votes
1answer
2k views

Lidar - Automated building extraction (Improve Process)

I have the following process for automatically creating building outlines/footprints from Las files and was wondering if anyone can help improve it or has suggestions for other processes to use? ...
7
votes
1answer
878 views

Inserting newlines in Rectangle Text elements via ArcPy causes overlap?

I ran across an issue the other day when I tried to use ArcPython's mapping module to edit rectangle text elements with newlines (\n) in an ArcMap document. Here's what the output looked like: ...