Hi all,<div>I have a weird problem with PostGIS raster and I think GDAL driver </div><div><br></div><div>I upload my image into database with <br><br>raster2pgsql -C -N -e -Y -F -s 4326 -t 256x256 -l 2,4 myRaster | psql -d test -U postgres</div>
<div><br></div><div>My original image is here <a href="https://skydrive.live.com/?cid=a61d00de178d6e45&id=A61D00DE178D6E45%21311&sff=1">https://skydrive.live.com/?cid=a61d00de178d6e45&id=A61D00DE178D6E45%21311&sff=1</a></div>
<div><br></div><div>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.</div><div><br></div><div>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</div>
<div><br></div><div>I get this <a href="https://skydrive.live.com/?cid=a61d00de178d6e45&id=A61D00DE178D6E45%21312&sff=1">https://skydrive.live.com/?cid=a61d00de178d6e45&id=A61D00DE178D6E45%21312&sff=1</a></div>
<div><br></div><div>There are some missing tiles, but I said ok, there are some empty data in my database.</div><div><br></div><div>I try to use large objects to export one of the missing tiles directly from DB </div><div>
<br></div><div><div>SELECT oid, lowrite(lo_open(oid, 131072), png) As num_bytes</div><div> FROM </div><div> ( VALUES (lo_create(0), </div><div> ST_AsPNG( (select rast from prehl500_zr where rid in (14)) ) </div><div> ) ) As v(oid,png);</div>
</div><div><br></div><div>and then in psql </div><div><br></div><div>\lo_export 165836 testX.png -- the number 165836 is oid return by the first select</div><div><br></div><div>and everything is ok I get the image one of the missing one in my picture over gdal_translate.</div>
<div><br></div><div>Do you have some ideas where is the problem me, GDAL, PostGIS?</div><div><br></div><div>Thanks</div><div><br></div><div>Jakub</div>