I am using PostgreSQL 12 and PostGIS 3 on Windows 10. I am using a
practice example for working with raster via psql. The values, like
"131072" are from the book, so I don't know exactly what they mean (or
much about the lo_ functions for that matter, other than they are meant
for large object processing):
SELECT oid, lowrite(lo_open(oid, 131072), img) As num_bytes
'PRODUCER=' || quote_literal('postgis_in_action'),
'INTERNALNAME=' || quote_literal(rast_name)]
) As dem
WHERE rast_name = 'Raster 1 band heatmap')
) As v(oid,img);
I get the error:
"ERROR: rt_raster_to_gdal: Could not create the output GDAL dataset"
I am connected to PostgreSQL:
You are connected to database "postgis_in_action" as user "postgres" on
host "localhost" (address "::1") at port "5432".
and a simple SELECT for the row ID of the 'Raster 1 band heatmap' works.
I tried the same code in pgAdmin and got the same results. I searched
for solutions. I found something that said to check the GDAL settings:
postgis_in_action=# SELECT short_name FROM ST_GDALDrivers();
It seems that GDAL is set to produce a USGSDEM.
I don't know why I am getting the error. Can someone suggest how I fix
Enlightenment is ego's ultimate disappointment.
postgis-users mailing list