Tuesday, 29 October 2019

Doing raster export from postgis to TIF file


I am trying to do a lo_export of a raster record in postgis table:


SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';

SELECT oid, lowrite(lo_open(oid, 131072), tiff) As num_bytes
FROM

( VALUES (lo_create(0),
ST_Astiff( (SELECT rast FROM raster_table) )
) ) As v(oid,tiff);

Finally I did SELECT lo_export(oid,'filesystempath');


But When I check the file system path there is nothing there... anybody knows why?


and how can I do to generate the TIF file?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...