[gdal-dev] gdal_translate clip PostGIS raster

Andreas Oxenstierna andreas.oxenstierna at t-kartor.com
Mon May 10 10:23:33 PDT 2021

Hi list

Is it possible to clip a PostGIS raster with a PostGIS vector poly using gdal_translate?

I cannot find a working syntax to define the clipping table in the WHERE clause.
Eg. this returns "Error browsing database for PostGIS Raster properties : ERROR:  syntax error at or near "FROM"

gdal_translate -of GTiff "PG:<connectinfo> schema=a table=rastertable WHERE='ST_Intersects(rast,c.geom) AND c.id<http://c.id> = 2 FROM a.vectortable c'" a.tif

Best regards

Andreas Oxenstierna
T-Kartor Geospatial AB
Olof Mohlins väg 12 Kristianstad
mobile: +46 733 206831
mailto: andreas.oxenstierna at t-kartor.com<mailto:andreas.oxenstierna at t-kartor.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210510/7c75fe2c/attachment.html>

More information about the gdal-dev mailing list