[postgis-users] Raster Clipping vs Masking

Regina Obe lr at pcorp.us
Wed May 27 07:51:16 PDT 2020


Daniel,

 

I’m unclear what you want the outcome to be.  What’s wrong with ST_Clip if you want to clip the raster?  That is the most efficient way to clip a raster.

 

 

 

From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Daniel Vignoles
Sent: Wednesday, May 27, 2020 10:36 AM
To: postgis-users at lists.osgeo.org
Subject: [postgis-users] Raster Clipping vs Masking

 

 

Hello Postgis-users, 

 

I'm looking to find out the most efficient method of clipping/masking a raster with a geometry in postgis. 

 

Inputs:

*	Multi-band raster

*	Geometry

Output:

*	​All pixels of all bands of the raster which intersect with the geometry

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? 

 

Thank you,

 

Daniel Vignoles

  <https://link.getmailspring.com/open/CFCCCA62-D66A-4F25-9BDB-02D76EF6D93A@getmailspring.com?me=5e4c3d4a&recipient=cG9zdGdpcy11c2Vyc0BsaXN0cy5vc2dlby5vcmc%3D> 

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


More information about the postgis-users mailing list