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

5
votes
1answer
357 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
515 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
99 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
610 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
822 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
439 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
109 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
654 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
345 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
871 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
1k views

GDAL VRT Format - do i understand the concept?

Okay, so im a little fed up with different raster-in-database solutions that I tried over the last 2 weeks which don't work currently (Postgis raster) or cant handle my volume of data (Rasterlite), so ...
2
votes
1answer
567 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
0answers
171 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
226 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
349 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
302 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
392 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
2k 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
148 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
218 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
122 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
986 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
349 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
214 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
2k views

How can I turn a shapefile into a mask and calculate the mean?

I have been using python to process huge arrays stored as netcdf files. I would like to calculate the mean of an area defined by a shapefile. I have just installed GDAL but if there are other tools I ...
6
votes
2answers
688 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
329 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
2k 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
400 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
247 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
386 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
466 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
197 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
257 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
2answers
448 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
2answers
182 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 ...
3
votes
2answers
140 views

How to work with OGR and GDAL in GP Service in ArcGIS for Server 10.1

I have got a lot troubles with GDAL and OGR in the context of ArcGIS Server on 64 bit server machine. I can run script that use GDAL in ArcGIS as Tool and in the debug mode in PyScripter, then ...
3
votes
2answers
362 views

How to set output resolution for gdalwarp to that of source file?

I have a large raster, which I want to re-project and crop for a new location that I'm creating in GRASS. I seem to have gotten the re-projection and cropping right with this call to gdalwarp: ...
3
votes
0answers
306 views

How to set GDAL/cs2cs/proj to use NTv2 grid shift file when using EPSG codes?

I am using the GDAL API for Python for a script that takes only EPSG codes for inputs to specify source and target coordinate systems. While the cs2cs command seems to handle quite well ...
3
votes
1answer
1k views

convert from HDF to GeoTiff

I am having some problems with the conversion from HDF to GeoTiff. I am following the steps described in this webpage. The problem is that I can't find what is the NDVI subdataset name (XXXX) in ...
3
votes
3answers
1k views

GDAL_translate: converting ESRI GRID to Geotiff in batch

The Challenge: To batch convert 1000 rasters in ESRI Grid binary to Geotiff using either using a batch file or Python 2.7 without ArcGIS/Arcpy module. The Tools: Win7Pro, GDAL 1.9.2 (via OSGeo4W), ...
3
votes
1answer
420 views

Grid registration issue converting from GeoTIFF to ARC ASCII Grid

I've got a 3 arc second digital terrain model represented as a 32-bit GeoTIFF that looks like this: $ gdal_info gom03_v1_0.tif Driver: GTiff/GeoTIFF Files: gom03_v1_0.tif Size is 10200, 7800 ...
3
votes
1answer
222 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 ...
3
votes
1answer
356 views

ogr2ogr / GDAL remove features in FileGDB while in use by ArcGIS Server map service

I'm using ogr2ogr to pull features out of Oracle and put them into a File GeoDatabase. The FGDB is being used by an active ArcGIS Server map service. This is all done for performance / reducing DB ...