This question comes up frequently on mailing lists and IRC: "How can I get mapnik not to cutoff my highway shields?"
The problem is that the placement_finder algorithm only takes into account the envelope of the shield text when considering if the placement is valid if avoid edges is turned on. Thus you may have a chopped off symbol at the edge of a tile.
When metatiles are used with Map.buffer_size > 0, and particularly with line placement, things go goofy: part of a shield is rendered in the buffer, but on the next metatile over, that shield isn't often rendered in that same location.
In the attached patch works. I've addressed this by adding a '''minimum_padding''' property to the TextSymbolizer, which prevents a label (or shield) from being placed too near the edge of the map. If the placement under consideration would put the text envelope + padding are not contained by the map extent, the label will not be placed at that location.
Margin might be a better term than padding for consistency with CSS. This could also be min-padding-x and min-padding-y, but as buffer_size is consistent on all sides and shields are usually squarish in size, I didn't go crazy with expanding all the options.
[nino] Note that this patch also works well for a TextSymbolizer with line placement.
[springmeyer] thx Nino! this was applied in r2300.
+ apply Nino Walker's patch text_minimum_padding.diff #547
TODO: consider simplifying text symbolizer options
+ fix text_minimum_padding.diff (#547) patch
It seems that the issue returned in recent revisions (no more than 10 days ago, I'm not able to check now) of Mapnik2:
New images with red lines and more dark water colour. Red lines are specially added metatiles borders. Rendered with 926404d.
it may be related to #1116
FYI: Shields are affected too.
pushing to 2.1 milestone (off of 2.0.0)
I think this issue returning has to do with either clipping or #1283, or both. I do not think it is appropriate to re-open this specific issue because this one originally dealt with a way to solve it. So, closing, please follow either #1283, #1281, or #1282 as I think they will address your concerns more specifically.
@Andrey-VI - just to clarify here: are you using the minimum-padding setting?
No, we didn't use it at all.
@Andrey-VI - and also not using avoid-edges?
I tried this setting, but with no effect. So I removed it from the style.
k, thx. it is broken (avoid-edges) in master (for last month) but I am about to fix (#1283 and #1287)