A python API created by ESRI to perform geoprocessing and layer management.
0
votes
0answers
8 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
51 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 ...
1
vote
2answers
66 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
38 views
Need python code example - setting a combo listbox to Null
I want to be able to set the value of a field to Null using python, but I get an error.
I am using arcpy.CalculateField_management
Any help would be appreciated.
Rob Smith
1
vote
2answers
67 views
arcpy.sys versus sys
I just noticed that in the arcpy module (Esri) there's a sys sub-module. Does anyone know what the difference is in using one or the other? I've been looking around and can't find anyone who uses ...
3
votes
2answers
67 views
arcpy Problem with updateRow() when trying to update fields with UpdateCursor
I have a list of values which I am trying to add to an existing shapefile. The field where the values need to be inserted has been added via arcpy.AddField_management and thus the values of the rows ...
0
votes
0answers
12 views
MapInfo8.0 is not letting me edit layers imported from the server? [duplicate]
I have imported 4 layerts from my server for use in MapInfo, when i went to edit these layers the edit tool for each of these layers is grey and non accessible.
Any suggestions would be greatly ...
6
votes
2answers
77 views
Refresh open attribute table in ArcMap (arcpy)
I am running the Calculate Field GP tool from the arcpy in ArcMap. When a row value is updated, it does not show up untill I use the Reload Cache tool (Table Options > Reload Cache). How do I refresh ...
1
vote
0answers
68 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
1answer
24 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 ...
4
votes
1answer
33 views
Using matplotlib to create and export graphs automatically from ArcMap
I am going to start a project soon where, after the data has been processed in various ways, an output jpg showing a graph of the data should be produced. The workflow is as follows:
1. A feature ...
1
vote
0answers
23 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 ...
0
votes
1answer
17 views
How to add layer in Arcscene using script tool
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "*")[0]
addLayer = arcpy.mapping.Layer(r"F:\project\Final\Ground floor\steps.lyr")
...
2
votes
1answer
49 views
How to write point geometries with arcpy instead of gp syntax?
Can someone help me fix some code that simply writes points into a featureclass? It used to work in the older gp. syntax, but I'm having difficulties rewriting it in arcpy for ArcGIS 10.0. In this ...
1
vote
2answers
52 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 ...
3
votes
1answer
43 views
Why is my simple arcpy script failing? (sets raster cell value to null if below threshold value, ArcGIS 10.1)
As mentioned in the title, simple script to set null cell values below three standard deviations beyond the mean:
import arcpy, sys, os
#Accept input and output raster
inRas = sys.argv[1]
outRas = ...
2
votes
2answers
44 views
Help with Python and adding a grouplayer to arc, renaming it from a folder name, then adding layers to it from that folder
I am trying to use os.walk to go through a directory tree, pull out all the .shp files in it, create a grouplayer in the mxd, rename the grouplayer the folder name, then add the layers from that ...
1
vote
1answer
54 views
A simple Python Script to save the currently opened mxd and changes
Here is what I have so far...
import arcpy
import arcpy.mapping as map
mxd = map.MapDocument()
mxd.save()
And yes I know that map.MapDocument requires an argument, but I want it to automatically ...
1
vote
0answers
67 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 ...
2
votes
1answer
40 views
How can I set the settings of an Address Locator within a Model or arcpy?
I am creating a model that processes a large road dataset, then creates an address locator from the roads. The Create Address Locator tool does not allow me to set options like Spelling Sensitivity or ...
1
vote
1answer
49 views
How to get an attribute of the selected feature and pass it into a URL?
As a total Novice with Python, I thought 2 weeks would be enough time to learn how to build some tools for our GIS... I was wrong and I'm running up on a deadline.
I am attempting to get a value ...
1
vote
0answers
29 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 ...
0
votes
0answers
25 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 ...
0
votes
1answer
31 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 ...
-3
votes
2answers
79 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")
...
1
vote
2answers
84 views
How to list Feature Classes of Multiple geodatabase in Multiple Folder?
I'm new in python scripting and try to list polyline feature classes of multiple Geodatabases. The Geodatabases are in many nested folders.For example in folder "A" I have 20 folders and in each ...
1
vote
1answer
34 views
Append to rather than overwrite to a single table in arcpy
The code thus far works to create multiple output files, but I'd like to set it up so that the data is all exported onto a single table across multiple rows. The issue is I believe with the part in ...
0
votes
0answers
47 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 ...
3
votes
2answers
92 views
Csv to Shp conversion? [duplicate]
I am working on a really big script right now where I have a csv file that I have removed rows and columns from, and edited the headers. I need to create one big shapefile for the entire csv file then ...
1
vote
1answer
49 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
43 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 ...
2
votes
1answer
50 views
Clipping buffers to census tracts
I have donut buffers generated to protect anonymity of household locations. They need to be clipped so that they are only inside the census tract that the original point was in. The code takes about 8 ...
2
votes
1answer
59 views
Arcpy: Troubleshooting parameter error for Export Report
I'm running into what I believe is a parameter error in writing an arcpy exporttoreport script. I've written several successful scripts of this same type, but the difference is that this one has a ...
0
votes
1answer
50 views
Error: Exception Raised on the “for row in rows” command line?
I am comparing fields in layers. I have the AADT layer and AADTAnno layer and I want it to search the fields FLAG and TFLAG. For Example: If there is a 29C9 in AADT layer in FLAG fields then there ...
5
votes
1answer
79 views
How much database bloat is reasonable?
I use personal geodatabases to hold all the data for my projects (probably around 10-20 feature classes across 2-4 datasets on average). I use the personal gdb because I like being able to hook into ...
4
votes
2answers
76 views
Arcpy memory leak
I'm trying to import a great number of csv files of about 250MB each. I wrote a python script for that as follows:
import gc
import glob
tables = ...
2
votes
1answer
67 views
How to efficiently check for feature overlaps with Arcpy?
In an effort to reduce processing time, I am looking for ways to pre-process data within my script. I have ~18,000 featureclasses with ~500 features each (all simple circle polygons) from which I want ...
1
vote
0answers
46 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 ...
4
votes
1answer
52 views
Switching between background 64 bit processing and 32 (so I can use 3rd party ie XTools)
I often run scripts now with 64 bit background processing enabled but when I want to use certain tools like Xtools table to text I have to turn it off as these tools are 32 bit. Is there a way to ...
1
vote
0answers
28 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 ...
7
votes
1answer
75 views
Reduce processing time in Erase function using Arcpy in IDLE
I am processing 18,000 feature classes (saved in a file GDB), each with ~500 records (polygon features) in ocean areas, and I am running a script to remove area overlapping with the coast, using the ...
2
votes
2answers
76 views
Trying to use an integer in a WHERE clause
I'm trying to use an integer value in a WHERE clause (looking at an integer field).
expression = "'SERVICE' = 'Service' "
expression = expression + 'AND '
expression = expression + "'GPS_TIME_TOTAL' ...
1
vote
1answer
30 views
arcpy.mapping Graduated Colors Symbology
I'm trying to figure out how to apply graduated color symbology to a feature class by using arcpy.mapping in ArcMap 10.1.
To start, a script runs and a feature class is added to a map document, no ...
1
vote
1answer
23 views
ArcPy: DDP Error in exporting only occurs with “SELECTED”
I'm trying to use DDP (Data Driven Pages) and am running into a problem. I'm using arcpy.SelectLayerByAttribute_management to select a series of records, and then trying to use the ...
-1
votes
0answers
18 views
arcpy: AddJoin on text field [closed]
I posted a question over on stackoverflow, but maybe it should be here. I'll just drop the link here. Thanks for any help!
http://stackoverflow.com/questions/16174754/arcpy-addjoin-on-text-field
2
votes
2answers
60 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 ...
0
votes
1answer
46 views
ArcPy: Possible to use wildcard in .pdf append?
I'm working on a script that (as written) produces a large number of individual pdf pages (>100), instead of hardcoding the names of each of the outputs, I was thinking of using a wildcard. However, ...
2
votes
1answer
59 views
ArcPy: No Label appear on .pdf output but are present in Layout
Do labels needed to be coded into an arcpy script in order to be visible on an arcpy .pdf output? In ArcGIS the labels are visible for various features, but when I use the arcpy script (either in IDLE ...
5
votes
1answer
118 views
ModelBuilder: How to extract data by date, export to separate tables and interpolate tables to rasters
I've been using ArcGIS for a couple years, but when it comes to model builder I've only worked with very simple models. I'm hoping someone that is much smarter than myself can help me in building a ...
1
vote
2answers
41 views
Problem saving after CellStatistics list ERROR 010240
I am having trouble saving outputs from CellStatistics but only when I run it on a list of rasters. This was working on python 26 but not 27.
I know this example is nonsense, but:
env.workspace = ...