[mapserver-users] Using MASK to obscure areas

Fabian Schindler fabian.schindler at eox.at
Mon Oct 28 07:32:54 PDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thomas,

I've tried your proposed solution: I read the geometries via OGR and
create an "inverted" polygon mask which I set as an inline feature.
This works reasonably well and suffices for the moment. Thank you for
this idea.

I still have to do the same thing with raster masks aswell. Is there
anything implemented as right now? Or do I have to create a similar
solution via temporary datasets?

Regards,
Fabian

On 10/28/2013 11:32 AM, thomas bonfort wrote:
> Fabian, For now you should "invert" your masking features, which is
> something you can probably do rather easily with a few lines of
> geos code in your python scripts. To my knowledge, there is no such
> thing as being able to mask out a pre-exisiting map state, but this
> is something that would be possible to implement with the "source"
> compositing operator, and that I would like to see coming into
> mapserver along with other compositing operations (e.g. multiply).
> I don't have any funding for this at the time being, so the
> timeframe for this actually happening is still very uncertain.
> 
> cheers, thomas
> 
> 
> On 28 October 2013 09:39, Fabian Schindler
> <fabian.schindler at eox.at> wrote: Dear mapserver devs and users,
> 
> Using the MASK feature of mapserver I'm able to define areas which
> are visible (masked 'in'). My goal is to achieve the opposite, to
> mask *out* areas of the image which shall be rendered transparent.
> 
> Is there any way to do this?
> 
> Thanks, Fabian
> 
> 
> P.S: My mapfile currently looks like this (it is autogenerated, as
> I'm using mapscript for the task):
> 
> MAP
> 
> # ... a lot of stuff left out for brevity
> 
> PROJECTION "init=epsg:4326" END # PROJECTION
> 
> WEB METADATA "ows_enable_request"      "*" END # METADATA END #
> WEB
> 
> LAYER NAME "masklayer" CONNECTION "mask.json" CONNECTIONTYPE OGR 
> METADATA "wms_srs" "EPSG:4326" "wms_include_items"       "all" 
> "ows_srs" "EPSG:4326" "gml_include_items"       "all" END #
> METADATA PROJECTION "init=epsg:4326" END # PROJECTION STATUS ON 
> TYPE POLYGON CLASS STYLE COLOR 0 0 0 END # STYLE END # CLASS END #
> LAYER
> 
> LAYER NAME "data" DATA "data.tif" EXTENT 11.331755 32.19025
> 28.29481 46.268645 MASK "masklayer" METADATA "wms_srs" "EPSG:4326" 
> "wms_extent"      "11.331755 32.190250 28.294810 46.268645" 
> "ows_srs" "EPSG:4326" END # METADATA OFFSITE 0 0 0 PROJECTION 
> "proj=longlat" "datum=WGS84" "no_defs" END # PROJECTION STATUS OFF 
> TYPE RASTER END # LAYER
> 
> END # MAP
>> _______________________________________________ mapserver-users
>> mailing list mapserver-users at lists.osgeo.org 
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSbnWWAAoJEJoaok7HgajKuPkIAIcn2SOzrYxh46YcmcN/edR3
sILhMWWQoOArmpvllyHfS94dh/wL96T2GIYj+M3MID/m0FPLHhrtNvBWaurDPxLZ
tkGp4l2y33/Qm5Jaw4K8hi6YeGCWlKcGGBmPDY6fYp8GyJiObJH3W3QaRMwFZ4Sc
jeB3oqrqhRxI0TAJth7YJSWbBSstUpgVU0YtyecYNLz3MsVcQD/xfzRucHQDq+nT
yYTFXRGzSpsobdsFAeuMetBcGwDB2ke31XlAAFQ0qt/D1HLlLwKaYrZrMfxSfJGx
s8dIarfjbjsfVj7fwO0A1nAVxf1utr62agF0hp9UNON3FDZV7lRGA4lagakE/Ko=
=YTny
-----END PGP SIGNATURE-----


More information about the mapserver-users mailing list