New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rendering of motorway ref cut off at tile edge #114
Comments
So, on the one hand the clipping is coming from the mod_tile/renderd + mapnik layer of the stack, on the other hand we can probably address it in the stylesheet. Background When orm renders a tile, it renders an area of 8x8 tiles, plus a 128px buffer around the edges. The goal of the buffer is to have consistent placement around the edges, although of course you'd need an infinite buffer to guarantee consistent placement across metatiles. @cquest has a stylesheet with a 256px buffer and still gets these issues (mapnik 2.2 + latest renderd), indicating that this isn't just an issue of insufficient buffer. A necessary condition of this edge labelling strategy working is that insensitive to the buffer setting. The primary consideration here is that any label placed in isolation (with no other labels to conflict with) will always be placed the same place, regardless of buffer. An alternate strategy proposed by @plepe in openstreetmap/mod_tile#29 that does not have this requirement is to avoid labelling on the meta-tile boundaries (not meta-tile+buffer boundaries) but this changes the issue to one of duplicate labels (including on POIs) and visual oddities with gaps with no labels. For the reasons below, I believe this is caused by clip=false mapnik/mapnik#1569 contains an overview of the history of this option for MarkerSymbolizers, but in brief, the default may of effectively been clip=false on the version of mapnik yevaud was running and is clip=true now. When a geometry is clipped any label placement relative to the ends is altered, unless it happens to be in exactly the right place. These combined mean that label placement is a lot more variable based on the meta+buffer bounds, leading to difference across meta-tiles. Going to clip=false will probably degrade performance by a measurable amount, but I believe there are some mitigating strategies, which I'll get into another excessively long message. _tl;dr: clip=true probably causes variable label placement between meta-tiles._ |
@plepe pull request has been added on osmfr tile server and the first tests show a major improvement. |
A quick bench of the bleed patch on osmfr tiles... at zoom 12 on France, it takes 10% more time only (compared to 40% larger drawing area with a 256/128 bleed margin on 8x8 metatiles). I also tested with a smaller bleed (128/64) but got almost the same result, so I'll stay with 256/128. I've also noticed a side effect... the bleed area is taken into account by the avoid-edges algorithm which has now no effect. |
On closer review, I'm not sure this is actually the case. If the patch is simply rendering a larger area then cutting out the middle it would still have these issues. |
cc @springmeyer |
Refs of some motorways are cut off at the edge of some (meta?) tiles. Problems at at least z12-z10.
All involved tiles in the example above are forcibly newly rendered.
The text was updated successfully, but these errors were encountered: