Advice on loading OpenTopography data into a PostGIS database apreciated
thiemo at gelassene-pferde.biz
thiemo at gelassene-pferde.biz
Sun Nov 3 06:17:24 PST 2024
Regina Obe <lr at pcorp.us> escribió:
> Is there a reason you don't want to set it at the database or system level.
>
> ALTER DATABASE treintaytres SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';
>
> Then I think the setting would apply to any user.
Many thanks for the hint. It did the trick, I admit, to my
astonishment. My test below did not show an error when trying to
enable them so I deemed the drivers enabled.
>>> treintaytres=> set postgis.gdal_enabled_drivers = 'ENABLE_ALL'; SET
>>> treintaytres=> WITH foo AS (
>>> SELECT
>>>
>> ST_AsPNG(ST_AddBand(ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(2,
>> 2, 0,
>>> 0, 0.1, -0.1, 0, 0, 4326), 1, '8BUI', 1, 0), 2, '8BUI', 2, 0), 3,
>>> '8BUI', 3, 0)) AS png ), bar AS (
>>> SELECT 1 AS rid, ST_FromGDALRaster(png) AS rast FROM foo
>>> UNION ALL
>>> SELECT 2 AS rid, ST_FromGDALRaster(png, 3310) AS rast FROM foo
>>> )
>>> SELECT
>>> rid,
>>> ST_Metadata(rast) AS metadata,
>>> ST_SummaryStats(rast, 1) AS stats1,
>>> ST_SummaryStats(rast, 2) AS stats2,
>>> ST_SummaryStats(rast, 3) AS stats3 FROM bar ORDER BY rid;
>>> WARNING: permission denied to set parameter
>> "postgis.gdal_enabled_drivers"
>>> ERROR: rt_raster_to_gdal: Could not load the output GDAL driver
>>> CONTEXT: PL/pgSQL function st_aspng(raster,text[]) line 31 at RETURN
More information about the postgis-users
mailing list