Python is an open source interpreted programming language used in many GIS programs.
16
votes
0answers
296 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 ...
11
votes
0answers
203 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 ...
11
votes
0answers
240 views
Python Plugin Development in QGIS: How to access label text?
I'm trying to create some custom labels for point features in a QGIS point vector layer, and I want to write a python plugin to do it. We need our labels to be presented with color tinted rectangles ...
7
votes
0answers
182 views
Two machines running the same arcpy based software - only one is leaking memory
Ok, so I'm running a rather large Python application based on arcpy on two separate machines - one of them is leaking memory and one is not. Both are running the same operation in the software.
The ...
6
votes
0answers
136 views
Python script to read CAD data to find polygon extents
I have Civil 3D 2012 with ArcGIS for AutoCAD 300. I want to read the extents of a polygon in the drawing. Feature Class in A4A300 = Boundaries, the CAD layer is PROP-BNDY, there is only one polygon on ...
6
votes
0answers
807 views
Add layer to open mxd using ArcObjects from outside the map document crashes ArcMap
I have an Access database (MS Access 2010) that allows users to enter a variety of land treatment information including associated points, lines, or polygons which users can select and the database ...
5
votes
0answers
91 views
How to detect a GDAL/OGR 'Warning'?
When I run a batch script using a GDAL/OGR program, I can detect if an error occured by checking ERRORLEVEL for the value 1.
When using GDAL/OGR in python or .NET, I get an exception when an error ...
5
votes
0answers
79 views
How to automatically place parcels on suitability map?
I need to make a map that randomly places parcels (groups of pixels or polygons) on a suitability map by first filling the most suitable areas, then the next most suitable and so on, until a ...
4
votes
0answers
190 views
Batch Converting ASCII into Feature Classes using shapefile lists
Problem. I have 413 ASCII files totalling 4 billion points, and my system cannot handle converting them to MULTIPOINT so that I can generate Terrains. Therefore I would like to create 12+ subsets of ...
4
votes
0answers
108 views
Python: “Import Script” greyed out
I have a tool that I created from a Python script which I update from time to time. Usually I will right-click the tool and choose Import Script, but lately this has been unavailable, as shown below:
...
4
votes
0answers
396 views
Inserting a script into ArcGIS model-builder
I am looking for some tips about inserting a script in the model-builder...
I am actually building a model in the Arc-GIS model-builder. At one point I would like to insert a script that crosses ...
4
votes
0answers
401 views
How to get rpy2 for QGIS on OSX?
I am a new QGIS user, have installed QGIS on a Mac running Snow Leopard OSX 10.6.8 following all the instructions. QGIS seems to work well for everything other than when I boot up I get the message
...
4
votes
0answers
510 views
Multiline VBScript Label Expressions in Arcpy
I am able to set simple label expressions, but when I try to set multiline expressions (which all VBScript expressions are) it does not get copied into the expression box properly. I have tried using ...
3
votes
0answers
53 views
Create easy Annotations from point features with python in ArcGIS 10.0
Because in ArcGIS 10.0 there is still no simple toolbox function to convert labels to Annotation, I try to go a substitude way with the callable Toolbox function [TiledLabelsToAnnotation][1] on a ...
3
votes
0answers
60 views
AGS 10.1 geoprocessing service returning the wrong URL
I have an image export geoprocessing service that runs on ArcGIS server 10.1. It works by writing an image out to the scratch folder, and returning the location of that image.
Basically just this:
...
3
votes
0answers
59 views
Finding optimal network with python and network analyst in arcgis 10.0
Hello GIS StackExchange,
I'd like to know if there's any way to find the shortest distance across the diagonals of a polygon. I am creating a network analyst solution to determine the most cost ...
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 ...
3
votes
0answers
107 views
Python coding question, looping through feature classes, AddField, CalculateField, then errors (might be schema lock)
This is not a SDE question. File GDB.
Hi, I have a general question on looping through feature classes in a file geodatabase. I have (attached) a python script that adds a ton of fields and ...
3
votes
0answers
73 views
How do I write XML metadata with Python?
Some Python software I have written generates raster files via GDAL. I would like the software to create an XML metadata file for each raster so that I can include details about how the raster was ...
3
votes
0answers
90 views
Draw two separate lines from A to B and B to A
I have an Origin-Destination table like this
Origin Destination Value
A B 10
B A 100
A C 120
...
For all the locations A, B, C... I have another table indicating their location (Lat and Lon)
Is ...
3
votes
0answers
129 views
Importing matplotlib basemap and shapely
I'm not sure if this is the right place to ask this, but here we go.
I have a python script that uses matplotlib's basemap and another part that uses shapely to do an intersection of 2 polygons. If ...
3
votes
0answers
141 views
Reset python add-in
I have a toolbar which enables a second and third combobox when a selection is made on the previous. I would like to add a button to 'reset' the toolbar. Basically reload the toolbar to it's original ...
3
votes
0answers
75 views
How to merge SeaWiFS and MODIS data or use other merged products?
I hope to produce a time-series for sea surface temperature (SST) and chlorophyll-a (Chl-a) for use in MaxEnt without the use of arcgis, preferring Python tools to others. I am new to satellite data ...
3
votes
0answers
66 views
How to enable SDE Archiving with python and the SDE api ArcGIS 10.0
I have a script that does some register as versioned and updating privileges. How would I call into the c api for ArcSDE to enable archiving with python?
...
3
votes
0answers
245 views
How to create mask bands in GDAL and Python?
I have small program in Python that uses gdal and numpy to perform a logarithmic scale of some data into the RGB 0-255 range.
Now this input data has a nodata value set to mask the valid values, and ...
3
votes
0answers
394 views
How to load data programmatically from shapefile into feature class (geodatabase)?
Can some Genuis here help me programmatically (using python and comtypes) load shapefile data in to an existing geodatabase (feature class). The attributes of the shapefile has to match with the ...
2
votes
0answers
72 views
How to interpolate GPS data correctly?
I'm working on a project that involves using linear interpolation to fit lines to
lat/lng points. I'm pretty new at scientific programming related stuff, and I was wondering if people could steer me ...
2
votes
0answers
42 views
traversing KML files with ogr python
i'm new to OGR processing and KML format so be gentle:
i've got a series of KML files all containing multiple regions partitioning a larger area in each. i also have a series of geocoded points for ...
2
votes
0answers
72 views
Extracting x,y,z values from a postgis linestring to python using ogr
I am trying to load a postgis linestring into python (using ST_DumpPoints) and extracting x,y,z coordinates, which is working but extremely slow..and if i mean slow, i really mean it (yes, it takes ...
2
votes
0answers
64 views
draw lines with an angle inside a rectangle in python
I am trying to make a plugin for Qgis with python. I have the four corner coordinates for a rectangle. I want to give the user the inputs, line space and angle (0 -180 degrees).
With these inputs, I ...
2
votes
0answers
60 views
Custom python datasource to QGIS
I'm working on a homebrew spatial feature data format, and using Python to write it's API.
It occoured to me that use some tool like QGIS to display my data would be very nice to have, for debug/test ...
2
votes
0answers
94 views
Python script to create a point on a line with attribute data
I have a line feature class with 2 lines (Engineering and Continuous Station series) co-incident on each other. I have created a toolbar(ArcGIS Desktop add-in 10.1) with 3 tools on it, add control ...
2
votes
0answers
73 views
Running a new iteration for each column of a dataset in ArcGIS
I'm pretty new to Modelbuilding, having just been turned onto it about a week ago on here. So my problem is, I currently have a dataset of habitats that change through time (from Immature to Mature, ...
2
votes
0answers
48 views
Arcpy: Counting number of segments where altitude rises or decreases based on DEM?
I have a DEM of Sudety mountains and linear .shp with several hiking paths.
I'm trying solve one problem: How to make a script based on input DEM and input line shapes that would count number of ...
2
votes
0answers
213 views
gdal ImportError in python on Windows
Trying to import gdal for Python 2.7.3 on Windows XP:
>>> import gdal
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ...
2
votes
0answers
80 views
Getting SAGA-GIS Python Bindings without compiling from source
I am very new to SAGA-GIS, but I recently developed a workflow using SAGA for processing LiDAR data. Now I need to batch the process using Python. I installed SAGA from the Windows installer and I ...
2
votes
0answers
90 views
automate color palette generation?
I frequently am in need of color gradients that aren't readily available through ArcGIS or the ColorBrewer add-in. I find the process of manually creating gradients in Arc very tedious: saved custom ...
2
votes
0answers
83 views
projection discrepancy with gdal (1.9) and proj4
I boiled the problem down to that python example:
import sys
try:
from osgeo import gdal
from osgeo import osr
except:
import gdal
import osr
if __name__ == '__main__':
version_num = ...
2
votes
0answers
50 views
Is there a way to distinguish between digitized and pasted features?
Is there a way to tell if an added feature in QGIS is in fact a newly digitized one or a pasted feature?
I think QGIS is treating both cases in the same way, emitting the same signal:
...
2
votes
0answers
64 views
Convert geojson labels MBR to MapInfo text object
Im using Dymo (https://github.com/migurski/Dymo/) to generate automatic point labels placement. The output of Dymo is a geojson containing MBRs of the positioned labels with the names of the labels in ...
2
votes
0answers
193 views
How to access mysql data from python built-in console?
I'm writing a QGIS Plugin, and somewhere I want to present data from a MySQL database. It's simple data(strings,etc), not Geospatial, or vector data. I'm familiar with querying databases from python ...
2
votes
0answers
51 views
How do I make a path cross the most possible classes in a raster?
I want to create a function and possibly use Arcmap tools to create something similar to Cost Path. Instead of just choosing the LCP, it must cross through the most different integers. Let's say I ...
2
votes
0answers
110 views
Why would an ArcGIS 10 Python custom tool fail without throwing a “failed to execute” or “completed script” message at the end?
I have written a custom tool in Python for ArcGIS that converts in batch SHP files to GML files. It processes one file at a time in a folder, file, or ZIP file and then moves on to the next. If the ...
2
votes
0answers
181 views
Creating a model to run a complex query
I'm just a rookie when it comes to creating models in ArcGIS. I have two shapefiles from which I need to calculate an AVG and a MAX erosion rate for individual properties.
The two shapefiles are:
...
2
votes
0answers
51 views
Adding points to represent non-chosen locations
I am looking for a way to set up a discrete choice model in ArcGIS for foraging behavior of individuals, in a grid of 15 locations. To do that I need a point for every possible choice they could have ...
2
votes
0answers
270 views
Add CAD Drawing Dataset into ArcMap using Python
I am trying to add an CAD Drawing Dataset into ArcMap using Python.
Question is how to add a Auto-CAD .dwg file to ArcMap using Python
Normally comes in as CAD file within a Group layer with:
...
2
votes
0answers
140 views
Auto Increment Attribute Based on Nearest Point
An authority I am working with would like their Hydrants, a point shapefile, to be renumbered based on their location. I am looking for any python script that would help me A. Find the next closest ...
2
votes
0answers
141 views
Are there Plugin Compatibility Issues between QGIS 1.6.0 and 1.7.4?
I've been working on a QGIS plugin on Quantum GIS 1.6.0 Copiapo with Python 2.5 that calculates additional values for eachf feature of a vector layer and adds them to the .dbf. We've just upgraded to ...
2
votes
0answers
153 views
Recalculate Quantile Breakpoints in CalculateField_management loop?
I have a program that iteratively replaces a temp field where I choose a certain symbology (color ramp and quantile color break methodology) with a few other fields from a join. The program works in ...
2
votes
0answers
230 views
Can I use python to do the job in ArcMap 10 Editor toolbars, such as command: Copy Parallel, Move
Since VB can activate the Editor, then use the tools listed in the Editor, such as copy parrallel, I am wondering whether Python can do the same job? I have been searching the website all day. Still ...


