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

learn more… | top users | synonyms

7
votes
0answers
177 views

Geotransformation for polar stereographic?

I'm currently working to import CANGRID climate data (provided as Surfer Grid ascii, ".grd" files) into ArcGIS. The grid is 95 rows by 125 columns in size.Metadata provides lat/lon of origin (lower ...
6
votes
0answers
328 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
606 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
88 views

Focal Statistics for Special Neighborhood

I'm looking to calculate focal statistics for each cell of a raster, within a neighborhood of a specified criteria. Background - I have three binary rasters, each representing a single vegetation ...
4
votes
0answers
70 views

How to create a python plugin in QGIS 2.4.0?

While I am learning to create a python plugin in QGIS 2.4.0, I have followed the proceedure expalined in ...
4
votes
0answers
1k 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
13 views

Action: Move pointfeature to other layer - Point becomes Multipoint

I'm trying to write an action that moves a pointfeature from one layer to another. It works fine until i try to save the layer with the new feature on. He says he can't save a MULTIPOINT to a ...
3
votes
0answers
54 views

arcpy.mapping.ExportToTIFF fails to render layer?

Has anyone else had this problem? I have an mxd file with two layers in it, one of which is fairly 'heavy' (i.e. takes a minute or so to draw). All layers are visible by default. I have the ...
3
votes
0answers
66 views

Select and copy attributes features in ArcMap using Python add-in tool?

I'm trying to add a tool to an add-in toolbar to select features from an existing feature class and copy attributes to another feature class,from point to point. TopoHeight_Field_Name='Comment' def ...
3
votes
0answers
70 views

How to use Python's subprocess module in a for loop ArcGIS?

I am new to scripting with ArcGIS. Although this might be an easy thing for those that know Python well, I haven't figured out how to use the subprocess module in a script. I actually think I'm ...
3
votes
0answers
37 views

Get value from Metadata in Python Script for attribute

I am working on a python script to create some feature classes from dbf tables. As part of the script I would like to pull two values (FGDC "publication date" and ArcGIS Spatial Reference ArcGIS ...
3
votes
0answers
27 views

Overriding the QGIS Feature Dialog

We are developing a QGIS plugin and would like to override the QGIS Feature Edit Form with our own Dialog. Have explored using setEditForm and setEditFormInit, but the init process appears to want to ...
3
votes
0answers
63 views

Problem with performance when loading PostGIS layer using pyQGIS

I'm having a question on loading a PostGIS layer into the project from my QGIS plugin. The code is like this: uri1 = qgis.core.QgsDataSourceURI() uri1.setConnection(str(host), str(port), ...
3
votes
0answers
89 views

How to compute (X,Y,Z) of a point from given attributes

Is there a way to compute the geodetic coordinates (Earth Centered) of a satellite S(x,y,z). The original problem is to compute the footprint of an antenna, given the following information: ...
3
votes
0answers
68 views

Create vector grid from canvas using script

I've modified "Hex grid from layer bounds" script to my need. Just added cellsizex and cellsizey. Changed the hexagonal - 3 to "1" to make it as a square grid. Is it possible to include an option to ...
3
votes
0answers
73 views

Performing buffering and intersection with script in PyQGIS

I wrote a script that performs the intersection of two layers: The first Layer -> layer1, represents the rivers The second Layer -> layer2, represents a set of circular dots distributed in a ...
3
votes
0answers
46 views

ArcPy: Initialize zero valued grid Raster and iteratively increment

I'm jumping right into ArcPy to help out a friend who needs to automate some ArcGIS work. The problem at hand can be reduced to the following pseudocode: accumulationRaster = SomeZeroedRaster for ...
3
votes
0answers
129 views

QGIS API - Print Composer Template produces empty map?

I have a print composer template which I'm trying to populate with different subset queries from a CSV-derived vector layer using the Python API. However, all the output PDFs contain everything except ...
3
votes
0answers
67 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
67 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
570 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
140 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
227 views

How to convert a raster (array) to a NetworkX graph and do a * search?

I want to use a slope-raster for a a_star path analysis in NetworkX. I am using Python for this project. My test raster looks like this First I read in the raster with GDAL input_raster = ...
3
votes
0answers
71 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
153 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
226 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
286 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
302 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
335 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
312 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
176 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
797 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
75 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
53 views

Matplotlib error when installing Molusce or lifemapper in QGIS Brighton

I am installing plugins via the QGIS desktop internal interface, and have had twice now messages associated with matplotlib. The first error was for something called lifemapper and now for MOLUSCE. ...
2
votes
0answers
47 views

How to add column to attribute table using field calculator with $length function?

I used the following code to add a separate column to the attribute table with the length of features. from PyQt4.QtCore import QVariant from qgis.core import QgsField, QgsExpression, QgsFeature ...
2
votes
0answers
25 views

Diminishing performance of gdal_polygonize in a python subprocess for GRASS to PostgreSQL

I have written a python script to polygonize GRASS rasters into a PostgreSQL database using the gdal utility gdal_polygonize: sub.call('gdal_polygonize.py -8 gdb/quercus/{0}/cellhd/{1} -f ...
2
votes
0answers
56 views

Python script for dark object subtraction on Landsat 8 Imagery

Does anyone know of any python scripts that will allow me to conduct such a process? I am limited to open source software and have minor experience in Python.
2
votes
0answers
37 views

What is the issue with geopdf format?

I'd like to add the geopdf format as output of a library that I am working on. After have looking around, I have not been able to find a (c, c++, python) library that meet my license requirements ...
2
votes
0answers
59 views

Iterating between two layers using QGIS python

I will try and explain my situation as clearly as possible. I just created my first plugin that is being used to analyze between various layers and give back quantities to the user. Most of it is ...
2
votes
0answers
51 views

Correcting addresses with Python or Model Builder

I am trying to make a script in Python (or Model Builder in ArcGIS) for correcting addresses. I have a point shapefile with the addresses (it has X and Y, and fields for "number", "street name", and ...
2
votes
0answers
65 views

Nested conditional statement in ArcGIS on multiple rasters

I have a list of rasters in ArcGIS and I want to create a conditional (Con) nested statement based on all the rasters of the list. I want this to be reiterate through many lists (the number of rasters ...
2
votes
0answers
57 views

Developing workaround to arcpy.asShape truncating all values to 3 decimal points?

I've read a few questions\answers about converting a GeoJSON Shape into an ESRI Object. Unfortunately most of the answers pointed to decoding the dictionary's manually. Im a bit more lazy ^_^ The ...
2
votes
0answers
29 views

How to move feature using python console in qgis

i am building a qgis plugin that can create as much copies of a selected feature as i want and paste it to my required place.I have code to copy and paste feature select = ...
2
votes
0answers
41 views

Kartograph - AttributeError: _Shape instance has no attribute 'parts'

I am new to GIS and open source tools so bear with me. I am attempting to convert a shapefile to svg by running kartograph as a python module. My source file (provided by the local GIS ...
2
votes
0answers
43 views

Validating whether PDF file Uploaded as part of Geoprocessing Service of ArcGIS for Server?

I'm developing a Python Script that will be a Geoprocessing Service in ArcGIS Server. The Script has a Button for Users to OPTIONALLY Upload a PDF. If the PDF is Uploaded it gets inserted into the ...
2
votes
0answers
71 views

Setting up pycharm and pyqgis

I wanted to set up PyCharm the way this blog post explains: Setting up PyCharm for PyQGIS and Qt. I did everything as instructed but when it comes to adding project interpreters I got this error ...
2
votes
0answers
36 views

How to Use GetGeomtype Gdal Python

I am just wondering what I am doing wrong when trying to use the GetGeomType. I need to focus on separating layers from a pix file. Two categories are the bitmaps(which are vectors) and then the ...
2
votes
0answers
79 views

Script to unzip a file geodatabase fails with Memory Leak

Hijacked the ESRI script to unzip. After research I found there is a memory leak. There are three zip files I download on a regular basis. Each .zip contains one (1) .gdb. The largest is 2 GB zipped, ...
2
votes
0answers
45 views

QGIS 2.2.0-Valmiera 64bit on windows 8.1 displays error while creating ROI in SAC plugin

I don't know what happened while creating ROI during Classification using Semi automatic Classification Plugin 3.1.0 "Rome" installed on hp Pavillion i7 with windows 8.1 When i started to generate ROI ...
2
votes
0answers
57 views

Identifying certain polygon from overlapping set

To clean up a large shapefile, I am looking for a way to do the following: I have the ID of many polygons which need getting rid of stored in a list. These polygons are villages and a second ...