[gdal-dev] out-db postgis raster issue

AndyT andy at centremaps.co.uk
Mon Jan 28 08:50:44 PST 2013


Hi,

Just wondering if anyone had any thoughts on my issue loading out-db /
filesystem stored rasters from PostGIS.

I began to wonder if the data had loaded correctly but came across the
following psql method to get a basic image out and it is fine:

postgis20test=# SELECT oid, lowrite(lo_open(oid, 131072),png) AS num_bytes
FROM
( VALUES (lo_create(0), ST_AsPNG((SELECT rast FROM
public.raster2pgsqltest_local
_outdb WHERE rid=1)) )) AS v(oid,png);
  oid  | num_bytes
-------+-----------
 19094 |      8769
(1 row)


postgis20test=# \lo_export 19094 `C:/test.png`

However, i note a PostGIS raster option ST_AsGDALRaster and i tried
replacing the ST_AsPNG clause with this (which runs as a SELECT query) and
it doesn't seem to work.

ST_asgdalraster((SELECT rast FROM public.raster2pgsqltest_local_outdb WHERE
rid=1),'png',NULL,27700)

Any ideas on what i can do to further narrow down my search for the issue
would be fantastic.

Andy



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/out-db-postgis-raster-issue-tp5028924p5030334.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list