<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Try with gdalwarp and the -cutline family of arguments<br>
</p>
<div class="moz-cite-prefix">Le 10/05/2021 à 19:23, Andreas
Oxenstierna a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:cceedf40-d007-4ca8-a08f-d92ac9300466@Spark">
<title></title>
<div name="messageBodySection">
<div dir="auto">Hi list<br>
<br>
Is it possible to clip a PostGIS raster with a PostGIS vector
poly using gdal_translate?<br>
<br>
I cannot find a working syntax to define the clipping table in
the WHERE clause.<br>
Eg. this returns "<span>Error browsing database for PostGIS
Raster properties : ERROR: syntax error at or near "FROM"</span><span><br>
</span><span><br>
</span>gdal_translate -of GTiff "PG:<connectinfo>
schema=a table=rastertable WHERE='ST_Intersects(rast,c.geom)
AND <a href="http://c.id" target="_blank"
moz-do-not-send="true">c.id</a> = 2 FROM a.vectortable c'"
a.tif</div>
</div>
<div name="messageSignatureSection"><br>
<div class="matchFont">Best regards<br>
<br>
Andreas Oxenstierna<br>
T-Kartor Geospatial AB<br>
Olof Mohlins väg 12 Kristianstad<br>
mobile: +46 733 206831<br>
mailto: <a href="mailto:andreas.oxenstierna@t-kartor.com"
moz-do-not-send="true">andreas.oxenstierna@t-kartor.com</a><br>
<a href="http://www.t-kartor.com" moz-do-not-send="true">www.t-kartor.com</a></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>