[gdal-dev] reading postgis raster in mode 2 error

Ricardo Filipe Soares Garcia da ricardo.garcia.silva at gmail.com
Wed Aug 24 13:07:55 EDT 2011


Hi list

I am trying out the postgis raster driver.

I'm running Ubuntu 11.04 with gdal 1.8 from the ubuntugis repository.
As for postgis I've compiled a snapshot of postgis 2.0 from svn, as
offered on the postgis website.

Following the directions in the driver info page[1], I've been trying
to get a gdalinfo on the katrina.tif file. When I run it using
mode='1' everything goes as expected and I get info on each of the
tiles.

but when using mode='2' I am getting this error:

gdalinfo -mm -stats -checksum "PG:host='localhost' dbname='gis_testes'
user='gisuser' password='resusig' table='katrina' mode='2'"


ERROR 1: Error, the                     ONE_RASTER_PER_TABLE mode
can't be applied if the raster                     rows don't have the
same metadata for band 1
gdalinfo failed - unable to open 'PG:host='localhost'
dbname='gis_testes' user='test_user' password='test_pass'
table='katrina' mode='2''.


When importing the file into postgis I ran the following command:

/usr/lib/postgresql/8.4/bin/raster2pgsql.py -r ~/Downloads/katrina.tif
-t katrina -k 64x64 -o katrina.sql -s 4326 -I


Thanks for your help

[1] - http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html

-- 
___________________________ ___ __
Ricardo Garcia Silva


More information about the gdal-dev mailing list