[postgis-users] ERROR: rt_raster_to_gdal: Could not create the output GDAL dataset

john polo jpolo at mail.usf.edu
Wed Feb 12 18:38:53 PST 2020


On 2/12/2020 12:28 PM, Regina Obe wrote:
> SELECT lo_from_bytea(0,   -- <1>
> ST_AsGDALRaster(ST_Band(rast,1),
>             'USGSDEM',
> ARRAY[
> 'PRODUCER=' || quote_literal('postgis_in_action'),
> 'INTERNALNAME=' || quote_literal(rast_name)]
>      )  -- <2>
>         ) AS oid
>     FROM ch07.bag_o_rasters
>         WHERE rast_name = 'Raster 1 band heatmap'; -- <2>
Thanks, Regina. I tried the new code above and I still get the same error.

Here is the simple SELECT statement:

postgis_in_action=# SELECT rast_name FROM ch07.bag_o_rasters WHERE 
rast_name = 'Raster 1 band heatmap';
        rast_name
-----------------------
  Raster 1 band heatmap
(1 row)

I made different attempts and replaced 'USGSDEM' with 'JPEG' and 
'GTiff'. I tried with the old and new code. It worked either way with 
the JPEG and GTiff types. It seems like 'USGSDEM' is the problem here. I 
don't know why. I don't know how to diagnose the problem pertaining to 
one raster type. I suppose it's not a problem until I'll need to 
actually produce output as USGSDEM. :)

best regards,

John

-- 
Enlightenment is ego's ultimate disappointment.
-Chogyam Trungpa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20200212/c382048a/attachment.html>


More information about the postgis-users mailing list