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

1
vote
2answers
367 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
519 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
0answers
533 views

How to add ECW support to GDAL bundled with PostGIS Windows

I'm currently trying the new raster functionalities of PostGIS 2.0 and I successfully imported some GeoTIFF file into PostGIS (although it only find one band so it's all black and white for some ...
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
231 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
320 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
173 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 ...
9
votes
2answers
648 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
1answer
537 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
247 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
737 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
351 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
691 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 ...
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
438 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
560 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
2k 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 ...
4
votes
1answer
637 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
2answers
3k views

How to add color interpretation for raster bands using GDAL?

I have 3 separate 1-band GeoTIFF files. The color interpretation for band is gray. I want a 3-band RGB file. I've used gdal_merge.py gdal_merge.py -separate file1.tif file2.tif file3.tif -o ...
4
votes
1answer
218 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
302 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
484 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
75 views

gdalwarp leaves horizontal artifacts regridding from EASE-Grid (laea) to Polarstero (stere)

I'm trying to understand how to use gdalwarp to warp an image. I believe I'm doing the basics correctly, but I might be missing some gdalwarp options? Any help would be greatly appreciated. The ...
3
votes
2answers
335 views

How to add Georeferenced PDF as layer to QGIS 2.0?

I have some georeferenced pdf's that I would like to open in Qgis. I have read that GDAL version 1.8 and higher will support pdf, and I have GDAL 1.10 installed with Qgis 2.0 on windows 7, But when I ...
3
votes
2answers
819 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
221 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
202 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
554 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
450 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
562 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
424 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 ...
2
votes
1answer
91 views

Georeferencing a raster using GDAL and Python

I want to georeference a raster using python and GDAL. My current approach is to call gdal_translate and gdalwarp using os.system and an ugly list of ground control points. I'd really like a way to do ...
2
votes
2answers
260 views

Exporting 16 bit single-band to 8 bit in SAGA/QGIS

Everytime with every function (e.g convert data storage type or gdal-translat -ot Byte) the output is a completely white map with a black border. only the "save as" export works, but the TIFF also ...
2
votes
2answers
128 views

Gdal: highest and lowest point/pixel, how to get their altitudes?

Given a .tiff topographic raster image. How to get the altitudes of the highest and lowest point/pixel ?
2
votes
2answers
514 views

GDAL Conversion of US Topo GeoPDFs

I've used GDAL_translate with "--config GDAL_PDF_LAYERS" option to convert US Topo GeoPDFs to GeoTIFF and it works great for creating collarless topos based on the new format. However, I can't get it ...
2
votes
1answer
133 views

gdal2tiles generates small picture inside 256x256 tile

I've used gdal2tiles for generating tiles in number of different polar projections and always experienced the same problem — strange small picture inside normal 256x256 png with the rest of space ...
2
votes
1answer
206 views

file geodatabase api on osx mavericks via brewed gdal

I've got a new machine with a fresh install of OSX 10.9, and am having trouble getting esri's file geodatabase api to work correctly with my brewed gdal. This is a known issue, noted here: ...
2
votes
2answers
179 views

How to convert Point coordinates into CSV format?

The GDAL documentation describes how to convert a ShapeFile into CSV data. The layer create options (-lco parameter) allows to prepend the coordinates of Point features to the actual attributes ...
2
votes
1answer
130 views

gdal2tiles.py generating black tiles from .img file

I have a source HFA Erdas Imagine (.img) file which I'm trying to convert into tiles using gdal2tiles.py. I'm running: gdal2tiles.py -w google -g GOOGLEKEY input_file.img The HTML is generated ...
2
votes
1answer
274 views

Problem with georeferencer in Qgis 2 64bit installation

I tried to use the georeferencer in the new Qgis 2 64 bits for windows. I tried with the standallone installer and with the OSgeo4w installer. The problem is when I load the raster that I want to ...
2
votes
2answers
368 views

How do I know the vertical/horizontal units of my DEM? I'm creating a slope using gdaldem

I'm using gdaldem to create a slope map. I can apply a scale. The default is 1. The notes say: Ratio of vertical units to horizontal. If horizontal unit of source DEM is degrees (e.g WGS84 ...
2
votes
1answer
481 views

Using GDAL to connect to a WFS

I'm trying to connect to a wfs using GDAL, from reading some of the (fairly sparse) documentation on this i have found that this is possible if GDAL is compiled with the correct drivers (Curl, ...
2
votes
1answer
710 views

Why does ogr2ogr SHP import error out trying to create a database?

All, Can anyone tell me what the error is with OGR2OGR when trying to import a .SHP into MSSQLSPATIAL? ERROR 1: MSSQL Spatial driver doesn't currently support database creation. Please create ...
2
votes
0answers
436 views

Use GDAL/Python to add rasters (tiff) to an ESRI File Geodatabase

I'm using GDAL python to create a bunch of tiff files from a netcdf file. def modelout_to_geotif(netcdfile, outdir, VarName): """ Given the path to the netcdf output, produces geotiffs for ...
2
votes
1answer
130 views

Using the C++ GDAL API how do I set the GDAL_DATA path?

If I want to change the directory of the GDAL_DATA path or point to a different version of a csv file for EPSG numbers how do I do that using the C++ API?
2
votes
1answer
284 views

OGR - Weird GeomType -2147483645 on polygon shapefile

I am trying to import a shapefile (multipolygon) in an app with ogr but I got an error about invalid geom type. If I inspect the data with ogr like this: datasource = ogr.Open("c:\\temp\\data.shp") ...
2
votes
1answer
219 views

st_clip and gdal_translate: “Error browsing database for PostGIS Raster properties” - Why?

Im using shell-script, postgis2.0 and gdal for trying to clip raster apart, using an overlapping raster and a the_geom-object. At first I create a view to clip the overlapping part of the raster. It ...
2
votes
1answer
271 views

gdal.py as part of bat script in windows 7

I need to run the following bat file from a MS4W shell which has gdal_retile.py as the final option. I have added C:\ms4w\python\gdal to my pythonpath but within a pyscripter shell I can not import ...