Tagged Questions

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

learn more… | top users | synonyms (1)

1
vote
1answer
35 views

Using dynamic text elements from ArcMap in conjunction with text elements derived from Python

I have a script that cycles through features based on attributes and makes a PDF centered around each feature. I would like to be able to include both a dynamic text element for the date as well as a ...
2
votes
2answers
73 views

ArcGIS - Getting Python toolbox to function properly

as the header says, I do have a problem in getting my toolbox to function the way I want it to. In the following my parameter definition is shown, where from I would expect to get only feature classes ...
0
votes
0answers
31 views

Using ListTransformations function in ArcObjects, C# and ArcGIS Engine?

I need to call arcpy.ListTransformations function in C#. I have to pass 2 spatial References (ISpatialReference objects, I guess) and an envelope(IEnvelope object) to this function. This function ...
1
vote
0answers
44 views

Using gdal ReadAsArray or Arcpy.RasterToNumPyArray on python 2.6 32bit without it crashing

I am trying to run ReadAsArray on an entire raster and on a single band, python will crash without an error message when trying to do either. Is there a way I can create a 3d array without having to ...
0
votes
1answer
38 views

Arranging elements horizontally in ArcGIS tool

Is it possible to arrange multiple check boxes horizontally in a tool and changing the parameters dynamically (adding/removing) based on user selection of check boxes?
2
votes
1answer
33 views

Cut polygon shapefile with 2 parallel lines to derive new inside polygon?

Using Python scripting: How can I clip a polygon shapefile with parallel lines (polyline shapefile) to derive new inside polygon?
0
votes
0answers
16 views

How to disable featureset completly even draw option

I need help in developing a python tool. I have few queries in FeatureSet datatype. When i am using featureset in 10.2, it is giving options to draw on the map or to select some features from ...
1
vote
1answer
35 views

Set default projection of geometry objects in arcpy

I have a script that creates a polyline geometry from scratch using some math to generate coordinate pairs. At the same time, there is a user-defined polygon shapefile that is used to "erase" the ...
3
votes
1answer
53 views

Trying to generate a PDF for each feature in a feature class based on an attribute with Python.

I have a feature class of points that represent storm water inlets. I am trying to automate a process that does the following. finds all of the inlets that have a field called "Marker" populated ...
1
vote
0answers
27 views

Error writing defaultdict values to feature class rows

I originally posted building dictionary from feature class field values, how can I ensure there are no duplicate values per key. The goal is to update another field with all the values per key, which ...
0
votes
0answers
57 views

Python trainings comparison

My employer provides me with a generous annual training budget and I'd like to use it on one of the following two Python courses. As a GIScientist, I would like to attend the course which will give ...
2
votes
0answers
52 views

Returning distances in meters from Near (Analysis) tool of ArcGIS for Desktop?

I'm trying to write a python program that returns the distance from each point in a set to the nearest road. Specifically, I was looking for any points within 10 meters of the roads. Both sets of ...
1
vote
2answers
48 views

building dictionary from feature class field values, how can I ensure there are no duplicate values per key

I found this code sample that builds a dictionary from two fields; the end result is a concatenation of all values per key to a new field. It's a great tool except that it doesn't account for ...
0
votes
2answers
39 views

Select Layer by Attribute: SQL and variable problems

I've had a good look around the site and haven't been able able to find any 'select by attribute' questions regarding string variables and how to integrate them into an SQL statement. In my particular ...
2
votes
1answer
35 views

ERROR 001243 preventing automatic publishing of geoprocessing service

I am trying to automate the process of publishing a geoprocessing service to ArcGIS for Server 10.2.2, using a python script: import arcpy result = r"C:\data\ContourLineFunction.rlt" ...
3
votes
2answers
51 views

How to calculate the a list of rasters?

I'm writing ArcPy code in ArcGIS trying to calculate a list of rasters. I get an error message that says: TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode'. Here's my ...
2
votes
1answer
45 views

Parameter Not Being Included in Tool

I have been attempting to make a Tool within a Toolbox with four different parameters. My code consists of the following: def getParameterInfo(self): """Define parameter definitions""" # ...
2
votes
1answer
56 views

Appending feature classes from one geodatabase to another geodatabase for python

I am attempting to write a stand alone python script which will loop through the first GDB and append each feature class to its corresponding feature class in the second GDB. The error code that I ...
2
votes
2answers
90 views

Use updatcursor to replace values in multiple fields

I have spent a couple days digging through forums here, ESRI help and elsewhere and each variation of the codes I have tried has not worked. As best as I can tell this is due to my attempt to loop ...
3
votes
1answer
35 views

add-in to open automatically "data frame properties

How can created an ArcMap Python add-in using ArcGIS 10.1 to open automatically data frame properties And change the background color of another?
3
votes
0answers
33 views

Get value from Metadata in Python Script for attribute

I am working on a python script to create some feature classes from dbf tables. As part of the script I would like to pull two values (FGDC "publication date" and ArcGIS Spatial Reference ArcGIS ...
1
vote
2answers
157 views

Calculate Fields with Null Values using arcpy.da.UpdateCursor of ArcGIS for Desktop?

How do you calculate fields with null values? I have multiple fields that may have null values, that aren't being calculated in the third field. import arcpy with ...
2
votes
1answer
36 views

Performing equivalent of ArcGIS Identity_analysis (line with poly) using PostGIS?

I've got a section of arcpy code that I need to port PostGIS: Identity_analysis with the in_features being a line featureclass and the identity_features being a polygon featureclass. I'm primarily ...
2
votes
0answers
69 views

How to extract polygons from a road network?

I need to extract faces (or polygons) from my road network and calculate their areas. I mainly use Arcpy packages but even if you know it in QGIS APIs, I'd appreciate if you'd share it with me. If it ...
1
vote
1answer
32 views

Issues with FME and the ArcInfo licence

I have ArcInfo 10.2.1, Python 2.7 and FME 2013 SP4 installed on my Computer. I want to run a python script I exported from ModelBuilder (where it ran without issues) and imported in FME as shutdown ...
1
vote
2answers
38 views

How to provide a default value in an arcpy script?

How do I provide a default value like recommended in every Arcpy script? This script is exported from ModelBuilder where every output except the last one is set to temporary and managed. I want this ...
1
vote
1answer
19 views

buffer by objectid in arcpy

is there a way in Arcpy (arcgis 10.2.1) to buffer lines by selecting thier objectid? arcpy.Buffer_analysis("MY_JUNK","d:/data/ArcGIS/Default.gdb/MY_JUNK_Buffer1","10 ...
0
votes
1answer
15 views

ERROR 000539: Error running expression_NameError: name 'shape title' is not defined

I'm trying to get the title of the shapefiles or feature classes that are in a workspace (folder or GDB), into the field as a Name in python. I know this is easier in modelbuilder by adding %Name% in ...
1
vote
1answer
27 views

How to Set Label Expression Using a Long Field Type in Toolbox

What I am hoping to be able to achieve with this Tool within my Toolbox is to allow the user to input a number of layers and to set all of the labels with the same font settings (font style, color, ...
2
votes
1answer
52 views

using arcpy to get all database names within a server?

I am trying to populate a folder with ArcSDE database connection files for all the databases within a server instance. I need to be able to do this for several of our servers. Although I know within ...
0
votes
2answers
48 views

arcpy calculate string field: Any ideas what how to fix this?

I'm trying to store a string value obtained from a loop through a tuple into a field called ROW_1. The code goes like this: for creekclass in listOfClassTuples: (classname, Permanency, ...
2
votes
2answers
131 views

How can you alter label styles (font, color, size, etc.) using Python scripting? (ArcGIS 10.2)

I am trying to write a python macro that will automate the process of labeling points in a layer based on different types of apartments. For example, one style of apartments would have a blue square ...
0
votes
0answers
36 views

mxd.saveACopy(outMxd) not working

Getting an intermittent error. I'm opening an MXD, modifying, and then trying to save out with a new name. I think it's because the output MXD name is similar to the input MXD name. Note that I ...
2
votes
2answers
48 views

Python Tool Not Opening

I know that this is definitely an ambiguous question. However, I initially had my Python toolbox working great. I then wanted to have additional functionality with it and added some more coding. ...
0
votes
1answer
73 views

Avoiding ImportError: No module named numpy?

When I try to import ArcPy, I get the following message. Any help would be appreciated.
3
votes
4answers
279 views

Having trouble with 'and' 'or' statements and negative numbers

I have set up a program that calculates the relationship between a point and the first point of a polyline. The aim of the program is to run this calculation and then copy the result to a certain ...
0
votes
1answer
117 views

Python in ArcGis, cannot find what is wrong with my syntax

I am using Feature class to Feature class to batch convert some .dwg files. However python does not like the last statement (name). It's probably something very simple, any idea where I'm going ...
2
votes
2answers
31 views

Preventing ArcPy from changing MXD extent?

I want to process mxd datasources without changing the extent. When I open the MXD in ArcMap and click full extent, I get 1:214,890, after I save and re-open in ArcMap I get what I saved with. ...
1
vote
0answers
23 views

Kriging Interpolation of Daily rainfall data using ArcPy?

I want to perform the interpolation of daily rainfall data for 7 years. I am now working on python using arcpy module. I face several problems while performing interpolation Some day there is no ...
1
vote
0answers
12 views

Error 000725 importing Python (Arcpy) script into tool of standard toolbox? [duplicate]

I have created a Python script. When I run the script as a standalone by make this a hard set path instead of sys.argv1, the script really runs fine. When I import this script as a python tool box ...
5
votes
1answer
51 views

PySAL natural breaks from Numpy array

I am attempting to extract natural break values from a raster using Python. The intended process goes: Arcpy raster object to NumPy Array (using RasterToNumPyArray) to natural break values (using ...
1
vote
1answer
20 views

Including NoData zones in zonal statistics table

I am running the zonal statistic tool on a raster with a shapefile that consists of several regional polygons. I would like the zonal statistic to include the regions that are completely NoData in the ...
1
vote
1answer
21 views

Changing order of parts in multipart geometry using ArcGIS for Desktop (or ArcPy)?

Is it possible in ArcGIS to change order of the parts in multipart geometry? In the context menu i founded "insert before" , "insert after" but it never comes active ... or is it possible via ...
1
vote
0answers
35 views

User input and passing variables with ModelBuilder

I have created three modelbuilder tools that must be run in sequence. After running each tool, the user must examine several shapefiles and potentially change the input parameters of the next tool. ...
1
vote
2answers
71 views

Select points within a polygon and update attributes

This seems really simple but I can't get it to work. I have two feature classes, a polygon of sales areas for a city, and point layer of addresses. I want to select the addresses based on the sales ...
-3
votes
1answer
107 views

Exporting file geodatabase (GDB) to Folder of shapefiles?

I have a geodatabase with several feature dataset and feature classes associated with it. I want to export each feature dataset as folder and feature classes associated with each feature dataset will ...
1
vote
1answer
74 views

Importing file geodatabase (GDB) to table of contents (TOC) of ArcMap?

I have a geodatabase with several feature dataset and feature classes associated with it respectively. I would like to create a .mxd where the Table of contents consist of group layer and each group ...
1
vote
0answers
37 views

ArcPy on 64 bit Windows [duplicate]

I can't import arcpy into 64 bit Python. It works just fine in the python install from arcGIS, though. When I try to import it elsewhere, I get this error: Traceback (most recent call last): File ...
0
votes
0answers
23 views

PythonWin Debugging

My question is theoretical. I want to debug my script in Pythonwin. Everything is OK when I run my script normally (without debugging) but if I am debugging it, my script fails when it tries to read a ...
1
vote
1answer
51 views

Export Multiple Raster Data with custom Cell Size

I Have 172 Raster, and need to change the cellsize. So I use Export Data from TOC and change the cellsize manually (example I want to change it to "3") I tried using this python script to ...