[gdal-dev] PostGIS Out of db VRT containing JPEG2000 GDAL 2.1 OpenJPEG

bboughton bboughton at gmail.com
Sun Jun 5 13:42:24 PDT 2016


Jukka Rahkonen wrote
> Driver JPEG2000 means the Jasper driver which is rather useless for
> geospatial images http://www.gdal.org/frmt_jpeg2000.html. Do you see also
> driver JP2OpenJPEG listed http://www.gdal.org/frmt_jp2openjpeg.html?

OK so I've built everything from scratch again and can confirm:

JP2OpenJPEG is listed in PostGIS query: "SELECT short_name FROM
ST_GDALDrivers();"

JP2OpenJPEG is available in GDAL by running "gdal_translate --formats"

I can gdal_translate a SENTINEL2 driver created VRT containing .jp2 to GTiff

PostGIS version information:
POSTGIS="2.2.2 r14797" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.8.0, 6
March 2012" GDAL="GDAL 2.1.0, released 2016/04/25" LIBXML="2.9.1"
LIBJSON="0.11.99" TOPOLOGY RASTER

When trying to query raster I now get error:
ERROR:  rt_raster_from_gdal_dataset: Could not get data from GDAL raster
CONTEXT:  PL/pgSQL function st_value(raster,integer,geometry,boolean) line
18 at RETURN

Other notes:
When I run raster2pgdsql with -s [dataset epsg] I get error:
ERROR:  rt_raster_from_gdal_dataset: Could not get data from GDAL raster
CONTEXT:  SQL function "st_transform" statement 1

When I run without -s flag it completes OK with and without tiling. 

So it is clear PostGIS/GDAL having issues reading the VRT file. 

This is all running in a VPS. If someone would like to log in and confirm
all of this I'd be happy to share credentials just send me private email. 

Cheers,
Ben





When I convert one band to GTiff and add as out of db raster 




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/PostGIS-Out-of-db-VRT-containing-JPEG2000-GDAL-2-1-OpenJPEG-tp5269888p5270010.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list