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

Richard Greenwood richard.greenwood at gmail.com
Sun Nov 22 08:08:27 PST 2020


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> 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
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>


-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20201122/db487d00/attachment.html>


More information about the mapserver-users mailing list