A python API created by ESRI to perform geoprocessing and layer management.
1
vote
1answer
416 views
user select fields to be deleted in a feature class
How do I make the script below accept parameter arguments correctly in ArcGIS 10? I added it to a toolbox as a script, created parameter called Fields to be Deleted: and type as Field, but when I ...
1
vote
0answers
34 views
How to make multivalue input script run from a toolbox?
I have a working python script:
import arcpy
sdeconnection = arcpy.GetParameterAsText(0)
layerfiles = arcpy.GetParameterAsText(1).split(";")
for layerfile in layerfiles:
print layerfile
lyr ...
1
vote
0answers
27 views
Different results from Spatial Analyst GP Tool and Python
I am writing a script that has to subtract one raster from another.
The rasters I have represent
1) Parking Lots (1 = Parking Lot, 0 = not Parking Lot) and
2) a buffer around the Parking Lot (1 = ...
1
vote
0answers
24 views
Arcpad checkout to an area
I would like to check out data from an SDE database but for performance sake, i prefer to delete all features outside of my survey area.
i've tried to copy features in area from sde to a file GDB ...
1
vote
2answers
85 views
Arcpy to copy a layer in the ArcMap TOC, rename the copy, and paste back to TOC?
I want to make a copy of a layer in the ArcMap TOC (passed to my script as a Feature Layer), assign the copy a new name, set a definition query on it, and then add the copied Feature Layer back into ...
1
vote
1answer
79 views
Search cursor stops selecting after two iterations
I have a script which selects an extent from a grid and exports the data frame.
import os, arcpy
mxd = arcpy.mapping.MapDocument('CURRENT')
df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]
...
1
vote
0answers
25 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
69 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
30 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
50 views
arcpy: can I use SelectLayerByAttribute to compare fields from joined tables?
I can't figure out the syntax to select table records where one field's value exceeds that of another. The fields are from a pair of table views connected w/AddJoin(). One view is of a fgdb table and ...
1
vote
1answer
48 views
Make Table View with field_info Output
I am using Make Table View to copy data from one table to a table view object and in the process hide and/or rename some fields. When I output the data to a dbf it hides and/or renames the fields ...
1
vote
0answers
48 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
30 views
Cancel event in Python Gp tools with arcpy
In GP-tools written in C# (ArcObjects) we can listen for the Cancel-event and react on that. I wonder if there is anything similar in Python GP-tools applying arcpy.
I googled that issue and the only ...
1
vote
0answers
55 views
Calculate Field using Esri Python Addin
I am trying to select a polygon then it must automatically change (calculate) the status to "C". The tool seems to work in the background but nothing actually happens (the status is not updated). I ...
1
vote
2answers
106 views
What is causing - Arcmap errors (010302/010067) while using 3D analyst/CutFill? [closed]
I'm using the Cut/Fill tool in 3d analyst to measure the volume of a feature, but I'm getting the following errors:
ERROR 010302: Unable to create the output raster: C:\Program Files ...
1
vote
0answers
83 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
49 views
Why does a geoprocessing service fail every other time it is run?
I have a ArcGIS Server 10 geoprocessing service right now that takes in a string and runs a parameterized query to SQL Server 2008R2 through pyodbc. The service works, but only every other time. I can ...
1
vote
0answers
75 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
38 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
85 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
55 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
46 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
50 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
56 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
74 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
60 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
59 views
Problem to transform events from one route to another
I have a road feature class layer containing parts like 1_10, 1_20. 2_10, 2_20... etc. 1_, 2_ is later used to create the route and _10, _20 is indicating the direction (the road feature classes were ...
1
vote
3answers
61 views
Apply rotation before FeatureToRaster_conversion
I am converting polygon shapefiles to rasters. With arcpy I am using the function FeatureToRaster_conversion.
gp.FeatureToRaster_conversion(InFeatures, InField, OutRaster, InCellSize)
This function ...
1
vote
0answers
50 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
134 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
42 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
92 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
128 views
How to add dynamic index layer for data driven pages
I am trying to create a dynamic map book based on user defined geometry. I can use Grid Index and calculate adjacent tool to create the grids in my Python script. How can I set this newly created grid ...
1
vote
0answers
180 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
1answer
271 views
Move TEXT_ELEMENT using arcpy.mapping and data driven pages
I'm customizing an automated mapping solution using arcpy.mapping and data driven pages.
Using a looping statement, I'm hardcoding the position for the mapping elements (legend, north arrow, inset ...
1
vote
0answers
139 views
using copy parallel in arcpy
I'd like to use copy parallel tool with Arcpy . i tried to access copy parallel with GUID in Arcpy but i couldn't use the property and methods of this tool . i used comtype to import Arcobjects to ...
1
vote
1answer
105 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
39 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
290 views
Formatting label styles using arcpy
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 ...
1
vote
0answers
70 views
Issues Switching SDE workspaces, same DB, different users
I have an SDE database with a number of user schemas. I'm wanting to connect using different credentials for each and get information about the tables and datasets within.
I'm using arcpy, and have ...
1
vote
0answers
265 views
Variable stored as NoneType in Python with updateCursor
SOLVED: although the field was not nullable (no null values), a glitch created one in the heading field, so the variable was stored as a null value and thus the NoneType.
I am using updateCursor to ...
1
vote
0answers
164 views
ArcGIS 10.0 - How to have GP Service make rest calls instead of Silverlight client?
I have a Silverlight client that densifies a user drawn polyline. The returned vertices from the polyline are then sent to esri elevation sample server for each vertex to find an elevation value. ...
1
vote
1answer
412 views
Dynamic Text in ArcMap 10.0 and arcpy - getting user name in specific format
I need to put in a specific text into a text element. The initials of the user who built the map.
With arcpy I am trying to set the text element with dynamic text. If I put
<dyn ...
1
vote
1answer
353 views
How to achieve more than basic labelling of Reference Grids (Graticules, Measured Grids) in ArcGIS Desktop?
I'm happy to be corrected, but at the moment I do not think it is possible to meet any of the following mapping requirements using either ArcMap or ArcPy:
Label measured grids using a format like ...
1
vote
0answers
126 views
I am getting a blank layer preview from geoserver after Quick Exporting my shapefile to postgis and then getting postgis to point to geoserver
What could be the potential problems? Looking at the layer's data fields/form the one thing that isn't filled is the Native SRS and its source, but I have already passed in the projection info as it ...
1
vote
0answers
211 views
Relate first point and last point of polyline to point feature(s)
I am working on a small script using ArcMap10/arcpy to generate a upstream-downstream uniqueid for a polyline feature class using point id's that fall on the starting point and ending point of a line.
...
1
vote
0answers
99 views
Copied points not intersecting the original points
I'm using an arcpy search cursor to access a Oracle database. I have a simple Python class that I copy the returned row objects into, which gives me more flexiblity than the cursor.
The problem is ...
1
vote
0answers
65 views
getSelectedExtent not working on joined layers
When joining layers the getSelectedExtent function in ArcPy fails to get the extent. Unjoining the layers and running it yeilds the expected result. The joined layers are all located on an SDE. Is ...
1
vote
0answers
38 views
What are the steps to go from raw address data to a locator report?
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 ...
1
vote
0answers
429 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 ...

