[Qgis-user] Let's discuss on a Mask feature

HAUBOURG regis.haubourg at eau-adour-garonne.fr
Fri Dec 7 03:39:11 PST 2012


Hi Vincent,
 
> As to solve this, I though of a solution being redrawing a geometrical object in
> the composer on top of the map, based on the objects to mask. This needs
> implementation of a polygon object in the composer, which is not yet
> present.
> But it would probably be simpler than doing a full mask feature
> implementation.

The mask feature is also needed in the main Map Canvas.  It would be better to implement a full Mask feature .

> 
> We could also have a button in the composer to <create a mask for this map
> based on the currently selected features in the map window>.

No, because when exporting in batch mode with Atlas can't deal with a manual selection.
 - When Atlas is not activated, then composer Maps should only show current map state (with Mask ON or OFF). 
IMHO when several maps are in the composer, users wish to use mask only on some maps. If we want to keep actual workflow, that implies using the "Lock layer for this map" to show some layers or not on each map.   Then I see no other choice than materializing Mask as a layer. That layer  would have a special behavior:  it should be able to mask all labels of layers that lies under it, but not those lying on top of it. Options could be using a buffer and its size, simplify feature on the fly or not + threshold. 

That would allow a user to switch differents masks on and off, and to use them or not in different Composer maps. 
A memory layer would be fine for it.. BUT we need a way to save them along with the project. THAT implies we need to commit in CORE "Memory Layer Saver" features. (previously discussed here [0], but left opened)

 - When Atlas is activated, the idea is to let Atlas code generate a temporary mask layer fo each object of Coverage Layer, and suppress the mask layer each time a export iteration is done. Buffer and simplify options could be retyped in Atlas Panel and then passed as arguments to Mask classes.


> 
> The only drawback to this approach is that the labels will be covered by the
> mask, and will appear truncated if part of it lies under the mask. I do not
> know if this would be a blocker.
This is a BLOCKER, since this is what Mapinfo does, and this is not satisfying at all. People do workarounds like cookie cutter to destroy objects outside the mask. We loose the dynamic link with data and batch Atlas possibilities. 
 This is why I was asking devs on risks of it, and submitting the idea of simplifying the masks polygon. Warnings would be welcome if polygons have to much vertices and parts , along with  suggestions to mask less layers, and simplifies polygons.. 


> 
> Therefore the question is : do we need this in the main map window, or this
> solution for composer would be enough ?
> 
> We'd be glad to implement that in composer and Atlas if this is a good
> solution for you.


Sure ;-) but we need to find a global agreement on it, and we previously need to act what method is choosen to implement Memory Layer persistency in core. I'll be glad to fund this too.

 



[0] - http://osgeo-org.1560.n6.nabble.com/Memory-data-provider-persistence-td4108012.html 
 




More information about the Qgis-user mailing list