Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

'Ignore placement' counterpart to allow_overlap="yes" #564

Closed
artemp opened this Issue · 9 comments

2 participants

@artemp
Owner

For certain solutions/tricks, I find it would be helpful to have a 'forward going' counterpart to allow_overlap="yes" on a symbolizer.

allow_overlap="yes" allows the involved symbolizer to ignore previous placements.

What I'm thinking of is telling mapnik that the involved symbolizer placement is not interesting to any subsequent symbolizers, and may be overpainted, and thus its placement shouldn't be recorded into the global placement list.

This would direct this symbolizer to both ignore past placements, and allow any future symbolizers to overpaint it.

The only way to emulate the workings of this currently is to use clear_label_cache, but that's the broadsword approach instead of the surgical scalpel approach to this. :)

@artemp
Owner

[springmeyer] see r2287 and r2288, which adds support to PointSymbolizer. The others look much tougher. Can you test this out - think about the naming a bit more, and let me know if its worth trying to add to ShieldSymbolizer/TextSymbolizer/MarkerSymbolizer?

@artemp
Owner

[Ldp] I was thinking mainly about PointSymbolizer, as a way to add elements to the map which can or could not be done with other symbolizers and which should be ignored in the collision detection like Line/Polygon are.

E.g. the OSM turning circles, which currently uses the clear-cache hack to clear the placement list.

I do not have a current use case for Shield/Text/MarkerSymbolizer.

@artemp
Owner

[Ldp] PS: Are you sure the tuple index is right at
http://trac.mapnik.org/browser/trunk/bindings/python/mapnik_point_symbolizer.cpp#L87

You skipped state[2]. When I also did that, the nosetests failed for PointSymbolizer.

@artemp
Owner

[Ldp] The patch also adds allow_overlap/opacity/ignore_placement to the 'vanilla' PointSymbolizer (ie. the one without a backing image file).

@artemp
Owner

[springmeyer] yes, that is a bug in trunk, nice spot. I fixed in r2637 (but pickling is not really active in trunk and is mostly disabled atm).

re: patch for 0.7.2 - thanks! Do you want this officially backported or just offering the patch in case others want to try?

@artemp
Owner

[Ldp] I'd like to see it officially added to 0.7.2, but in the meantime, am offering it to others to try.

@artemp
Owner

[springmeyer] going to skip backporting, to keep focus. closing.

@artemp
Owner

[numenor] I have a use case for a feature like this applying to text symbolizers (and can think of other for shield symbolizers as well ...), for which I use clearing of cache in the moment: rendering really large partially transparent text (e.g. as city labels in high zoom levels) should not hinder placement of other features on top of it. Will it be possible to extend the patch to other symbolizers?

@springmeyer
Owner

tracking over at #1535

@springmeyer springmeyer closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.