Tagged Questions
4
votes
1answer
37 views
Is there a compelling case to learn/use Python Toolboxes (new at ArcGIS 10.1) over Python Script Tools?
I've written a few Python Toolboxes (which are new at ArcGIS 10.1), but am yet to decide whether/when I should write them rather than Python Script Tools in a standard toolbox.
I thought the Online ...
3
votes
1answer
42 views
How to get default parameter value for script tool from csv file?
I am fairly new to python scripting. I have just figured out how to read and write input parameters for a python script from a csv file. Now I am being asked to pre-populate the script tool dialog in ...
5
votes
3answers
96 views
can arcpy detect whether it's running in Desktop or Server?
I'm developing some code that I want to run both as an ArcGIS Server web service and as a standalone script. I want to be able to modify the execution slightly depending on whether it's running as an ...
0
votes
2answers
34 views
Arcpy: Copying targeted row features to new shapefile
I'm trying to copy specific attribute table rows from one shapefile to a new shapefile that will contain only the specified rows in its attribute table, that is, if a field GDP_TOP10 = 1. I'm using ...
1
vote
2answers
42 views
Python: Arcpy: Adding data to a shapefile
Complete arcpy beginner here...
I have a shapefile with the fields CNTRY_NAME and GDP_HEAD.
I have a list in Python gdppop2002 = [['Country1, 234.1232341], [Country2, 23.2341234],...etc...]
I'm ...
4
votes
0answers
49 views
ArcPy method to determine ArcMap document version
Is there a way with ArcPy to identify the version of a Map Document (MXD). I am working on a solution to inventory our MXD's and would like to know if a document is 8.1, 9.2, 10.0, etc.
I am ...
2
votes
2answers
55 views
How to reproject all featureclasses in a database to another database?
I am very new to arcpy and have ArcGIS 10.0
I would like to make a script where I would only have to change two variables in a script (database_input and database_output) so that I can reproject all ...
1
vote
0answers
42 views
OD cost matrix Arcpy
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 ...
0
votes
2answers
60 views
ArcPy Field Calculation with special characters
I'm trying to calculate a string field, using "µSv/h". Running this in the manual field calculator works just fine, but I've tried this in the Python window in ArcMap as well as the IDLE, but both ...
2
votes
2answers
110 views
Python Code: “Compare two fields and select missing records”
The code I wrote is not right!! It's selecting more than what is actually missing. I think I'm wrong on the matched code line. I need the script to make a list of the "FLAG" field and a list of the ...
4
votes
0answers
48 views
How to add layer with arcpy and retain description and other layer properties?
I have multiple feature classes in a geodatabase, each feature class has metadata including a Description, Credits, and other information. If I use the 'Add Data' button in ArcMap 10.1 to add one of ...
2
votes
1answer
43 views
Reporting Engines used with ArcGIS Server
I'm curious what others are using to build the more elaborate reports out of ArcGIS Web API apps? By elaborate I mean ones that include lots of dynamic charts and tables, multiple maps/data frames ...
0
votes
0answers
77 views
python script to calculate and return values based on several conditions
I need to calculate and return the value "continuous" to those records in a polygon feature class with species records aggregated to a UTM grid
considering the attributes are species name, grid code, ...
3
votes
0answers
52 views
Accessing arcpy functions from IronPython
I made a few python scripts to automatically optimize and publish my data..
Now i'm thinking about writing a .NET program to manage and run these scripts: the obvious way is invoking them in a ...
1
vote
0answers
40 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
1answer
49 views
Read XY, get raster value and then update field
I've written a script to run through a point layer, using the SearchCursor in the data access module and then read the XY values. Within the with statement, I then use GetCellValue to get the ...
1
vote
0answers
33 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
2answers
68 views
Set Extents of MXD to new layer data source?
Alright here I go again this forum has been good to me. I add a layer and replace its data with a shapefile I created using the following bit of python:
layer = ...
2
votes
1answer
37 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
1answer
59 views
Setting More Than One Workspace
I have a number of tables that contain known values in a field. For example, I have a soil type table with one field in it. That field contains a list of known soil types. I have another table that ...
2
votes
2answers
74 views
How to create network dataset for network assistant using ArcPy?
Is it possible to create a network dataset with arcpy to be used with the network assistant?
In the documentation I found the Build Network and Dissolve Network functions, but it looks like both ...
1
vote
2answers
85 views
How to Add Shapefile with Symbology from Layer File to ArcMap MXD using ArcPy/Python?
Say I have a Shapefile:
C:\DATA\points.shp
A layer file:
C:\SYMBOLOGY\symbology.lyr
And a map document:
C:\MAPS\map.mxd
How can I add points.shp to map.mxd with the properties of symbology.lyr ...
0
votes
0answers
37 views
Create annotation layer with follow feature option set as default
I would like to create an annotation layer that has the "follow feature" option as the default. I've looked all over and can't seem to figure out how to do this from the initial annotation layer ...
-3
votes
2answers
92 views
What does Runtime error : 'NoneType' object has no attribute '<field_name>' mean?
Here is my code
#arcpy
import arcpy,sys
from arcpy import env
env=r"C:\Users\Jaya\Desktop\python_practice"
totalRec=arcpy.GetCount_management("river")
rows=arcpy.SearchCursor("river")
...
0
votes
0answers
58 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
56 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 ...
2
votes
2answers
79 views
Why does ArcMap crash if I try this Join Field (which ArcPy does not like either)?
I'm a little uncertain whether this question belongs here or on http://gis.stackexchange.com
Have an "AddJoin" that results in no shared records, which is not what I'm expecting. Is it because I'm ...
1
vote
1answer
86 views
Does Identify tool of ArcGIS for Desktop have Python script behind it?
Can anyone let me know the Python script for "Identify" tool in arcmap10.
I need to create a customized script tool for that and add in a toolbar..
Pls help...
0
votes
1answer
70 views
How to Export to PDF after zooming to extent of each feature that meets SQL where clause?
I realize that I've asked two similar questions recently, but following suggestions in the comment chain, I'll make this a separate question (separate as it is not the no output problem in ArcPy: ...
0
votes
0answers
50 views
Create Vertex and add empty attributes to it
How can I create a vertex(and then a point feature on the vertex) on a polyline and give it some empty attributes(create fields), move an existing vertex, delete vertex? I am in ArcGIS environment and ...
0
votes
1answer
47 views
How can I hide custom model from mytoolbox in ArcGIS
I am created model in ArcGIS using model builder and python script. To build main model I have created some submodel and script in the same toolbox. I just want to show main model in the toolbox and ...
1
vote
2answers
90 views
Possible to add multiple fields in single arcpy statement?
I'm trying to add multiple fields to a table using arcpy and am wondering if it's possible to have multiple fields declared in the AddField management, and their values, separated by commas or ...
3
votes
0answers
115 views
Python Script Crashing Inconsistently on Arcpy Batch LayerToKML script
I put together a script to take a TIGER shapefile of all census tracts in a state, select the census tracts by each county, and export them into individual county-level kml files.
The problem is that ...
0
votes
0answers
39 views
How can I use NZLoad using python or arcpy script?
I have CSV file which has millions of feature class record merged with some metadata information which I want to load into Netezza database. I have tried it using insert query but it is very very ...
3
votes
1answer
98 views
Has anybody used arcpy.mapping.ExportReport successfully on 64bit machine?
The online help for arcpy.mapping.ExportReport says that it has some restrictions on use but does not list 64bit machines amongst them.
I am running the following test from IDLE under ArcGIS 10.1 SP1 ...
3
votes
0answers
25 views
arcpy adding time to Raster Mosiac Footprint
I am trying to create a raster mosiac for use in animating data over time. The current workflow is:
Create .gdb (arcpy.CreateFileGDB_management)
Create Raster Mosaic ...
2
votes
2answers
45 views
How do I create a network from connected links
I have a bundle of links in 'some' networks. I need to find out which ones are connected to each other i.e. I need to find out which links are not connected to the 'main' network.
I have been working ...
1
vote
0answers
49 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
56 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
83 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 = ...
0
votes
0answers
26 views
How to use in_field_map parameter of CreateCompositeAddressLocator_geocoding?
I would like to know if anyone who has worked with the CreateCompositeAddressLocator_geocoding method knows how the "in_field_map" parameter is formed?
1
vote
0answers
63 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 ...
6
votes
1answer
167 views
What percentage of ArcGIS users are using version 10.1 already?
I'm planning on building an add-in using ArcPy, but some of the functionality I need is only available in 10.1. I want to distribute this add-in and was wondering if making it 10.1 only would limit ...
4
votes
2answers
207 views
Merge Spatially Coincident Features in the Same Feature Class
I need a way to programatically merge grid cells (polygon 15x15m) that are directly on top of each other and add together some of their attributes.
I am working in ArcGIS 10.1 with the data stored as ...
2
votes
0answers
89 views
Problem with SplitLineAtPoint tool in arcpy
I have a problem with Split Line At Point and polygons which have been dissolved using arcpy.Dissolve_management.
When I try this model to get polygon contour split at some points.
...
3
votes
1answer
208 views
How to rotate labels using ArcPy?
I'm writing Python code for ArcGIS using the arcpy library and now I'm experiencing a little problem with labels. In fact I'm not able to rotate them in layout via arcpy (I should rotate all labels of ...
11
votes
0answers
560 views
How to Split a Concave Polygon Into Convex Polygons in Arcpy?
I'm looking for a tool or algorithm to detect concave polygons and split them into convex polygons. Like explained in the picture, the blue polygon is split into A and B polygons
I'm using Arcpy ...
0
votes
0answers
400 views
Why am I getting an ERROR 000728: Field *fieldname* does not exist within table even though field exists?
I do some script for a shapefile's table.
And this script works for 2 fields and do not for other ones, because of:
ERROR 000728: Field FID_158_01 does not exist within table
But this field is ...
1
vote
0answers
195 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 ...
2
votes
1answer
322 views
Is it possible to replaceDataSource of layer with dataset stored in_memory using ArcPy?
I use in_memory workspaces to speed up some Python script tools that get published as Geoprocessing Services significantly.
The tools open MXDs and perform, among other things, an ExportToPDF.
In ...