-
Notifications
You must be signed in to change notification settings - Fork 13
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
Duplicate labels #75
Comments
I was also thinking for the cut off labels (orange above) we might try increasing the cc @saleiva |
Map {
background-color: @water;
buffer-size: 256;
} 256 should be sufficient buffer for all these labels. It's more likely a case of undefined ordering of results in the SQL or some of Mapnik's myriad buffer/edge/clip settings being wrong. |
yeah i thought we could try I didn't notice this many duplicates in the past. Has something changed? |
This is a problem for places on a tile boundary, they won't get a label at all. Looking at the problems here, I think there's two independent problems. One is duplicate labels, the other is cut off labels. I suggest solving duplicate first. I haven't tested, but based on the output it looks like it comes from rendering both place points and place polygons and there being duplicates in the data. Fixing gravitystorm/openstreetmap-carto#103 would cause this to get cleaned up quickly. |
I thought the same but I don't see place polygons... in the basemap files. Unless I've totally missed them? I didn't even know that place polygons were part of OSM? |
That labeling behavior is classic of polygons... |
And I've used |
If Mapnik 3.x is in use behind the scenes, |
http://www.openstreetmap.org/relation/4636912 The centroid and node location are where the two labels in the screenshot are.
Does this cause more problems at MT edges where in one buffered MT has both objects but the other only has one? I imagine you'd want |
We've been setting the distance as large as is feasible (metatile size + buffer) and that seems to help. |
we can't use text-repeat-distance.... what is another alternative? |
text-min-distance maybe? i'll try |
Trying to fight some recent traffic peaks we tweaked some tiler/Mapnik parameters some days ago, one of them was Disabling it now |
This would do it. If you have a polygon you are labeling you'd get two polygons when splitting at the MT boundaries, each of which has its own centroid. The issues are similar to vector tiles and polygon labeling, you can only clip geometries if you're not labeling based on them. For vector tiles the solution is to use ST_PointOnSurface |
Noticing a lot of duplicate labels on our basemaps. In this example, you'll see that neighborhoods are labeled twice once above and once below tile boundaries. One fix for this might be to use
text-avoid-edges: true
but we would have to test the impacts across the world and with other labels.Example at z15 in the Washington, DC area:
The text was updated successfully, but these errors were encountered: