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

Closed
artemp opened this Issue Oct 11, 2011 · 9 comments

Comments

Projects
None yet
2 participants
@artemp
Member

artemp commented Oct 11, 2011

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.

<PointSymbolizer ... allow_overlap="yes" ignore_placement="yes" />

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

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

[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?

Member

artemp commented Oct 11, 2011

[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

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

[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.

Member

artemp commented Oct 11, 2011

[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

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

[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.

Member

artemp commented Oct 11, 2011

[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

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

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

Member

artemp commented Oct 11, 2011

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

@artemp

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

[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?

Member

artemp commented Oct 11, 2011

[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

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

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

Member

artemp commented Oct 11, 2011

[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

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

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

Member

artemp commented Oct 11, 2011

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

@artemp

This comment has been minimized.

Show comment Hide comment
@artemp

artemp Oct 11, 2011

Member

[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?

Member

artemp commented Oct 11, 2011

[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

This comment has been minimized.

Show comment Hide comment
@springmeyer

springmeyer Sep 6, 2014

Member

tracking over at #1535

Member

springmeyer commented Sep 6, 2014

tracking over at #1535

@springmeyer springmeyer closed this Sep 6, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment