Python is an open source interpreted programming language used in many GIS programs.

learn more… | top users | synonyms

5
votes
0answers
64 views

Competing approaches to line & polygon simplification

There seems to be a few theoretical options around at the moment for geometric simplification. Douglas–Peucker seems the most established, followed by Visvalingam's approach (used by d3.js). Now ...
5
votes
0answers
234 views

Histogram Matching Python

I am trying to do histogram matching using Python to improve the mosaicking process of multiple overlapping rasters. I am basing my code on that found at: ...
5
votes
0answers
591 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
840 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 ...
3
votes
0answers
53 views

How to find the minimum number of inspection points?

I am working on a pipeline inspection project and there is a high liklihood that some inspection tool deployment/retrival station will need to be installed on the pipe network. the problem is ...
3
votes
0answers
48 views

Arcpy in Python Plugin for SPSS

Is it possible to run the arcpy module in the Python for SPSS plugin to run the search and update cursors?
3
votes
0answers
373 views

Reprojecting WGS 1984 Web Mercator (EPSG:3857) in Python with GDAL

I am reprojecting rasters in python using GDAL. I need to project several tiffs from geographic WGS 84 coordinates to WGS 1984 Web Mercator (Auxiliary Sphere), in order to use them later in Openlayers ...
3
votes
0answers
337 views

GDAL polygonize lines

I have a raster file containing roads (left image). I polygonize the raster file with GDAL (see the script below). In the end I like to have vector lines. However GDAL only gives me something like ...
3
votes
0answers
125 views

Handling non-spatial data for QGIS projects with Camelot

Most of my projects include data which is non-spatial or which is point data and can be managed by a regular relational database. Previously I found Manifold and ms-access were a good combination ...
3
votes
0answers
65 views

Is it possible to access individual pages within an existing pdf using arcpy.mapping?

I've used the arcpy.mapping module for some time now to create mapbooks and other pdf documents, using a combination of Data Driven Pages and Python. I would like to take an existing pdf and save each ...
3
votes
0answers
120 views

How to create a Typographic Map with Mapnik

So i am trying to make a typographic map using mapnik. I want the street names along a particular street not to overlap, but I want an intersection between two streets to over lap. Currently some ...
3
votes
0answers
188 views

Is there a Python WMS client (thin client analogue of OpenLayers)?

I'm making a geoportal based on (Geo)Django 1.5, PostgreSQL 9.1 + PostGIS 2.0, QGIS MapServer and OpenStreet Map or Google Maps WMS services for the base layer. It seems like there is no problem, but ...
3
votes
0answers
227 views

Configure Python with Geoserver

I am developing a WebGIS application with: Openlayers 2.12 PostgreSQL 9.2 with PostGIS 2.0 extension Geoserver 2.2.3 Apache 2.0 configured with Tomcat 7.0.35 PROBLEM One of the services of the ...
3
votes
0answers
153 views

How to create a line layer which connects a point layer to a line layer?

In the map shown below, I have manually created the dummy lines (in green). Using python, and without using PostGIS or sextante, I would like to automate the creation of these dummy links between a ...
3
votes
0answers
246 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
297 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 ...
3
votes
0answers
197 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
266 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
521 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
160 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
634 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
72 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
32 views

How to check whether an optional FeatureSet parameter was set by the user in a geoprocessing script tool?

I have created a custom geoprocessing script tool which contains an optional FeatureSet parameter. When unpacking the parameters in the script, the FeatureSet is defined as a RecordSet object, even ...
2
votes
0answers
28 views

Why does python reads only the no data value from GeoTiff file?

I had a number of tiff files with a country's map. They had different rows, columns or different projections etc. I needed to make them with same projection, spatial resolution and same number of rows ...
2
votes
0answers
39 views

Create a simple WPS client

It looks like the only way to get flat files/data from a WPS service is to use a client. I'm looking to create a super-simple WPS client in Python 2.6 (or other language) without any dependencies on ...
2
votes
0answers
39 views

how to make a list of features constructing the dissolved feature?

I need to simplify my road network using the dissolve function to remove nodes not occurring on the intersections. the following code is doing that. arcpy.Dissolve_management(self.address_cor_layer2, ...
2
votes
0answers
51 views

How to detect turns of a route?

I'm doing a Python simulation of a vehicle, driving along a specified path. I generate dummy GPS readings, that fetch the current position of the vehicle, with some randomized error added. After a ...
2
votes
0answers
38 views

How to add nodes into graph

I'm new to qgis and in here I want to find a path between two selected points on the map(Roads-vector layer). The points are selected by the user, using mouse clicks. So here I used the astar ...
2
votes
0answers
153 views

Running x64 bit geoprocessing Python in Python IDLE 2.7.6 x64 error

I am trying to set the Python IDLE 2.7.6 x64 to run the arcpy module from ArcGIS x64 bit geoprocessing (10.2.2). I copied the file DTBGGP64.pth from C:\Python27\ArcGISx6410.2\Lib\site-packages to ...
2
votes
0answers
64 views

Convert a classification image to aggregated polygon in shapefile using gdal/python

My goal is convert a 2D numpy array to shapefile. The matrix results from a classification, so the numbers have a meaning. I solved my problem, but the solution is somehow involuted and complicated. ...
2
votes
0answers
52 views

Can't remove the little islands when creating a svg map with kartograph.py

I'm new to python and to kartograph. I'm using it to create a map of France, Italy, Portugal and Spain. But I don't want the little islands (mainly the French ones ), causing the generation of a big ...
2
votes
0answers
56 views

ArcGIS10.2 crash opening python window

I was trying to test the data management commends in python, yet arcgis crash every time I I try to open to python window. According this post, it is the python version issue. I do have other versions ...
2
votes
0answers
27 views

Compare line with next line in attribute table shapefile

I am making a python code for ArcGis 9.3. The aim is to compare the value of my field "ID_BV" at line l with value of field "ID_BV" at line l+ 1. And depending of the test answer i populate another ...
2
votes
0answers
122 views

Python problem visualization .tif image

I am trying to read a hyperspectral image in Uint16 .tif format and visualize it. I use GDAL in Python to read the data and everything works perfectly when I use matplotlib to show one band of the ...
2
votes
0answers
75 views

How to detect broken hyperlinks with arcpy?

I have zero experience with python but am trying to search for broken hyperlinks in a large gdb (temporarily converted to a shapefile)- Used code from a previous question (Hyperlink broken path - ...
2
votes
0answers
57 views

Identify different networks inside a line shapefile

I'm dealing with a quite big line shapefile containing road tracks. The roads are connected to each other, creating distinct networks. These networks are independent and they are not connected to each ...
2
votes
0answers
44 views

QGIS: rotatable markers with offset from point

Im wondering, if its possible (in QGIS), to set a rotatable marker with offset from point, like in my example below. Any suggestion?
2
votes
0answers
81 views

How can i add a north arrow in QgsComposition?

I'm trying to add an svg image of north arrow in QgsComposition using this code: mapRenderer = iface.mapCanvas().mapRenderer() theComposition = QgsComposition(mapRenderer) ...
2
votes
0answers
87 views

How to display images as cross sections in 3d

I want to display a base map and several vertical cross sections in 3D. The base map image is easy to rectify as a geotiff. How can I also display the cross sections? The cross sections are at ...
2
votes
0answers
69 views

python equivalent of spatstat's spatial point process functions

Is there a free python package (i.e. PySAL?) that implements the standard summary statistics for spatial point processes, e.g. the F, G, J, and K functions? I'm happy to use R (i.e. spatstat) if ...
2
votes
0answers
88 views

Zonal Statistics using Gdal and Python

I recently came across a loop_zonal_stats function by @ustroetz found here: Issue Trying to create Zonal Statistics using Gdal and Python.. I am using a (single) polygon shapefile and a raster file to ...
2
votes
0answers
55 views

Calculate size of area where data values exceed certain limit

I am using Python and Basemap to plot sea ice concentration within the Arctic region. I need to calculate the total area (square meters) where the sea ice concentration exceeds a certain limit (e.g. ...
2
votes
0answers
32 views

How to Complete ModelBuilder Process Quicker?

I've built a script tool in ArcGIS's ModelBuilder to collect parameters from the user and use them as arguments for another python script. The output of this script is a text file. The only GIS ...
2
votes
0answers
36 views

Extract MultiValuesToPoints yields identical value for each band

I'm attempting to extract hyperspectral remote sensing data to a point featureclass using the ExtractMultiValuesToPoints ArcGIS tool. The value of each band (228 bands) should be appended as a field ...
2
votes
0answers
135 views

What causes Scripting Error 000714 in ArcGIS when using GetParametersAsText?

I am trying to create a script tool in ArcGIS 10.2 in order to incorporate into a model. The script needs to incorporate three inputs which i've built using GetParameterAsText function then setting up ...
2
votes
0answers
228 views

How To Export Selected Data Driven Pages to PDF?

I have a map book with data driven pages that shows the fire boundaries, roads, etc for our fire rescue department. I want to automate the process of creating individual mini map books for each fire ...
2
votes
0answers
132 views

Generate tiles using GPU

I was wondering if anyone has tried already to utilise the GPU in tile generation? I have a quite big dataset so tile generation takes a while (especially on high zoom levels) even on a quite high ...
2
votes
0answers
196 views

Is there a way to execute FME transformers from a PythonCaller script in an FME workspace?

I have a very large and complex Python/arcpy script that does lots of custom calculations, and I am trying to port it to an FME environemnt. The script runs beautifully under ArcGIS. The problem in ...
2
votes
0answers
143 views

How can I create random concave polygons for test purposes?

In the context of generating random test data using QGIS (in a shapefile): I can generate random, continuous (adjacent) polygons by first creating n random points using ftools and then generating a ...
2
votes
0answers
193 views

Finding coordinates from a nested grid as a numpy array

So this is a pretty basic question, but I'm trying to figure it out. I've written a script that allows a user to read in a raster and provide a cell resolution, and outputs the amount of cells ...