[postgis-users] PostGIS raster GDAL driver error? - some tiles are not visible over gdal_translate, mode 2

Jakub Hettler jakub.hettler at gmail.com
Thu Aug 23 09:03:51 PDT 2012


Hi all,
I have a weird problem with PostGIS raster and I think GDAL driver

I upload my image into database with

raster2pgsql -C -N -e -Y -F -s 4326 -t 256x256  -l 2,4 myRaster | psql -d
test -U postgres

My original image is here
https://skydrive.live.com/?cid=a61d00de178d6e45&id=A61D00DE178D6E45%21311&sff=1

everything is ok now, but I would like to see my image in QGIS or use
gdal_translate and there is a problem I expect the same, because QGIS uses
gdal_translate.

with gdal_translate as gdal_translate -of PNG  "PG:host=localhost
dbname='test' user='postgres' password=''pass' schema='public'
table=prehl500_zr mode=2" C:\users\jakub\desktop\somefile.png

I get this
https://skydrive.live.com/?cid=a61d00de178d6e45&id=A61D00DE178D6E45%21312&sff=1

There are some missing tiles, but I said ok, there are some empty data in
my database.

I try to use large objects to export one of the missing tiles directly from
DB

SELECT oid, lowrite(lo_open(oid, 131072), png) As num_bytes
 FROM
 ( VALUES (lo_create(0),
   ST_AsPNG( (select rast from prehl500_zr where rid in (14)) )
  ) ) As v(oid,png);

and then in psql

\lo_export 165836 testX.png -- the number 165836 is oid return by the first
select

and everything is ok I get the image one of the missing one in my picture
over gdal_translate.

Do you have some ideas where is the problem me, GDAL, PostGIS?

Thanks

Jakub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120823/b9b52a00/attachment.html>


More information about the postgis-users mailing list