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

6
votes
2answers
4k views

How do I convert affine coordinates to lat/lng?

I am extremely new to GIS. I'm using gdal to read in a landuse/landcover map and I need to pick out the lat/lng of certain land cover types to index into a different dataset which is expressed only ...
6
votes
1answer
1k views

What tile/tiling strategy should I use with GeoNode/GeoServer?

I've got a wicked GeoNode instance running, loaded with some basic vector data. I want to be able to serve our local-County aerial imagery as a basemap within GeoNode. I am thoroughly overwhelmed with ...
5
votes
1answer
757 views

Python - OGR: Transform coordinates from meter to decimal degrees

I have a point in a shapefile. The shapefile is in a WGS_1984_Web_Mercator Projected Coordinate System. I want to get the coordinates of that point in decimal degrees with GDAL/OGR in Python. I am ...
5
votes
2answers
1k views

Where can the GDAL executables be found in a QGIS installation?

I run QGIS 1.8.0 Lisboa on a Windows 7 machine. Yesterday I attempted to install the TauDEM plugin using these instructions: http://lists.osgeo.org/pipermail/qgis-developer/2012-June/020807.html ...
5
votes
1answer
773 views

ESRI GDB Support in GDAL / ogr2ogr on Mac OS X 10.8

How do you incorporate support for ESRI's fgdb format into GDAL / ogr2ogr on Mac OS X 10.8?
5
votes
1answer
367 views

Where can I find GDAL bindings for Python 3.3?

I have been using GDAL 1.9.x on Python 2.7 and took the bindings from here. Is there a place to get GDAL bindings for Python 3.3 or is GDAL not officially supported in Python 3.3 yet?
5
votes
2answers
1k views

Converting Ordnance Survey raster maps to WGS84 webmap tiles

I would like to generate Google/Bing-like map tiles from Ordnance Survey's 1:25000 and 1:50000 raster maps, which are provided as 4000x4000 UK national grid tiles (GeoTIFF). A sample tile can be ...
4
votes
1answer
546 views

Python equivalent of gdalbuildvrt

Is there a way to perform the same task as the gdalbuildvrt utility using GDAL Python bindings? So far I have not found any way to do this other than creating a vrt of a single dataset and manually ...
3
votes
1answer
1k views

processing MODIS hdf files with gdal

I'm trying to open an MODIS file (hdf format) with gdal in a python script under windows OS. I use the HDF4 driver, as read at http://www.gdal.org/frmt_hdf4.html. But when I run it I got this error ...
3
votes
1answer
102 views

How to test if two GDAL datasets are in the same projection?

I'm attemping to write a funciton to test if a list of datasets are in the same projection. Naively, I thought I could test the text of WKTs, but that does not work in the following case: ...
3
votes
5answers
1k views

Batch processing DEM rasters in QGIS/GDAL

I am attempting to add relief shading to map using .asc raster files, following this tutorial. It works well, but I have only tried it on single tile of raster data which is 20x20km. I want to ...
3
votes
3answers
633 views

DXF to georeferenced SHP

I know how to set projection and georeference bounds of scanned TIFF file, by using gdal, but I don't know how to do the same for vector file. For example I georeferenced TIFF file by using this ...
3
votes
1answer
847 views

How do I split polygons that cross the dateline?

I have a dataset of country borders which I obtained from: http://thematicmapping.org/downloads/world_borders.php/ I have that dataset in both shp and SQL, but I'll put out there that I don't feel ...
3
votes
1answer
444 views

Want to use GDAL in Arc10 toolbox via subprocess call

I'm attempting to launch a version Python 2.5 that supports GDAL from an ArcGIS10 toolbox script. I'm doing this because I'm having loads of trouble importing the GDAL library directly into Arc, and ...
3
votes
2answers
2k views

ogr2ogr srs options: where is the well known definition determined?

In the ogr2ogr documentation it says that when using -a_srs srs_def: Srs_def can be a full WKT definition (hard to escape properly), or a well known definition (ie. EPSG:4326) or a file with a WKT ...
2
votes
3answers
111 views

How to apply a specific Rendering to an Image and export to JPEG?

We have a specific process which generate an interpolated single band 32-bit Float Raster in Erdas Imagine (.IMG) format. This process generates an image every hour. We wish to apply a specific ...
2
votes
2answers
750 views

how to for loop a folder to batch clip rasters by polygon using python and QGIS

I am using python and QGIS 2.0. I am trying to clip rasters in a folder by one polygon feature. It's the first time for me using (let's say) "PyQGIS", I was used to arcpy before. Anyway, I don't get ...
2
votes
1answer
354 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
3answers
2k views

GDAL 1.10 ogr2ogr OSM “Unable to open datasource”

I have a problem with ogr2ogr and osm file. I install from source (on Ubuntu 12.04.2 LTS) newest GDAL libary and OGR still can't read osm files. gdal-config --version 1.10.0 ogr2ogr --version GDAL ...
2
votes
2answers
961 views

gdal2tiles.py generates wrong tiles / MapTiler the right ones

I'm trying to generate tiles with gdal2tiles.py and the resulting tiles are stored as 18/132639/164219. If I do the same thing with MapTiler (the GUI variant of gdal2tiles) the tile result is ...
2
votes
1answer
578 views

Converting CIB data to Google Tiles with GDAL

I'm trying to convert CIB map data into Google compatible Tiles through the following process (in Linux, GDAL compiled from source): gdalbuildvrt data.vrt A.TOC gdal_translate -of VRT -expand rgba ...
2
votes
1answer
2k views

What are the appropriate parameters to convert .asc file to geotiff using gdal_translate?

My starting file of interest is an ASC file with the following gdalinfo Driver: AAIGrid/Arc/Info ASCII Grid Files: sd_1_3_110805.asc Size is 11880, 9720 Coordinate System is `' Origin = ...
1
vote
1answer
145 views

PostGIS Raster in MapServer

I'm having trouble getting a PostGIS raster to load and display in MapServer. I'm not sure, but suspect it's a version problem. My mapfile layer and the error message are shown below. LAYER ...
1
vote
0answers
188 views

Merge overlapping DEMs with irregular boundaries

I have a 10m DEM covering part of a state, a 20m DEM covering the whole state, and a 90m DEM covering the whole country. How can I merge them together, getting the best quality available in each area? ...
1
vote
2answers
232 views

Convert .tiff data to bitmap just when rendering and at runtime by visualC++ code

I need to convert a .tiff image to a bitmap one without saving the bitmap. I know that I should use GDAL_translate but because I'm new, this function's interface is a little complicated for me. Could ...
1
vote
1answer
598 views

GDAL bindings problem with ArcMap 10.1 Python tool

I'm really getting mad with this. ArcGIS sometimes can be so just...irritating! Forgive me if this question is by any means duplicating this one or similar ones, but I really can't find my way out of ...
1
vote
1answer
369 views

How to extract a WCS layer with gdal_translate?

There is a certain WCS layer that I'd like to save it to my local computer for analysis. According to GDAL WCS driver draft: "Accessing a WCS server is accomplished by creating a local service ...
1
vote
2answers
309 views

How to produce a mean raster file based on other raster files? [duplicate]

Possible Duplicate: Tools to flatten the jp2 to a single band (average the bands)? I have a number of raster files from a same area, that coordinates of corresponding pixels perfectly match ...
1
vote
2answers
421 views

Proper gdaltrasform syntax to transform a list of coordinates?

this is probably a very simple question, but I'm very new to GIS so I just need one last nudge. I've got a sense of the Linux utility gdaltransform and I am feeding it coordinate pairs in ...
1
vote
2answers
3k views

Get extent of Georeferenced Rasters in Python and output to polygon shapefile

I would like to create a shape file containing the extents of each of the rasters in a directory. Is it possible to capture the extent of a raster using Python? I have tried ...
0
votes
0answers
164 views

How to read vector datasets using GDAL library

Up to now, I have used GDAL in order to read raster information and geotiffs and show them with the help of OpenGL. Now I have a vector dataset, and by that, I mean I have the files with types: DBF ...
0
votes
2answers
242 views

Gdal: How iterate through all pixels of a raster image?

Given a topographic raster image. How to iterate through all pixels of this raster image ? Solution preferably with gdal, in console. Some other libraries/script could be installed. Related: ...
0
votes
1answer
133 views

Gdal_polygonize: How to filter pixels above a given value (elevation)?

Given a topographic GIS raster of one country: Given an elevation threshold n = 50 (meters) How to polygonize pixels when z >= n ? gdal_polygonize.py is not clear on this point. It states This ...
10
votes
1answer
1k 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 ...
8
votes
1answer
383 views

How to add a band to an existing GeoTiff using GDAL?

This seems like it should be straightforward but I can't for the life of me figure it out. Given an existing GeoTiff containing a single band, how can you add another band to that GeoTiff? Is the ...
7
votes
1answer
220 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 ...
6
votes
2answers
702 views

Can I change the GDAL/OGR library that QGIS uses?

I have been adding a new format to OGR, all seems well and OGRInfo works. Now I would like to test my code out using QGIS. Is there an easy way to switch which GDAL lib QGIS uses on a windows box? ...
6
votes
2answers
334 views

Clarification of the “25D” option in ogr2ogr

[EDIT: In my original post, I had received an error that was based on a typo, so I scrapped that part of the question, but left the questions that still apply.] In the ogr2ogr docs it says: -nlt ...
5
votes
2answers
3k views

How to add *.ecw files to QGIS 2.0 on Windows?

How do I add and view *.ecw raster images in Qgis 2.0 ?
5
votes
2answers
406 views

Adding noise to a raster

I want to add some fine-grained noise to a raster in an automated python process (i.e. I do not want to use Photoshop or GIMP). I looked at PIL, but unless I'm mistaken, it doesn't seem to have any ...
4
votes
2answers
327 views

How to access Shapefile metadata using OGR?

I'm trying to use ogrinfo to get some details on a shapefile I downloaded. Currently, the only way I know how to do this is to load it into QGIS and manually click around to find any information on ...
4
votes
2answers
420 views

Gdal Python Bindings and File Geodatabase API

I'm trying to get python 2.7 to work with GDAL/OGR and an ESRI file geodatabase. There have been a few similar questions asked but the answers don't fully resolve my situation. I have installed the ...
4
votes
1answer
500 views

How to sum or even perform more complex mathematical operations (multiply, add a constant, …) two GDAL grids?

I have two grids with same cell size, same starting position (top left) and same grid size. I want to sum the grids and create a sum grid as an result: e.g. grid A + grid B = grid C How can I ...
4
votes
1answer
201 views

Update PostGIS after updating GDAL?

I am using PostGIS 2.0 and I want to use the raster functionality through mapserver. It seems as if the latest official GDAL release 1.9.1 has an unstable PostGIS raster driver, as pointed out in a ...
4
votes
1answer
268 views

How to convert a png with known bounds from Plate Carree to Mercator with GDAL

I have a png image that shows the region defined by the geo bounds UpperLat, LeftLon, BottomLat, RightLon (in degrees & -ve for West Lon and South Lat) in Plate Carree EPSG:4326. I want to convert ...
4
votes
1answer
1k views

Qgis - How to change GDAL version

im working on Ubuntu 12.04 server; i noticed this when i installed additional support for ECW format into the GDAL 1.9.1 which worked ok. Then i tried to add ECW files to Qgis but it said they still ...
4
votes
2answers
455 views

How to fix a raster with wrong Eastings?

I get an error when trying to warp a tif file in QGIS: ERROR 1: Too many points (35721 out of 35721) failed to transform, unable to compute output bounds. I am using QGIS 1.7.0 Wroclaw with gdal ...
3
votes
1answer
169 views

How to find the distance to the nearest coastline from a land-based latitude/longitude point?

I'm completely new to GIS and unsure what I need to solve this problem: In the image above turquoise is actually land. Sea is white. I tried using the NASA Distance to the Nearest Coast data dump ...
3
votes
2answers
580 views

Issue Trying to create Zonal Statistics using Gdal and Python.

I am trying to create zonal statistics using Python and Gdal. I have a polygon shapefile and a raster file, and in order to do so, I am using a piece of code I found in StackExchange. The raster and ...
3
votes
2answers
188 views

Homebrew OGR with FGDB support on OSX 10.9

This answer worked beautifully in 10.8, but isn't working immediately in 10.9. The link to download the FileGDB API still works, but there are a bunch of options available I don't remember from ...