Tagged Questions
4
votes
1answer
28 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
3answers
95 views
Create Text files from a loop with Python? [closed]
I need to create some files to hyperlink to from Arcmap. I have a folder of jpeg files (100.jpg, 101.jpg etc...). I need to loop through them and create a text file of the same name except replace the ...
6
votes
2answers
90 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
1answer
57 views
How to get point x and y geometry from a shapefile?
I have a shapefile of US Cities and I want to get the X and Y coordinate of EACH city in that shapefile. I've tried this:
for city in city_cursor:
geom = city.Shape
point = geom.getPart()
...
1
vote
2answers
101 views
Can anyone recommend an Arcpy GUI? [duplicate]
Alright I have been having really good luck with you guys so here is my question...
Can anyone recommend a GUI for arcpy? So if I want to run my script as an exe with some blank text boxes(or text ...
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
60 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 ...
2
votes
1answer
43 views
Exporting Selection Using Python
I currently have a search cursor iterating through a shapefile in ArcGIS 10.1 that selects a feature and runs a viewshed analysis on that feature (and only that feature).
What's the easiest way to ...
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 ...
0
votes
1answer
34 views
Maintain 8-bit pixel depth in Raster Calculator
Would anyone know how to maintain 8-bit pixels when computing raster calculations in ArcMap?
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 ...
1
vote
2answers
76 views
Raster Calculator question for Multiple Rasters
I am having trouble for writing script in Python (ArcGIS 10.1). The task is generally divide each raster by 100. I have many of these raster files....
So what I've done is the following:
from ...
1
vote
1answer
38 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 ...
5
votes
2answers
140 views
Accessing ESRI Arcpy modules from Enthought Canopy
I've got ArcGIS 10.1 running on my windows system and I've
installed the new 32-bit Canopy Express Enthought Python Distribution.
Is it possible to load and use the ESRI arcpy modules from Canopy?
2
votes
1answer
71 views
Select by attribute expression invalid in python
I'm not sure how my expression is failing. Any ideas?
inPoints = "points.shp"
i = 0
arcpy.MakeFeatureLayer_management(inPoints, "pts")
arcpy.SelectLayerByAttribute_management("pts", "NEW_SELECTION", ...
1
vote
0answers
25 views
Running a QC check for gaps between vertices on a polyline
I'm checking polylines to make sure power pylons were correctly extracted from imagery. Is there a way to find all of the gaps or missed pylons in the database? Currently, I'm manually making a ...
4
votes
3answers
82 views
Run Viewshed on only one feature at a time in a shapefile
I have over 100 features in a shapefile and I want to create individual viewsheds for each and then run processes on each of those resulting viewsheds in ArcGIS using Python.
Is it possible to write ...
1
vote
0answers
52 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 ...
3
votes
3answers
133 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
2answers
81 views
Create point geometry in a feature class with all the attributes prepopulated
So here is the problem. I have a text file with space delimited values. A standard text file with the headings separated by spaces and then on each next line values for these headings (columns) also ...
3
votes
2answers
84 views
Replace non-English characters in attribute tables
I have a few shapefiles where some of the attributes contain the non-English characters ÅÄÖ. Since some queries doesn't work with these characters (specifically ChangeDetector), I tried to change them ...
0
votes
0answers
41 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 ...
2
votes
1answer
34 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
48 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 ...
7
votes
2answers
109 views
Arcobjects, mystery green lines in the Layout View produced during script execution
Could any of Arcobjects guru tell me, what are these green lines on my Page Layout and what to do, or not to do, so they do not appear? See image attached.
I do used Arcobjects from Python. My script ...
2
votes
3answers
84 views
Creating a where clause from user input/Python list
I am trying to perform a query based on values in a Python list. The where clause will then be used in an Update Cursor, so that the rows NOT equal to the values in the list will be deleted.
This is ...
0
votes
1answer
80 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, ...
3
votes
1answer
97 views
Create polygons in ArcMap 10.0 from lat/long data pulled from SQL Server 2008 database
Forgive me if this is very basic, as I'm new to GIS work (though I've been a programmer for 10 years) and so I'm not really sure how to approach this, but here goes...
Can I take a table with ...
0
votes
0answers
20 views
Min attribute NAME and replacing 0 with no data value
I've performed some massive OD cost matrices, and then using the pivot table function, I have the results in a table where each row is an origin and each column is a destination and all the values are ...
0
votes
1answer
192 views
Python 3 module to read ArcGIS .dbf files
I would like to know whether there are Python 3.x-compatible (preferably Python 3.3) modules to read the kind of .dbf files produced by ArcGIS.
All the modules I found were only compatible with ...
31
votes
5answers
849 views
When to use Model Builder over Python Scripting and vice versa?
I'm new in python scripting in ArcGIS but not Model Builder. I'd like to know what's the benefits of Python VS Model Builder. Why should we write script for GIS automation while we can use Model ...
11
votes
0answers
204 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
96 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
33 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 ...
16
votes
0answers
297 views
What does the adoption of Python by NVIDIA for GPGPU mean for GIS?
Today NVIDIA announced support for the Python language on its flavor of GPGPU (CUDA).
Manifold GIS uses CUDA to enable some accelerated raster operations but it is not a programmable environment and ...
0
votes
1answer
61 views
how to make a join with sql server table
I have a question.
I'd like to join .shp to table by using AddJoin_management. But I'd like to make join to sqlserver table (not to *.dbf). Is it possible to do?
it should look something like this:
...
5
votes
2answers
86 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 ...
1
vote
1answer
43 views
Adding parameters to a category in a script tool
There is plenty of documentation on how to add parameters to a category in a python toolbox,
(See the bottom of ...
17
votes
8answers
623 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
43 views
Select polygons by cutting sequence with guide and sequence-dependent number
40,000 polygons with randomly distributed ID's are to be numbered in ascending order in a field of a table. The order of the numbering is defined by the direction of the guide. Is there a solution? ...
2
votes
2answers
78 views
Using select by location to update a field in a feature class
I am using Arc 10.1 and I am working on a script that takes a value from a field within one shape file and updates a field in another shape file based on its location. Basically I have smaller parcels ...
8
votes
1answer
214 views
How to find differences between shapefiles?
Every month I have to QA/QC some streets data for an entire county (over 47,000 records). The first step is to compare the two files. Currently, I'm using a tool that was created in house via VBA ...
2
votes
2answers
116 views
Calculate Percent coverage using another raster, with dif resolution and orientation
I have a 0.5 meter raster that defines presence or absence (cells are either 1 or 0). I have another 5 meter raster, which I created. I would like to calculate a percent coverage of the underlying 0.5 ...
0
votes
0answers
37 views
Installing ActivePython in ArcGIS Python Directory?
I want to install ActivePython on my computer, but I also have Python 2.7 pre-installed with my ArcGIS 10.1 version.
The directory for the .dll's and such is:
C:\Python27\ArcGIS10.1
ActivePython ...
2
votes
1answer
104 views
how to add a query layer to a mxd in a python script
I want to add a query layer to an arcmap document so that whenever i have a db data update, it is reflected in my ma and I can update my service through python script. This is my script so far...
...
3
votes
2answers
138 views
Majority filter (minimum mapping unit) in ArcGIS with larger window size
I want to run the majority filter in ArcGIS with a window size of 4 or 5 i.e. greater than the default 3. Is it possible? Or some other command (or tool) which might help me achieve that?
thanks!
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
1answer
175 views
Arc 10 Python .shp attributes - usings fields to populate other fields - if/then/else statement
Ive been looking for a solution and unable to find one so please help if able:
I'm trying to avoid manually inputting Begin and End engineering station values already inputted into a seperate field. ...
1
vote
1answer
113 views
Need help in Python script : Getting an unicode encode error
When I`m running a script (it checks to which database a mxd is connected) I get the following error:
return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec ...




