GDAL is an open source translator library & utilities for raster geospatial data formats. As a library, it presents a single abstract data model to the calling application for all supported formats. It also comes with a variety of useful commandline utilities for data translation and processing.
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 ...
22
votes
2answers
255 views
A comprehensive, user-friendly GDAL manual?
I'm becoming a real fan of using GDAL tools in a bash terminal. However, I quite often get stuck trying to solve particular problems, or getting syntaxes right. Apart from the details provided in the ...
19
votes
2answers
1k views
Can ESRI's File Geodatabase API be Redistributed?
ESRI's file geodatabase API can now be used with GDAL/OGR - http://www.gdal.org/ogr/drv_filegdb.html however each individual seems to have to login to ESRI and download the API files individually. For ...
16
votes
3answers
2k views
What is Lanczos resampling useful for in a spatial context?
GDAL includes a resampling method beyond the normal mix of nearest neighbor, bilinear, cubic and splines: "Lanczos windowed sinc resampling". I understand that its a convolution filter, but unlike ...
14
votes
6answers
3k views
Should GDAL be set to produce GeoTIFF files with compression? Which algorithm should be used?
I have a folder of GIS data that consists mainly of GeoTIFF files. The whole set weighs in at about 1.2 GB. I noticed that if I pack the contents into a tarball, it smashes down to about 82 MB. I ...
14
votes
5answers
3k views
How to cut a 'tiled image' from a raster dataset using GDAL?
I am working on an app that needs to create tiles (jpeg) from a given raster dataset. My initial inclination was to use gdal2tiles.py, but its performance seems like it could be improved.
That leads ...
13
votes
3answers
4k views
How do I change geotiff “no data” color to white/transparent rather than black?
I am preparing data for inclusion into a geonetwork node, where the maps are displayed via geoserver. The problem is that cells that have"no data" are displaying as black in the geotiff and I am would ...
13
votes
1answer
705 views
Good practice for generating contours from a DEM
We have just received a large set of DEMs at work and I would like to generate contours from them. The DEMs have a resolution of 1m and a size of 1kmx1km.
Output from gdalinfo:
Driver: ...
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
625 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
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
3answers
5k views
How to georeference a web mercator tile correctly using gdal?
As an example I will take the following tile http://a.tile.openstreetmap.org/3/4/2.png and save it as "4_2.png".
The WGS84 coordinates of this tile can be calculated or read there by clicking the ...
11
votes
2answers
343 views
How to equalise colour, brightness and contrast across several scanned paper maps
I am a vectors guy mostly, but for a current project I need to work with a bunch of old scanned paper maps (ww2 bomb damage maps for London, if your interested!)
We scanned and georeferenced the ...
11
votes
1answer
101 views
Assign projection to a satellite image
Today I stumbled upon a picture taken from the ISS looking down Europe and it is really beautiful.
So, I started thinking I could add more to the picture. Like world borders, cities, road network, ...
10
votes
3answers
844 views
Writing numpy array to raster file
I'm new to GIS, and I'm lost with something I feel ought to be relatively simple. I have some code that converts infrared images of Mars into thermal inertia maps, which are then stored as 2D numpy ...
10
votes
1answer
149 views
How to use GDAL with PyPy?
I am trying to optimize my python code using pypy. While I am able to import most libraries and run succesfully, I am not able to import GDAL libraries. The same libraries when imported in Python 2.7 ...
10
votes
2answers
251 views
How to reproject raster from 0 360 to -180 180 with cutting 180 meridian
I have a geotiff raster image that has a coordinate system with longtitudes from 0 to 360.
The horizontal center of the image is 180 longtitude. See image below:
I want to transform it to EPSG:4326 ...
10
votes
1answer
588 views
Understanding the Map Tile creation properties
I am trying to create a tile base map.
I have an image that I want to create the tile from and I am using GDAL.
I managed to create the tiles but when I view the result it seems that the tiled map ...
9
votes
3answers
930 views
getting dxf files out of PostgreSQL
I've successfully loaded a bunch of shapefiles into a PostGIS database. I would like to be able to retrieve specific geometry and layers as dxf files based on SQL queries.
I'm using PostGIS, GDAL, ...
9
votes
2answers
1k views
API documentation for Gdal/Ogr with C#
I want to assign projection to shapefile in my web C# application, for this i am using Gdal/OGR/OSR C# bindings and add osr_csharp.dll and ogr_csharp.dll references. But i am facing some difficulty ...
9
votes
1answer
498 views
How to access feature classes in file geodatabases with Python and GDAL?
I am trying to access a vector dataset in a ESRI File Geodatabase using Python + GDAL.
I have successfully compiled GDAL with the file geodatabase API. The FileGDB driver is working correctly since ...
9
votes
2answers
468 views
GeoTIFFs made in GDAL don't have min/max range when loaded in Arc/QGIS
I'm creating some floating point rasters in GDAL with the GeoTIFF driver. When I load the resulting images into QGIS or Arc the default symbology puts the min at -3.40282e38 and max to 3.40282e38, so ...
9
votes
2answers
336 views
Gdal Dataset.ReadAsArray() crashes Python
I am using Python 2.6.5 (32bit) with Numpy 1.3 and Gdal 1.9.1 installed on Windows 7 64bit. I am trying to read an 800 MB Imagine (.img) raster dataset into a Numpy array to do some raster algebra, ...
9
votes
1answer
226 views
OGR/GDAL threading results in low core utilization
I'm trying to process some raster data using ogr/gdal and I can't seem to get full utilization of all the cores on my machine. When I only run the process on a single core, I get 100% utilization of ...
9
votes
3answers
618 views
How to call gdal_translate from Python code?
Is it possible to use some gdal API to call gdal_translate from Python code? I do not mean simply executing the gdal_translate.py from the file system, but rather call it somehow in code so I do not ...
8
votes
6answers
766 views
How to add field with filename when merging shapefiles with ogr2ogr?
I'm merging some shapefiles and I had some problems doing so inside QGIS, so i'm using ogr2ogr directly.
I'm doing this (in a batch):
ogr2ogr -overwrite %destination% %n1%
ogr2ogr -update -append ...
8
votes
7answers
4k views
How to get raster image as array in Python with ArcGIS
When starting to work with Python and ArcGIS 9.3, I assumed there would be a simple way to get a raster image into a Python array so that I can manipulate it before storing it back as another raster ...
8
votes
2answers
181 views
How can I get a shapefile from a postgis query?
My data is in a PostGIS database. I would like to generate a shapefile from a query. How can I do that?
8
votes
3answers
1k views
gdalmerge produces file that is much too large
I'm trying to merge 60 geotiff files into one huge file in order to be able to product tiles from that resulting huge geotiff file by using gdal2tiles.
The merge process worked, but for some reason ...
8
votes
3answers
2k views
Clipping raster with vector layer using GDAL
I have installed GDAL using the Osgeo installer. How can I clip a raster layer with a vector layer programmatically? Is there any GDAL API available which can help me with this? I am using Python.
8
votes
6answers
700 views
How do I generate thumbnails images from lots of shapefiles?
A colleague and I recently released an Open Source project called Mapoteca which is a set of Python Scripts that integrates with a GDAL/FWTools installation allowing a full walk-through of directories ...
8
votes
4answers
2k views
installing GEOS, PROJ, GDAL/OGR into a python virtualenv on Mac OS X
I am trying to setup an isolated python virtualenv to work on GIS projects on my Mac OS X. Sounds like I will need to install the GEOS, PROJ, GDAL/OGR from the kyngchaos site here ...
8
votes
1answer
510 views
How do I get the pixel value of a GDAL raster under an OGR point without NumPy?
I am working on a computational model of the abundance of wild pollinators across a landscape. The model itself is complete, and I am now struggling with a post-processing step.
I have my GDAL ...
8
votes
2answers
1k views
How to get FGDB support in GDAL 1.9 without compiling?
I was hoping that I could use the 'master' (nightly-build) version of QGIS to get fgdb support without compiliing (I'm not a developer and frankly have wasted days of productive time trying to get ...
8
votes
2answers
238 views
What to do with -3.4e+38 nodata values?
I am trying to process some bioclimatic raster files, such as can be downloaded from http://www.worldclim.org/current (bioclim set). They seem to have nodata values set to -3.4e+38 according to QGIS ...
8
votes
1answer
187 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 ...
8
votes
2answers
3k views
ogr2ogr converting to shapefile - how to select feature types?
Shapefiles can only have one geometry type, but many other formats (kml, geojson) can have multiple types.
When converting to shapefiles, is it possible to to tell ogr2ogr to create multiple ...
7
votes
4answers
1k views
Open source software to merge large shape files
Some background: I have 2 polygon shape files with approximately 500,000 records each. The two files are identical in terms of field structure.
Using ArcGIS 10.0 I can'nt merge these two files using ...
7
votes
3answers
477 views
GDAL and Python: How to get coordinates for all cells having a specific value?
I've got an Arc/Info Binary Grid---specifically, an ArcGIS flow accumulation raster---and I'd like to identify all cells having a specific value (or in a range of values). Ultimately, I'd like a ...
7
votes
2answers
2k views
Difference between Geoserver stores: ImageMosaic, WorldImage, ImagePyramid
What are the differences between the Geoserver stores ImageMosaic, WorldImage, and ImagePyramid? I noticed that ImagePyramid is no longer included in the latest Geoserver. Is one of these more ...
7
votes
2answers
2k views
Deploying Application With C# GDAL/OGR Bindings
I developed a relatively simple web app that uses the C# OGR bindings to do a couple of simple geometric functions; buffer, clip...etc. I developed this application on my local machine, which has ...
7
votes
1answer
673 views
Building GDAL With Read/Write Support of FileGDB
Has anyone been successful in building gdal with read/write support of file geodatabases? I am able to build successfully, just never see FileGDB as in the supported vector formats. Here is what I ...
7
votes
3answers
1k views
Make the nodata area of a resampled orthophoto overview white?
I have a set of orthophoto images which are each fully filled with data, but when placed together the coverage does not form a rectangle so there are nodata areas.
In MapGuide, I need to be able to ...
7
votes
2answers
246 views
Python, GDAL and building raster attribute tables
I have an integer raster for which I would like to build a raster attribute table using Python and GDAL. I can create a GDAL raster attribute table in Python as follows:
>>> rat = ...
7
votes
1answer
280 views
What are the rules that the Gdal rasterize function follows to allocate a value to a cell?
How does the rasterize tool decide which value to represent when a cell covers an area which inclueds different values? I need it in this case for polygons but would like to know for lines and points ...
7
votes
1answer
131 views
Multiple versions of GDAL (32bit and 64bit) on same machine
I currently have GDAL installed on my Windows 7 64bit workstation. It is the 32bit version. I chose the 32 bit version because I wanted to use the GDAL Python bindings with a 32bit installation of ...
7
votes
2answers
174 views
How to handle interpolation of multiple (quality) tiers of irregular data?
I'm going to try to provide a high level overview of the issue - realizing that more details/info will be necessary - but I don't want to write a novel that seems too overwhelming for people to ...
7
votes
3answers
718 views
Performance of google map tile creation processes
I know that question is rather vague but please bear w/me. I'm trying to get an idea of what sort of product performance - specifically timing - people have seen for various methodologies they have ...
7
votes
2answers
608 views
gdal2tiles misalignment
I have a map image that I have reprojected from OSGB36 to googleMaps projection (EPSG:900913). When I run gdal2tiles on the reprojected map, the results are not alligned with the google maps images ...
7
votes
2answers
261 views
How to catch PostgreSQL/PostGIS errors in GDAL/OGR Python bindings?
Is it possible to catch PostgreSQL output error messages in OGR after a query has failed?
For example
conn.ExecuteSQL('SELECT * FROM non_existing_table;')
In Postgres this returns an error ...