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

learn more… | top users | synonyms (1)

6
votes
1answer
338 views

Accessing graph in ArcMap document using ArcPy?

I am trying to access an existing graph in an ArcMap document with arcpy. I know how to create a new graph with arcpy, but I cannot seem to figure out how to access an existing graph in an ArcMap ...
3
votes
1answer
405 views

Arcgis -> python -> ctypes -> c++ dll tool cancels itself, why?

Since optimizing my python-ctypes-dll based geoprocessing tool, it seems to cancel itself a lot. Followed by arcmap reporting a pure virtual function call (which is odd, because you'd think any such ...
3
votes
1answer
120 views

Are there any alternatives to ArcGIS Locator Report?

I'm a pretty new GIS programmer and I've found ArcGIS/Arcpy to be extremely unstable. I'm trying to run a Locator Report in arcpy with no success. I'm wondering if there are any other alternatives? ...
7
votes
5answers
664 views

python.multiprocessing and “FATAL ERROR (INFADI) MISSING DIRECTORY”

While trying to do multiprocessing with arcpy, I am occasionally running into this error: FATAL ERROR (INFADI) MISSING DIRECTORY I have no clue what is triggering this error, and it crashes the ...
4
votes
1answer
527 views

Can you use arcpy.RasterToNumPyArray() to Graph a Raster with matplotlib?

Can you use arcpy.RasterToNumPyArray() to Graph a Raster with matplotlib? I'm looking to graph a raster with X, Y, and Z values in a 3D bar graph. I just can't seem to translate the numpy array to ...
8
votes
4answers
2k views

How to create arcs between two points in Python?

I've been working on an python script automating the visualization of live point data. I have a table with two coordinate pairs. I'd like to connect these two point with an arc of a circle or similar ...
5
votes
1answer
2k views

Create a definition query for groups of layers: Is it possible?

I have a large number of groups created, with each group having many layers. I have looked for a way to set a definition query for all the layers in each group but haven't found anything. Is it even ...
1
vote
1answer
709 views

Hotlink vector/raster files to open in current workspace in ArcGIS 10 similar to Mapinfo

I want to add datasets to ArcMap and place them in a particular group layer by simply clicking on hotlinked polygons in a shape file. The same process is easy in MapInfo and I want to implement the ...
2
votes
1answer
316 views

Why does “takes no arguments” error propagate from Arcpy example?

I was attempting to run Setup_Customers_Using_Tabular_Data , I modified the paths to fit my environment but when I run the program I receive SetupCustomersByTable() takes no arguments (6 given) ...
3
votes
1answer
1k views

Referencing Feature Dataset in File Geodatabase with ArcPy

It's probably an obvious one but since I'm new to arcpy I'd appreciate any help. I'm trying to develop an arcpy script which will eventually loop through number of rasters and feature classes stored ...
1
vote
2answers
318 views

How to match two feature classes with same geography and use part of the name of one to name the other

So I have a polygon feature classes with unique identifying names to them that I want to use to rename some other feature classes that are of the point feature type and have the same geography of one ...
1
vote
2answers
640 views

arcpy.sa.Viewshed with OFFSETA

This is using ArcGIS10 arcpy with spatial analyst. I need to call Viewshed, but with an observer height set. I have tried using a Z-aware point feature set, but that only throws an error. I am ...
5
votes
4answers
6k views

How to use Arcpy UpdateCursor to update a field?

This should be simple but I've spent days trying everything to get it to work. I need to update a field in a layer based on two other fields. I can't even get it to update based on one field. Could ...
5
votes
4answers
2k views

Automate Projection of multiple shp files using ArcPy

I have been trying to create a Python script that will convert all shape files within a folder from GCS WGS 84 to Web Mercator. Below is the code I have so far but what I'm struggling with is how to ...
4
votes
2answers
2k views

ArcGIS 10.0/arcpy: How to create a polygon geometry from inner and outer ring point arrays?

I have two arrays, each containing a closed ring of points, one for an outer ring and the other for an inner ring, the latter running counterclockwise, of course. I am using the arcpy.Polygon() ...
2
votes
1answer
742 views

How to rename feature classes based on field values within the attribute table?

My goal is to iterate through several feature classes and rename each feature class based on a field value within the feature class's attribute table. These feature classes are a single polygon ...
4
votes
2answers
853 views

How to setup PyCharm to reference ArcPy?

How would I setup PyCharm to recognize import ArcPy? I'd like to use PyCharm to develop and debug geoprocessing tool.
1
vote
0answers
52 views

What are the steps to go from raw address data to a locator report? [closed]

I'm a seasoned programmer, but I'm new to GIS in general. I've read a decent amount of ArcPY documentation but haven't seen an example that takes me from raw data to a locator report, from start to ...
3
votes
1answer
980 views

Can ArcPy test for availability of SDE Connection before trying to use it?

In a Python script that I use to publish ArcGIS 10.0 Geoprocessing Services I have some code: arcpy.AddMessage("If process hangs here, check for ArcSDE connections issue by trying to open " + mapFile ...
1
vote
0answers
668 views

ArcGIS 10.0/arcpy: Can't retrieve the points in a polyline geometry obect: any idea why?

My arcpy script builds a Python dictionary, dictCLPnts, that holds the geometry objects of a polyline feature class. The following code snippet shows the attempt to access the geometry object with ...
1
vote
2answers
1k views

Getting print statements in Python script to print through a batch file

I'm starting to learn Python and batch files. I have a Python script which selects data by location and exports the selection to a new feature class. The script runs just fine - included in this ...
0
votes
1answer
1k views

Create TIN from Elevation Points in Python

I want create a TIN from point features with elevation using a python script. This is my script: import arcpy from arcpy import env import json as simplejson import urllib import sys,os ...
5
votes
2answers
2k views

Efficiency of python script using SAGA and arcpy

=== SUMMARY === I have created a process to import a LAS point cloud, clip it, select the ground points and save the output as an XYZ.txt for clients to use. This uses a python based script (will ...
2
votes
2answers
374 views

how to calculate a field from a shp currently sected in a arcmap session using a Python script in ArcMap 10?

Hi I nedd to create a script in Python for use in ArcMap 10. This script must be able to calculate a field from the shp currently selected in ArcMap. Any ideas?, I'm new to Python so any code example ...
0
votes
1answer
860 views

It is possible to edit selected features with Python?

I'm trying to edit some fields of the selected features in ArcMap. It's possible to do this with Python (ArcPy)?
1
vote
1answer
393 views

Issues with defining projection to that of the current root file

I am creating a shp file with the extent of all the raster file in a set of directories and it works fine when all the rasters are in the same projection but not when they switch around. So I want to ...
3
votes
1answer
628 views

Strange Behavior in Focal Statistics

I am trying to calculate the maximum value in a neighborhood on a raster using the Focal Statistics tool for Spatial Analyst in ArcGIS 10. Using python, I loop though several different radii, with ...
0
votes
1answer
174 views

How do I assign a variable to a SQL Server ArcSDE database's feature class?

I'm using ArcGIS Desktop 10 and have no experience using Python with a SQL Server ArcSDE database. When using a shp file or file gdb it is very simple to reference a given feature class by simply ...
12
votes
3answers
3k views

How do I use sys.exit(0) in an arcpy script to exit early without having an error message show up?

I have an arcpy tool script for ArcGIS 10.0 that has two major functional sections. The user can choose whether or not to run the second section. If the user chooses NOT to run the second section, I ...
7
votes
2answers
634 views

Reordering polygon shapefile permanently?

I've written a script which produces a polygon shapefile of the extents of all the thousands of rasters in our library. I want to organise the FID so that the files with the largest extents are on the ...
1
vote
0answers
145 views

Arcpy problems regarding convertToMSD() Function

I am having trouble getting the ConvertToMSD Function to work. Technically it works, but not in the long run of my script. I use the converttomsd function to create an msd. I then publish this msd as ...
3
votes
1answer
2k views

How do I 'select' using ArcPy?

When using a cursor to loop through an attribute table, is it possible to iteratively select each row? I want to clip a line to a polygon grid (see previous question); due to the size of the grid the ...
3
votes
2answers
780 views

How to read MapInfo .tab files in ArcPy?

I want to use arcpy (the ESRI install of python 2.65) to analyse tab files...can this be done directly or do I need to convert them to shp files...if so would it be possible to do something like ...
6
votes
1answer
1k views

arcpy: Compare extents of rasters

I am writing a script that takes an input of an Area of Interest (AOI) and then walks through the base directories to find any file that has an extent that intersects with the AOI, clip it and ...
4
votes
1answer
1k views

Create overlapping polygons from contour lines

Working in ArcGIS 10, I have a set of contour lines representing density of commercial square footage, and I have a set of points representing local maxima for each peak of the dataset. For each ...
6
votes
1answer
3k views

In an arcpy script, how do I convert ArcGIS date value to a string reading in mm/dd/yyyy format?

I am writing an arcpy tool script in ArcGIS 10.0. In a fGDB feature class, I have a Date type field. I gather that the values in the Date field are stored as long integer dates, but they display in ...
4
votes
2answers
3k views

arcpy, “.lyr” file to shapefile or raster

i am using arcgis server 10 and python 2.6.5. i have created a "test.lyr" file, now i wanted to convert it either to shape file or raster file. i have created the "test.lyr" from "test0.tif" and ...
3
votes
2answers
614 views

Arcpy: print to PDF with Vector shapefiles, text etc

I have a small python script which exports a set of data driven pages to PDF. This works fine, including appending each page to an 'all' pdf. My issue is that it creates rasters of each layer in the ...
7
votes
1answer
236 views

Efficient Network Neighbors?

I would like to identify the Kth order neighbors of an edge on a network, specifically the neighbors of a large set of streets. For example, I have a street that I'm interested in looking at, call ...
1
vote
2answers
739 views

What changes will be made to arcpy in ArcGIS 10.1? [closed]

I heard that two big changes to arcpy will be add-ins and new, faster cursors. Also, new features include "the ability to administer your enterprsie geodatabase (ArcSDE) using Python scripting" and ...
4
votes
3answers
5k views

ArcGIS 10/arcpy: Help needed with syntax for CalculateField_management in Python script

I need to use CalculateField_management in a Python script, and the calc expression needs to concatenate a runtime variable, a string, and a field (string) value. I have searched all over for ...
3
votes
5answers
2k views

arcpy : Add Raster Layer layer without lyr file

i wonder how i can add a raster layer to a remote (not the current) mxd file with arcpy. I need to not use a lyr file for that. For vector Layer i have the following lines working fine : mxdPath = ...
12
votes
4answers
4k views

Quickest way to select polygon by point in ArcGIS Desktop using ArcPy?

I keep thinking that I must be missing something, but there does not seem to be a tool in ArcGIS 10 to select features (in particular polygons) from a layer at a point (X,Y) location via ArcPy. The ...
2
votes
2answers
1k views

ArcPy Changing Spatial Database Connection

hi we have conveyed our some servers which has ArcGIS application and SDE on it to another server and its ip has changed. now when i want to open my .mxd file it tries to connect remote SDE with old ...
8
votes
2answers
865 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 ...
1
vote
2answers
3k views

Get extent of Georeferenced Rasters in Python and output to polygon shapefile

I would like to create a shape file containing the extents of each of the rasters in a directory. Is it possible to capture the extent of a raster using Python? I have tried ...
2
votes
0answers
613 views

Perfectly running python script gives error when run from web.py

I have the following python script which runs perfectly if run separately: import arcpy val = arcpy.GetCellValue_management("D:\dem-merged\lidar_wsg84", "-95.090174910630012 29.973962146120652", ...
4
votes
2answers
686 views

arcgis 10, python update raster of mxd file

i wanted to update the raster file in a mxd file using python. for example, i created a.mxd which contains b.tif file in it. now, i obtained c.tif and want to update the a.mxd, i.e. want to delete ...
3
votes
3answers
1k views

How could I label features and convert them to annotations with arcpy?

how could I do the following steps with arcpy: right-click on the layer with the features Label Features Convert Labels to Annotations ... The annotions should be saved in a new shapefile. How ...
1
vote
4answers
1k views

Install other python distributions [e.g. Python(x,y)] on top of ArcGIS installation ?

I'm using ArcGIS 10 and would like to use various additional libraries that are not included in the delivered version of ArcGIS (esp. numpy and matplotlib). First I tried to install them manually as ...