<br><div>Hello Postgis-users, </div><br><div><div><font style="font-size:16px"><font style="font-family:Calibri, Arial, Helvetica, sans-serif">I'm looking to find out the most efficient method of clipping/masking a raster with a geometry in postgis. </font></font></div><br><div><font style="font-size:16px"><font style="font-family:Calibri, Arial, Helvetica, sans-serif">Inputs:</font></font></div><ul><li><div><font style="font-size:16px"><font style="font-family:Calibri, Arial, Helvetica, sans-serif">Multi-band raster</font></font></div></li><li><div><font style="font-size:16px"><font style="font-family:Calibri, Arial, Helvetica, sans-serif">Geometry</font></font></div></li></ul><div><font style="font-size:16px"><font style="font-family:Calibri, Arial, Helvetica, sans-serif">Output:</font></font></div><ul><li><div><font style="font-size:16px"><font style="font-family:Calibri, Arial, Helvetica, sans-serif">​All pixels of all bands of the raster which intersect with the geometry</font></font></div></li></ul><div><font style="font-size:16px"><font style="font-family:Calibri, Arial, Helvetica, sans-serif">So far I have been using the ST_Clip(raster, geom) function.Do you know if there is a way to simply mask the raster with the geometry, rather than perform a clip operation? Would St_Intersection be more appropriate? I'd like to optimize this function as much as possible. Any thoughts/ideas? </font></font></div><br><div><font style="font-size:16px"><font style="font-family:Calibri, Arial, Helvetica, sans-serif">Thank you,</font></font></div><br><div><font style="font-size:16px"><font style="font-family:Calibri, Arial, Helvetica, sans-serif">Daniel Vignoles</font></font></div></div><img class="mailspring-open" alt="Sent from Mailspring" width="0" height="0" style="border:0; width:0; height:0;" src="https://link.getmailspring.com/open/CFCCCA62-D66A-4F25-9BDB-02D76EF6D93A@getmailspring.com?me=5e4c3d4a&recipient=cG9zdGdpcy11c2Vyc0BsaXN0cy5vc2dlby5vcmc%3D">