1
vote
1answer
51 views

How to have PostGIS 2.1 and the Python osgeo library installed together without compiling from source?

My python application makes heavy use of the osgeo library. We're looking to upgrade from PostGIS 1.5 to PostGIS 2.1, and I'm having issues. I'm installing packages from the Ubuntu GIS PPA. Before, ...
0
votes
1answer
73 views

Missing QGIS raster menu tools - '“osgeo [python-gdal]” module is missing'

I recently had to reinstall QGIS (version 2.2.0-9) and the raster menu is missing its tools. I understand that the GdalTools plugin must be installed and enabled. I have already installed the GDal ...
3
votes
1answer
110 views

Are the functions in OGRPolygon accessible through the python bindings?

I'm currently trying to use the OGR python bindings to process some shapefiles. I want to obtain the number of interior rings in a polygon feature. Unfortunately I'm unable to use the documented ...
0
votes
2answers
74 views

Get srid from a shapefile using ogr

I'm writing a script to import shp to postgis, using python, osgeo and psycopg2 ( see my previous question: Import shp to Postgis using Python and ogr ) I'd know if there is a way to get by osgeo ...
1
vote
0answers
48 views

Error while retrieving a WCS coverage with GDAL

I'm currently using the OSGeo-Live 7.0 (Link) image to write a PyWPS process. Part of this process is to retrieve a WCS layer with GDAL (from a GeoServer instance). Since GDAL supports WCS out of the ...
1
vote
1answer
379 views

OSX 10.9 + QGIS 2.0.1 - Missing osgeo module

Running the following: QGIS 2.0.1 (via Kyngchaos) OSX 10.9 GDAL/OGR 1.10.1 (via Homebrew). Recently, I've become unable to use the OpenLayers plugin, which is complaining that I'm missing the ...
1
vote
1answer
113 views

Writing array to vrt

I would like to write an array from a single band image to a 3 band vrt where each band has the ColorInterpretation() tag of red, green, blue respectively. My code below; from osgeo import gdal ...
1
vote
1answer
119 views

SetColorInterpretation() for a GeoTiff using GDAL not working

I have a single band image which I would like to copy to a 3 bands of a new image and set the ColorInterpretation to red, green and blue respectively. I have tried two approaches, one using the GTiff ...
1
vote
1answer
570 views

GDAL loads in Python, but not IPython (Linux)

I am trying my hardest to utilize the work of the good folks at the GeoDa center, but I cannot seem to get all of the components to load. GDAL, in particular, has been giving me some difficulty. The ...
2
votes
1answer
343 views

Clip and copy files to same directory structure using OGR/GDAL with Python

We need to clip all our data (many TB) by a new boundary and save it while maintaining the same data structure. I want to use OGR/GDAL as the data is in shp/tab/kml/geoTif/ecw etc. I can find the ...
2
votes
2answers
289 views

How to use gdal module in python

I am trying to import gdal modules from osgeo installed in my win64x machine but I get the following error: Traceback (most recent call last): File "", line 1, in from osgeo import ogr ...
1
vote
1answer
93 views

Gdal2tiles with tif projection failure

I downloaded this .tif image of the world (small version) from Natureal Earth and tried to convert it to tiles using Gdal2tiles in OSGeo4W. In the terminal, I used the following commmand: gdal2tiles ...
0
votes
1answer
882 views

Display a georeferenced DEM surface in 3D matplotlib

I want to use a DEM file to generate a simulated terrain surface using matplotlib. But I do not know how to georeference the raster coordinates to a given CRS. Nor do I know how to express the ...
1
vote
1answer
418 views

importing osgeo module in ubuntu 10.04

I have problem with importing "osgeo" module in ubuntu 10.04; I have installed GDAL 1.7 from source ( 1)./configure 2)make) however, still in python I cant import osgeo module. I appreciate any hints. ...
1
vote
0answers
155 views

using GDAL/OGR (faster)

Eventually, I was able to get the GDAL installed and compiled correctly using Visual C++ 2010. I even tested some of its methods on some geo-referenced raster files, and it looks like that all is ...
2
votes
1answer
177 views

OGR CreateLayer returns TypeError

I'm trying to create a shapefile layer based on the spatial projection of an already existing raster. (Ultimately, this will be used in gdal.Polygonize to get a shape from my raster data.) However, I ...
1
vote
1answer
79 views

A way to log the output from the Msys terminal in OSGEO4W?

Is there a way to log all the text output from commands in the Msys terminal to a text file when using OSGEO4W in Windows? I'm using GDAL commands and specifically wish to record any error messages ...
3
votes
1answer
220 views

How to run OSgo4W shell script on Windows?

I have a lot of DEMs that I want to use to create hillshades, slopes and color relief from and would like to automate the processes using a shell script within OSgeo4W shell. Here is the code I used ...
1
vote
0answers
102 views

VSIMalloc3() and UnifiedSrcDensity mask errors when running gdal_warp in OSGEO4w shell

This is related to gdal.py as part of bat script in windows 7 I am getting ERROR 2: VSIMalloc3(): Out of memory allocating 854522136 bytes. ERROR 2: Out of memory allocating 119813400 bytes ...
10
votes
2answers
2k views

How to split shapefile per feature in Python using GDAL?

is it possible to split a shapefile per feature in python? (best would be a solution where i can temporarily save the resulting vector objects to the memory instead to disk). The reason: I want to ...
1
vote
1answer
382 views

Converting arcpy based python script to OGR for semi-automated Metadata creation

I have created a script to automatically generate base ANZLIC standard metadata using arcpy based coding. Can anyone help me convert it to OGR/GDAL python? This is so that it can be run in QGIS and ...
1
vote
1answer
411 views

Why do I get different results with gdal_calc within the osgeo4w shell and QGIS' raster calculator?

I'm just wanting to make a simple map algebra operation in the osgeo4w shell using gdal_calc but I get wrong results when I divide one raster with the other. When I use the same rasters in QGIS and ...
8
votes
1answer
358 views

Is there a way to properly have GDAL raise exceptions in Python?

I am working with GDAL in Python and have wanted to get GDAL to raise exceptions so that I can do something useful with them. For instance if a file cannot be opened with gdal.Open() I would like to ...
6
votes
2answers
599 views

What Open Source (command line/API) method is there to orthorectify and georeference an aerial image given telemetry data?

How can I take an image and orthorectify it automatically with open source software? The information associated with each image is: camera specs latitude, longitude, elevation of the camera ...
0
votes
1answer
1k views

Import Error while Importing osgeo package [duplicate]

Possible Duplicate: How to install GDAL with Python on windows? I have downloaded Fwtools for python2.5 from http://fwtools.maptools.org(windows installer) after installing it, it was ...