Python is an open source interpreted programming language used in many GIS programs.
58
votes
5answers
7k views
How do I access ArcObjects from Python?
I want to be able to script some things that aren't exposed via arcgisscripting or ArcPy. How do I access ArcObjects from Python?
I'm working with ArcGIS Desktop 9.3.1 right now, but will be ...
31
votes
9answers
2k views
Alternatives to using Arcpy
I seem to use ESRI's Arcpy site package for virtually all of my python geoprocessing. To ESRI's credit, these are an incredible suite of tools that can help accomplish a great deal. However, I would ...
31
votes
5answers
855 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 ...
29
votes
11answers
4k views
What are the best resources for learning GIS programming with Python?
In your opinion, what is the best book/site to learn Python with GIS goals in mind?
By "best", I mean:
not very long (book)
easy to understand (book/site)
good practical examples (book/site)
29
votes
7answers
3k views
How can I effectively debug arcpy Python scripts?
I have written many Python scripts using arcpy in ArcGIS 10, and so far my only means of debugging is restricted to printing messages to the geoprocessing results window using arcpy.AddMessage(). Are ...
27
votes
9answers
10k views
How to install GDAL with Python on windows?
Can anyone please explain to me in step by step instructions how to install GDAL/OGR with Python on Windows. I have Windows Vista and I have tried following the information on the website and it does ...
27
votes
1answer
2k views
How to smooth the polygons in a contour map
Here is a contour map for which all the polygons of levels are available.
Let ask how to smooth the polygons keeping all vertices preserved in their exact locations?
Indeed the contour is made on ...
26
votes
3answers
611 views
Sharing Open Source Python Code for ArcGIS
My company just purchased ArcGIS software. I'll be writing scripts for ArcGIS in Python. Is there a community or open source project where this code can be shared? (I'll be releasing all of my code ...
23
votes
4answers
2k views
Performance of ArcGISScripting and large spatial data sets
I am currently writing a python script using the arcgisscripting module to process a reasonably large data set (~10,000 records in total) normalised over a small number of tables, 8 in total. The ...
23
votes
2answers
962 views
Streamlining Python Code for Big Data
I have Python code which is designed to take point shapefiles through the following workflow:
Merge points
Integrate points, such that any points within 1 m of each other
become one point
Create ...
20
votes
8answers
1k views
How to easily shift all features in a vector dataset?
Let's say that I put together a Shapefile and all the features have their vertices shifted by a constant amount. What's the easiest way of shifting all the features (hence the (x,y) position of their ...
19
votes
2answers
1k views
Python Efficiency — Need suggestions about how to use OGR and Shapely in more efficient way
I'm looking for some suggestions about how to make my python code more efficient. Normally efficiency doesn't matter for me but I am now working with a text file of US locations with over 1.5 million ...
19
votes
5answers
1k views
OpenSource Remote Sensing Tools for Classifying Roofs
with envi image processing and classification tools, you can get roofs from images with some spectral value and then you can convert it some vector data for your app.
in python with OpenCV which have ...
19
votes
6answers
485 views
Python for GIS on a thumb-drive
I'm looking at putting together a light Python install on a thumb drive that I can take to client offices and do some basic GIS processing. I'm thinking of installing the following:
PyScripter
...
18
votes
7answers
713 views
Value of a Python programming course
I am considering upping my programming skills by taking a python geoprocessing course through ESRI. Before I part with the hefty registration fee, I would like to get your opinion on the value of 24 ...
18
votes
6answers
3k views
Has anyone found any informative documentation about ESRI's ArcPy Python module?
Has anyone found any informative documentation about ESRI's ArcPy Python module?
17
votes
8answers
642 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?
17
votes
5answers
2k views
How to use ArcGIS functionality in Python without running ArcMap (e.g. separate editor/environment)
I'm trying to take the next step in programming ArcGIS with Python and see if its actually possible to run my script/code without having to load ArcMap and paste them into the Python window. I imagine ...
16
votes
9answers
2k views
How do I develop my GIS programming skills?
I would like to develop my GIS programming skills, where do I start? People say learn C++ or Python but where can I learn this in a geographic context? Tutorials or anything would be very helpful, as ...
16
votes
6answers
9k views
How can I define projections for multiple shape files in ArcMap 10 at once?
I have over 100 shape files that don't have .prj file and thus when I bring them into ArcMap they show the coordinate system as unknown. I know all of the shape files coordinate system is GCS WGS ...
16
votes
6answers
2k views
Is there a way to code-complete arcpy scripts using an external editor?
I have been scripting in Python for ArcGIS 10, and so far I have just been using Notepad++. I like how the Python command line interface code-completes arcpy functionality for you, showing you your ...
16
votes
1answer
3k views
How to divide a polygon into specific sizes using ArcGIS?
I have several thousand irregularly shaped polygons in a shapefile. I want to be able to split each polygon into three areas, and to specify what the size of those areas (they sum to the previous ...
16
votes
4answers
760 views
Run a Python Script when opening an MXD?
Can anyone tell me how to accomplish this? I want a Python script to run on opening the MXD which would pull an excel worksheet into a GDB and refresh the map. I only want this to happen in this ...
16
votes
0answers
310 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 ...
15
votes
6answers
3k views
ArcMap 10.0 Python Field Calculator, Find/Replace Double Quotes
I'm trying to use the Field Calculator (ArcMap (10)) to strip out double quotes in an address field (I didn't put them in there, believe me). I've tried many incantations but am still unable to even ...
15
votes
2answers
487 views
Crashing ArcGIS 10.1 Add-ins Using Multiprocessing
I would like to run a multiprocessing task from a python add-in tool. My issue is that the process keeps failing. Basically crashes ArcMap.
Here is my basic code:
def function(startOID, endOID, ...
14
votes
9answers
1k views
What are the Python tools/modules/add-ins crucial in GIS?
With ArcGIS 10, Python has become the de-facto scripting language for ESRI. While leading Open source software like QGIS, GeoServer, PostGIS all supports Python. Thus it became important to know/learn ...
14
votes
3answers
1k views
Port “Producing Building Shadows” Avenue code to ArcGIS 10
Whuber provided an answer here Producing building shadows? which required using Avenue code. Any idea how to make it work in Arc 10?
Thanks in advance.
14
votes
3answers
1k views
Can i use ArcPy to get layer symbology?
Hello all
Since ArcGIS 10 comes with ArcPy package, i'm wondering it is possible to use ArcPy functions to get Symbology (i.e color, width...) of a layer?
Thanks in advance
14
votes
4answers
6k views
ArcPy and running Python scripts (with parameters) within another Python script
A common coding pattern used in AML was to run an AML (with parameters) inside another AML.
An application that I'm currently developing would benefit from being able to run a Python script (with ...
14
votes
3answers
512 views
Ecological geospatial conundrum
I am looking for a different, more elegant solution to a spatial statistics problem. Raw data consists of an x-y coordinate for each individual tree (i.e. converted to a point .shp file). Although ...
13
votes
6answers
4k views
Nearest neighbor between a point layer and a line layer
I've asked this question several times on stackoverflow and irc between #qgis and #postgis and I also tried to code it or implement it my self in postgis with no real answer.
Using programming (most ...
13
votes
5answers
266 views
Python Development Project - Team working
We have a development project in Python (ArcGIS 10). This project involves a mixture of toolboxes, map templates, layer files, file geodatabase templates (acting as templates being imported into a ...
13
votes
5answers
1k views
Pure Python Library for Geometry Operations
Does anyone know of a pure Python (no C or Java dependencies) library for doing geometry operations such as buffer, union, intersects, etc? I'm looking for something that Google AppEngine compatible. ...
13
votes
1answer
1k views
How to have a python script self terminate in ArcMap10?
I have tried sys.exit, but it doesn't seem to work in ArcMap. Anyone know how to do it?
13
votes
2answers
1k views
How to find the angle between intersecting features in two featureclasses?
I have two intersecting line featureclasses. I want to find the angle at each point of intersection using ArcGIS 10 and Python. Can anyone help?
13
votes
3answers
3k views
What's the easiest way to install GDAL and OGR for Python?
I am developing some code in Python, and I want to use the GDAL/OGR python bindings. What is the minimum I need to install in order to use the GDAL and OGR python bindings?
What is the easiest way to ...
12
votes
4answers
624 views
Python module to delete SHP features (without Desktop GIS installed)
I have a piece of software (not Arc) that runs nightly on a non-production machine which updates shapefile features from an external database. Periodically I would like to delete all of the features ...
12
votes
4answers
631 views
The best language to program with GDAL
I'm going to start to create programs to handle geographical data from a PostGIS server, and going to use GDAL.
According to your experience, with the best language to program with it? I can program ...
12
votes
5answers
3k views
Generate points that lie inside polygon
I have polygon feature and want to be able to generate points inside it. I need this for one classification task.
Generating random points until one is inside the polygon wouldn't work because it's ...
12
votes
3answers
365 views
How are people using Python data structures and classes in Arcpy?
This question may expose my ignorance on programming but I'm curious about how people are using different python data structures within Arcpy.
This page lists the data structures in Python. I ...
12
votes
5answers
358 views
Smallest GIS library for embedded devices?
I need to use very simple geometry operations (read SHP or other standard format and simple searches) within an embedded device running a simple linux based os.
What is the smallest and simplest API ...
12
votes
5answers
4k views
How to get the extent of each polygon in a shapefile?
In arcgis 10 and python I want to get the extent (xmax, ymax, xmin, ymin) info of each of the polygons in a shape file.
I can get the extent of the whole shape file using
...
12
votes
5answers
714 views
How can I programmatically get the path of “Python.exe” used by ArcMap
I am working with an add-in of ArcMap in c#. From c# code, i have executed some python scripts. Now, to run those script, I have hard-coded python path. But this is not portable. So, I want to get the ...
12
votes
4answers
400 views
Mirror of Michigan State University's Python geoprocessing course materials
Been learning geoprocessing with Python using MSU's GEOG 825 ( python geoprocessing ) course. Unfortunately the link is dead now. I know this is a long shot but does anybody have a copy of the ...
12
votes
3answers
6k views
Will ArcGIS 10 support Python 2.7 or Python 3.1?
I'm curious to know whether ArcGIS 10 will support newer versions of Python than 2.6. And for that matter newer versions of NumPy (ie, 1.4, 1.5 etc). I'm sure that this documentation is on the ESRI ...
12
votes
2answers
221 views
File organization for sharing ArcGIS python code
What is the best organizational structure for sharing ArcGIS python code and geoprocessing tools? Or even, are sharing code and sharing tools separate questions?
Esri has a Methods for distributing ...
12
votes
2answers
1k views
How to smooth/interpolate a raster in python using GDAL?
This is my first post so please feel free to critique where necessary.
Background:
I am developing in Python and using GDAL from OSGEO to manipulate and interact with rasters and shapefiles.
...
12
votes
4answers
4k views
How to add an attribute field to an existing Shapefile via Python
I have a Python script that adds an attribute field to a Shapefile if doesn't exist. This is easy to do with ArcGIS (graphically or via Python), but I'm looking for something that doesn't depend on ...
12
votes
2answers
1k views
Multiprocessing Errors - ArcGIS implementation
I was wondering if anyone else in the community here has attempted to use multi-processing for spatial analyses. Namely I am trying to iterate through a series of rasters, create a multiprocessing job ...




