[mapserver-users] Clipping a .tif with a polygon within .map file

Scott public at postholer.com
Sun Nov 22 08:46:44 PST 2020


Thanks for solution, this is perfect!!

On 11/22/20 8:08 AM, Richard Greenwood wrote:
> Here's an example using a shapefile for the mask but any vector source 
> will work the same.
> 
> LAYER
>    GROUP "a17"
> NAME "a17-mask"
>    STATUS off
>    TYPE polygon
>    DATA "shapefiles/mask"
>    CLASS
>      STYLE COLOR 0 0 0 END
>    END
> END
> 
> LAYER
>    NAME "a2017"
>    GROUP "a17"
>    STATUS off
>    TYPE raster
>    DATA "raster/imagery/2017/a17.tif"
> MASK "a17-mask"
> END
> 
> On Sun, Nov 22, 2020 at 8:43 AM Scott <public at postholer.com 
> <mailto:public at postholer.com>> wrote:
> 
>     For instance:
> 
>     DATA "/path/to/some.tif"
> 
>     Within the same map file I'd like to clip that .tif with a polygon from
>     a database query.
> 
>     I'm not sure how to go about this without loading the raster in the
>     database, which I'd rather not do.
> 
>     Is this possible?
> 
>     Thanks!
> 
>     -- 
>     www.postholer.com <http://www.postholer.com>
>     _______________________________________________
>     mapserver-users mailing list
>     mapserver-users at lists.osgeo.org <mailto:mapserver-users at lists.osgeo.org>
>     https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 
> 
> -- 
> Richard W. Greenwood, PLS
> www.greenwoodmap.com <http://www.greenwoodmap.com>


More information about the mapserver-users mailing list