-
Notifications
You must be signed in to change notification settings - Fork 823
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
Strange placement of names on complex buildings #349
Comments
Thank you for the report. I agree it looks strange. I believe that this is not a tagging mistake. The relevant code can be found in addressing.mss. |
I believe the first example is a bug in Mapnik interior point positioning: mapnik/mapnik#2137. Mapnik's interior point algorithm works like this:
There's a bug in step 3 where it fails to pick the widest subsection. Way 227767264 appears to demonstrate the bug. The centroid is just above the lower half of the building. It finds two subsections to the east or west: a tiny sliver through the NW corner and the more substantial bit to the east. The point should be put it in the east part. Way 262420039 appears to be working as intended, though. The centroid would be outside the building probably in the grass. The two placement options are either the star-like part on the left or the narrow funnel-like bit directly to the right. The algorithm successfully picks the wider of the two. There's a similar algorithm in the GEOS library, but it still produces non-ideal results like the second example. |
Is calculating the point in postgresql with postgis functions a potential improvement? |
|
I've noticed names being placed in weird places recently, for example on these two ways:
http://www.openstreetmap.org/way/227767264
http://www.openstreetmap.org/way/262420024
It may be that the shapes of these buildings are a bit complex, but the placement is very odd and makes it seem as though only part of the building has that name.
The text was updated successfully, but these errors were encountered: