GDAL (Geospatial Data Abstraction Library) is an open source translator library & set of command-line utilities for processing raster spatial 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 ...

learn more… | top users | synonyms

34
votes
10answers
18k 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 ...
24
votes
2answers
518 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 ...
20
votes
1answer
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 ...
19
votes
3answers
3k 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 ...
18
votes
6answers
5k 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 ...
16
votes
6answers
4k 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 ...
14
votes
4answers
1k 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 ...
14
votes
1answer
279 views

Why do people pronounce GDAL (Geospatial Data Abstraction Library) like goo-dal?

Ok, a bit of a silly question, but: I've heard people pronouncing the library GDAL (Geospatial Data Abstraction Library) like goooo-dal. My natural inclination was to pronounce it geeee-dal, as in ...
14
votes
3answers
2k 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 ...
14
votes
3answers
5k 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 ...
13
votes
2answers
2k 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. ...
13
votes
2answers
1k 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
5k 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 ...
12
votes
2answers
896 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 ...
12
votes
3answers
6k 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
3answers
2k 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 ...
11
votes
1answer
418 views

How to rename field names in a shapefile from the commandline?

I need to rename the field names (attributes) in a shapefile. Is there an easy way to do this from the command line?
11
votes
3answers
3k 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.
11
votes
1answer
2k 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 ...
11
votes
1answer
235 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 ...
11
votes
2answers
625 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 ...
11
votes
2answers
5k 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 ...
11
votes
1answer
340 views

How to create a KML that supports animated ground overlays?

I have 12 images that represent weather conditions at day 1 through day 12. I am using gdal2tiles to produce map tiles from each of these images. gdal2tiles also produces a KML file that can be used ...
11
votes
1answer
224 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
6answers
462 views

How do I iterate through every cell in a continuous raster?

See this link for more details. The Problem: I want to loop through a continuous raster (one that has no attribute table), cell by cell, and get the value of the cell. I want to take those values ...
10
votes
2answers
2k 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 ...
10
votes
2answers
1k 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 ...
10
votes
1answer
1k 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 ...
10
votes
2answers
978 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, ...
10
votes
1answer
341 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 ...
10
votes
1answer
886 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
7answers
2k 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 ...
9
votes
7answers
5k 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 ...
9
votes
2answers
2k 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?
9
votes
5answers
4k views

Python GDAL package missing header file when installing via pip

I asked this question on Stack Overflow before I realised this site existed. As this site it more appropriate, I'll ask it here too. I'm trying to install gdal from pip pip install gdal inside a ...
9
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 ...
9
votes
3answers
1k 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
4answers
3k 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 ...
9
votes
2answers
2k 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 ...
9
votes
2answers
841 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 ...
9
votes
2answers
639 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 ...
8
votes
2answers
385 views

How to add different sized rasters in GDAL so the result is only in the intersected region

I'm writing a Python method that adds two rasters and generates a single raster output. For reasons beyond my control, the extents of the input rasters are different, but they do overlap. Is it ...
8
votes
3answers
2k 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
6answers
821 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
2answers
470 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 = ...
8
votes
4answers
1k 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 ...
8
votes
1answer
302 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
1answer
241 views

Python with GDAL and PostGIS as a replacement of ArcGIS

Few times ago, I worked with daily land surface temperature satellite images of an area with the size of Alaska. I had to process around one thousand images. I downloaded them, mosaiced, projected, ...
7
votes
4answers
2k 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
2answers
6k views

Converting projected geoTiff to WGS84 with GDAL and Python

Apologies if the following question is somewhat stupid, but I am only VERY new to this whole GIS thing. I am trying to convert some projected geoTiff images to WGS84 using gdal in python. I have ...