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

learn more… | top users | synonyms (1)

1
vote
0answers
132 views

Composite bands produces a single band image

Running this produces a single band tif and not a three band image. Has anyone seen this before or can suggest ways to trouble shoot it? Input_Rasters = path + parentdir + "/" + dir + "/" + ...
1
vote
0answers
57 views

Obtain virtual output directory path in geoprocessing service

I am publishing a geoprocessing service and I want to be able to access the virtual output directory path configured for the service. Now I know that gp services will magically return virtual paths ...
1
vote
0answers
38 views

How to find out which layer had a Selection made on it? [duplicate]

If the user makes a select using arcpy.SelectByAttribute() or arcpy.SelectByLocation() how do you find out which layer they made the select so you can use arcpy.SearchCursor(layer)?
1
vote
0answers
284 views

Arcpy Spatial Join Running Extremely Slow [closed]

I have a simple arcpy script that runs a series of spatial joins. However, the script is running extremely slow: one set of joins takes over 12 hours. There are a few for loops, but I have timed these ...
1
vote
0answers
83 views

Why might ArcPy, TableToTable, MakeQueryTable and ArcSDE have performance issue in IDLE?

I have written a Python script tool to do: Make Query Table Table To Table (with fieldmapping). The code is nothing more than arcpy.MakeQueryTable("table1;table2;table3", ...
1
vote
0answers
189 views

merge_management

Here is the edited code: import arcpy import os from arcpy import env set the environment settings env.workspace = "C:\RG\Kings County\Test.gdb" fcs = arcpy.ListFeatureClasses("Sub_NVF_*") ...
1
vote
0answers
89 views

Import related CSVs to geodatabase without losing foreign key relationships

For various reasons I understand it is poor practice to rely upon OBJECTID fields to relate different tables together using a relationship class. Therefore, I have a series of several tables related ...
1
vote
1answer
750 views

Calculate coordinates of centroid in arcgis using python

I have polygon features and want to calculate coordinates of it's centroids in arcgis using python - all goes fine, but it gives me coordinates in meters and not in degrees as i want. Here is the ...
1
vote
0answers
168 views

How to compare files in two folders? [closed]

I'm pretty new user of ArcGIS. My intention is compare files (csv) from one folder with files in another folders. In those folders exist files with the same name but in second folder files have ...
1
vote
0answers
129 views

New python GIS Programmer : Fundamentals of the Python Language for ArcGIS [closed]

I am new to programming and I'm trying to learn "Fundamentals of the Python Language for ArcGIS" and then I've been trying to compile an example code but python GUI keeps throwing throwing this error ...
1
vote
0answers
91 views

Get values from select by location to append to table

I'm trying to calculate the road frontage of polygons by converting polygons to lines and splitting in their vertices, then using select by location to find lines that are within 7.5 meters of the ...
1
vote
0answers
69 views

Convert polygon feature to line feature

I have a polygon shape-file i need to extract the line segments where the polygon features intersect each other and also the segment where they don't. Can we automate this process or can scripting ...
1
vote
0answers
127 views

What is a good way to cluster point data by item counts in ArcGIS?

I have point features that have as an attribute an asset count. For instance, point A may have 3 assets whereas point B may have 300 assets. My goal is to have each point be in two categories: ...
1
vote
0answers
204 views

Change ArcGIS Server mapservice properties programmatically

I am weekly caching my ArcGIS Server mapservice tiles with help of a python script using the arcpy.ManageMapServerCacheTiles_server() command (ArcGIS 10.0, SP5). For whatever reason, this script fails ...
1
vote
0answers
105 views

Use ArcPy to identify annotation reference scale?

I would like to retrieve the value of an annotation feature class reference scale using ArcPy (under ArcGIS 10.1). I cannot find where this property is stored (tried to access using the describe ...
1
vote
0answers
151 views

Need help using FieldMappings object with Append_management in Python [closed]

I have a fairly large script that I'm reworking. The script is manipulating tables with 50 or so fields. (I will be cleaning some of these up to reduce the number.) Toward the end of my script I call ...
1
vote
1answer
55 views

ArcMap ArcPy - Place signs with no lat/lng on map

I'm new to ArcPy and ArcMap but I do have programming experience. What I am trying to accomplish is to take over 22,000 signs from a database and place them on a map in reference to a street layer ...
1
vote
0answers
61 views

Insert last coordinates from a list of coordinates with line ID into a multipart polyline feature class

I'm having problems creating the last line from a list of coordinates that I have. I have a text file with coordinate data with a X, Y, and a Line ID (LID). I read the file and inserted each ...
1
vote
0answers
49 views

Creating sign locations from an existing database with offset & dist to nearest intersection (buffer analysis)?

I have a database of 22,000+ signs that contains the offset from centerline along with a distance to/from the edge of pavement to a specific intersecting road for each sign. I also have a street ...
1
vote
0answers
269 views

Arc10.1: intermittent Error using arcpy.Delete() on temporary rasters

I've been pulling my hair out with an intermittent error when running from either the MS-DOS prompt, PyScripter, or WingIDE. Haven't bothered to check w/in Desktop apps (but a colleague says it's the ...
1
vote
0answers
93 views

Subset a GeoTIFF image into regular grids and extract mean latitude, mean longitude, and mean RGB for each grid

How can I subset a GeoTIFF image with 1000 by 1000 pixels into regular square grids of 50 by 50 pixels (400 grid objects in total); and calculate mean latitude, mean longitude, and mean RGB for each ...
1
vote
0answers
273 views

Python Addin toolbar- Environment mask parameter not being recognised?

I've created a button on a python addin toolbar which uses the selected features from the selected layer in the TOC, creates a feature layer from that selection and uses that feature layer to set the ...
1
vote
1answer
196 views

OD cost matrix Arcpy [closed]

I'm trying to create an OD cost matrix python script. I'm doing an OD cost matrix analysis. I'll find out the average time with patients to hospitals over 10 years. When I do this analysis, the ...
1
vote
1answer
72 views

Feature to Line on feature selections with ArcPy

I'm trying to collapse parallel polylines (dual carriageways in a shapefile of roads) to single centrelines. I'm aware of cartography's dual lines to centerline tool, but I find Feature To Line (Data ...
1
vote
0answers
181 views

Problems running zonal statistics - not all zones represented

I have been working on a Python script to automate the steps illustrated by whuber here:Create points around the edge of viewshed results I am trying to create a horizon graph illustrating the ...
1
vote
0answers
183 views

How to embed a PDF into an Excel spreadsheet? [closed]

This is what I want to do: Create report using a polygon feature class to output areas of polygons using some logic and the ExportReport() function (This I have accomplished) Create a PDF of the ...
1
vote
0answers
224 views

arcpy & TraceGeometricNetwork return ERROR 000584

I am developing a script to automate the creation of a road network following varying criteria. I have created a geometric network and I would like to get the connection between several points with ...
1
vote
1answer
107 views

How to Average neighboring county data and store in original?

I have data for several rain stations, i have averaged the data and given each county a value. Some counties have null values and I would like to pull the data from the all the bordering counties and ...
1
vote
0answers
169 views

ArcGIS opposite to pivot table

fellow GIS-ers :)! I've been trying to find a tool to do the opposite to what the "pivot table" tool does but I dont thin there is any tools for that. I have a raster data set derived from Landsat ...
1
vote
0answers
60 views

Are polygons created in Arcpy built in any order?

My script uses a search cursor to evaluate polyline coordinates and build polygons based on those coordinates. The script works well, but I am curious as to whether anyone knows the order (if there ...
1
vote
0answers
334 views

How to transfer the attributes of features based on their spatial relationship?

I'd like to check if a point feature class is placed on a line feature using python in ArcGIS 10.0. I have created a set of point features and placed them directly on a group of line features at ...
1
vote
0answers
219 views

Why does Clip analysis generate (some) empty output?

I am running a script that is working (see below) - it pulls a file from a folder, clips from that file based on an intersection with another file, and creates a new shapefile in a new folder. It has ...
1
vote
0answers
180 views

arcpy ArcGIS Server

Could someone please help me by giving me an example on how to make/connect/Add ArcGIS Server connection via python/arcpy? Thank you in advance. I'm using ArcMap 10.0 I desire to "Use GIS Services" ...
1
vote
1answer
93 views

Filter ArcSDE layers of the TOC into a combobox

I've a list of layers of the current workspace in a combobox, but I want to list only the layers of the ArcSDE Connection, not the others I've in the TOC. How can I filter the name of this layers?
1
vote
0answers
195 views

How to access selected feature attributes using Python Add-in button?

I'm trying to extract the attributes of a selected feature in ArcMap using an add-in button, but I don't know how to refer to this selection in the script. Later I need to copy these attributes into ...
1
vote
0answers
97 views

Is segment of polyline contained in polygon

I am pretty new to arcpy and am slowly learning all its functions. I have a scenario where I am traversing a polyline. I get a start point and an end point on the polyline and form a segment with ...
1
vote
0answers
62 views

Script Tool Problems ArcMap 10.0

I Have a scipt tool that runs when input shape files are added from the table of contents (added from drop down menu.) However this tool will not run when they shape files are added using the add file ...
1
vote
0answers
84 views

Are multiple separate feature classes more efficient than repeatedly deleting all features from the same feature class?

Quick Version: Is it more efficient, in terms of database performance, to have multiple separate temporary feature classes or one feature class that you repeatedly empty out and fill? I am working ...
1
vote
0answers
109 views

Is there an inbuilt arcpy method to insert a new line? [duplicate]

I need to extract a list of all the files and folders within a top level folder. My first thought was to use os.walk in a small python script as it is a simple task. However, I cannot run scripts on ...
1
vote
0answers
438 views

ArcPy 10.1 PointGeometry.projectAs()

I'm trying to reproject an X,Y passed in from an Add-in. So far this works fine: pointGeometry = arcpy.PointGeometry(arcpy.Point(x,y),srIn,False, False) projectedPoint = ...
1
vote
0answers
154 views

Table record counts change when using python tool

I have a python tool which investigates mxd files and clips/projects and exports all visible datasets. Recently I've found that the record counts (even on non-clipped data) is different. It's ok if I ...
1
vote
0answers
98 views

jagged edges in mosaic DEM

I encounter edge issues when trying to mosaic USGS NED DEMs in ArcGIS 10.0.0. After projection and aggregation, I attempt arcpy.MosaicToNewRaster_management(). I've reproduced the same results using ...
1
vote
0answers
285 views

Algorithm to place the minimum of rectangles to cover a polygon

I'm trying to cover a polygon with the minimum set of rectangles like explained in the picture below, the used rectangles have the same size a*b (a != b) , the rectangle could be rotated by ...
1
vote
0answers
80 views

Why does the method partCount in ArcGIS always give back a value of 1?

Does anyone knows why method "partCount" in arcgis version 10.0 always gives me back value 1, even when I have object with interniorring or multipart object? partnum = 0 partcount = feat.partCount ...
1
vote
0answers
214 views

Clipping .mdb in place and schema locks

I have an .mdb with a feature class that I want to clip in place - that is, I want to clip it with another polygon, and then store the results back in the original .mdb. I am doing this with arcpy. My ...
1
vote
0answers
284 views

ArcGIS/arcpy: Geometry object comparison methods not working. Do they take z values into account?

I have an arcpy script that makes calculations based on an input PolygonZ feature class. What I need to do in several places in the script is test whether a point falls within a polygon in 2D. In ...
1
vote
0answers
124 views

How can I draw an ellipse filling the dataframe with ArcPy?

I need to modify one of my template scripts to draw a circle from the centre of the (inset) data frame to the edge of the data frame. This will then be used to clip the data frame to shape. I'm using ...
1
vote
1answer
219 views

AddLayer method does not add all bands of .tif image (3 bands total)

I am currently having trouble getting 3-band raster's to display correctly when I call the arcpy.mapping.AddLayer() method. It should be said that I am using a pre-existing mxd template to automate ...
1
vote
0answers
46 views

Remove a Layer using Arcpy [duplicate]

Possible Duplicate: How can I remove a feature layer in an Arcpy Script This question could seem too stupid, but i'm struggling with it, and it cannot work. I have an mxd file containing ...
1
vote
1answer
699 views

Formatting label styles using arcpy [duplicate]

In ArcGIS 10.1, I have a shapefile/layer with labels displayed on a map. Can I modify any of the formatting of the labels using Arcpy? Either directly in code or by importing style from another layer ...