Tagged Questions
8
votes
1answer
58 views
Watermarking photos using their geotag and create a shapefile
I have geotagged photographs and I would like to place a watermark of the photos location on the front for easy reference as well as creating a shapefile from the coordinates. Does anyone know of any ...
1
vote
1answer
27 views
arcpy.setValue for Title casing
I am trying to figure out how to use fieldName.title() method while updating rows using updateCursor for multiple fields. I was trying to improve the code of this post to fit my purpose:
...
6
votes
2answers
94 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 ...
2
votes
2answers
57 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
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 ...
2
votes
1answer
63 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
1answer
59 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 ...
2
votes
1answer
45 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 ...
0
votes
0answers
32 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 ...
1
vote
1answer
39 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 ...
4
votes
2answers
81 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 = ...
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 ...
0
votes
1answer
47 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
60 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 ...
1
vote
2answers
42 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 = ...
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 ...
4
votes
5answers
113 views
ArcPy - Can Radio buttons be added to a Script tool?
I have 3 Point shapefiles for 3 species that contains the accession points of each.
The user needs to specify only one species at a time. I need to write a script tool for adding the selected Point ...
3
votes
3answers
137 views
How to convert geometry to WKT using ArcPy?
I would like to be able to convert a single feature (or potentially many features) in an ArcGIS layer into Well Known Text (WKT) format during a geoprocessing operation using Python and ArcPy (no ...
2
votes
1answer
35 views
ECWs missing when exporting MXD to PDF with arcpy
I'm trying to export some MXD maps to PDF with arcpy (ArcGIS 10.1). Everything works fine and dandy except for ECW images, which don't appear in the PDF. However, when I execute the same code from the ...
1
vote
1answer
49 views
Query and display a layer using arcgis script tool
I have database which contains point shapefiles and raster files for 3 species.
My aim is to develop a script tool that should have a search tab to enter the species name.
also, a check box to select ...
3
votes
1answer
71 views
How can I validate a table name on SDE with Oracle backend?
Second title: "Is arcpy.ValidateTableName broken on Oracle?"
I have an Oracle SDE database 9.3.1 (service connection). My arcGIS client tools are version 10.0 SP5). I have some names of feature ...
0
votes
1answer
81 views
ArcGis 10 - Field Calulator - Python - Synthax Question
I want to calculate a field, this is my working example in VB:
"C:\Users\Admin\Desktop\Data\" & !Work! & "\1000_\" & !Data! & ".pdf"
I'm slowly changing all my scripts to Python, ...
0
votes
1answer
38 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 ...
12
votes
1answer
228 views
How can I utilize NumPy arrays to optimize big data geoprocessing?
I'm interested in learning how to utilize NumPy arrays to optimize geoprocessing. Much of my work involves "big data", where geoprocessing often takes days to accomplish certain tasks. Needless to ...
-1
votes
1answer
95 views
How to write Process Dialog log information to a text file in ArcGIS?
I have created a custom model. When this model is run, it shows a process dialog which has some log information. I want to write that log information into the text file for further analysis. Does ...
3
votes
0answers
98 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 ...
1
vote
1answer
71 views
Database Connections folder is empty when viewed with ArcGIS tool
I'm trying to create an ArcGIS tool which accepts an SDE connection file as an input. I made a new interface with an input parameter and set the type to Database Connections. When I open the tool and ...
0
votes
0answers
34 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 ...
0
votes
2answers
121 views
Execute multiple process in parallel of Arcpy script
i have seen some not easy ways to do parallel processing, but i wonder if it is possible to simply execute multiple process of the same Arcpy script in the same time.
the script make some changes in ...
5
votes
2answers
106 views
ArcMap Arcpy scripts: How to handle user password input?
I'm currently trying to write a script that has a username & password input which then returns some data if the user has appropriate access. The script works just fine when I hardcode my own ...
5
votes
2answers
87 views
Is there a way to increase the search radius of nearest neighbors for the Nibble tool?
I am working with a raster map vegetation types. I have about 20 types with unique raster code values that can be sorted into three classes:
1 - vegetation types I want to expand using the nibble ...
3
votes
0answers
20 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 ...
17
votes
8answers
634 views
What are some resources for learning Python and arcpy?
I would like to learn arcpy, but I do not know quite where to begin. Does anyone have any good advice on where I should start to learn arcpy?
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 ...
2
votes
1answer
142 views
How to access all mxd files in a folder?
I'm a beginner to Python and am trying to figure out how I can access several mxds in a folder. For example, when I want to use the AnalyzeforMSD function in ArcGIS:
import arcpy
mxd = ...
9
votes
3answers
329 views
Industry-based examples of using Python in geoprocessing and arcpy
I was asked recently by some students what types of operations GIS Analyst/Developer are usually trying to automate by using Python with geoprocessing in ArcGIS and ArcPy site package. I guess it ...
1
vote
1answer
135 views
Calculating mean upslope aspect
I am trying to write a python script to calculate the mean aspect upslope from each cell in a DEM. I have the general workflow down, but my final output is restricted to angles between 0 and 90 ...
2
votes
1answer
86 views
Difficulty converting standalone script to ArcGIS tool
As my title says, I am currently trying to make my (working) standalone script into an ArcGIS tool so I'm not the only person in my office that can use it. It essentially selects all the data within ...
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 ...
5
votes
2answers
142 views
Make Buffer like Offset in Arcpy
I would like to make a buffer for a polyline and get as Output a Polygon with the same angles as the polyline, having not arcs, like in ordinary buffers.
i tried the FLAT option in arcpy, but it's ...
3
votes
2answers
104 views
ArcGIS Conflation Tool Recommendation or Custom Script for Comparing Points
Can anyone recommend conflation tools for ArcGIS Desktop (10 or 10.1, paid or free) or a scripting outline / procedure (or just a script) to have a technician efficiently process the following rules?
...
2
votes
1answer
39 views
sr.lock after looping
The following code puts an sr.lock on each table in my List. What’s causing my tables to lock up? I understand my script is reading or opening my tables temporarily to perform the ...
3
votes
1answer
177 views
How can I more efficiently select related records?
Below is the code I'm using to replicate the "related tables" button in ArcMap. In ArcMap that button selects features in one feature class or table based on the selection of features in another ...
0
votes
2answers
98 views
How do I construct a file path within Python for a Feature Class within a Feature Dataset?
Based on my understanding of the ArcGIS path structure, a feature class inside a feature dataset inside a geodatabase can be accessed by the following:
C:\Menu\Lunch.gdb\Sandwich\Cheese
Where ...
2
votes
3answers
225 views
How to use ArcGIS 10.1 to make Python scripts for ArcGIS 9.3?
Recently I have been making scripts to run geoprocessing tools for a client who is running ArcGIS 9.3. However I only have access to ArcGIS 10.1. As a result I cannot use model builder in 10.1, and ...
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
1answer
100 views
Using an arcpy cursor: How to define the actual visited feature as current selection of the layer?
I want to implement a script that runs through each feature of a feature class, zooms to the extent of the feature, sets the scale to 1:5.000 and adjacent takes a picture of the scene. The steps are ...
3
votes
2answers
231 views
arcpy.da.SearchCursor - unique value get second field value
I have a feature class and using arcpy.da.SearchCursor I'm getting unique values of a field (e.g. Name). How can I use this method to get the associated row value of a different field (diff field = ...
3
votes
1answer
103 views
Beginning Arcpy: Asking for a quick review of my script
I cobbled this code together from ESRI documentation and stackexchange answers.
I tried to use SearchCursor(points, fields=fieldname) but I get this error:
TypeError: SearchCursor() got an ...
1
vote
1answer
67 views
How to save an existing LYR file to use a relative path *and* have the LYR be v9.3 compatible?
Not sure if this is possible - I am writing a python script to convert LYR files to use relative paths and save the LYR as a 9.3 LYR file. I can do each one individually, but not together.
...
# ...




