-
Notifications
You must be signed in to change notification settings - Fork 819
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
The name of a building doesn't show up #4129
Comments
Screenshot: It appears that the building text is blocked the icons for the doctor's office, Luxmed, which is inside of the building at the point where the label should render. This is a bit surprising, but because of the odd shape of the building, the label is supposed to appear in the right corner. At z20 the building name is rendered, on my test server: Unfortunately, with the current tools used to render this style, there is not a good option for adjusting the position of text labels. With a new version of Mapnik it might be possible to use a different label placement strategy (grid) - but this might not work with vector tiles We could adjust the priority of building names to be higher than doctor's offices, but in that case the doctor's office symbol or name would not be rendered. |
I added the name of this building and Luxmed at the same time and I thought the name will appear in the middle, so that's why I chose such position for the doctors. I was expecting the name to appear in the middle. Why is it on the right? The building is symmetrical, I think. |
The name label for buildings (and other polygons with a text label) is placed on a point which is calculated by https://gis.stackexchange.com/questions/76498/how-is-st-pointonsurface-calculated "ST_PointOnSurface() works roughly like this, if the geometry is a polygon:" "Trace an east-west ray, lying half-way between the northern and southern extents of the polygon. Actual code used is here: https://github.com/libgeos/geos/blob/38b479b73be2535925e268ec6a5a0af0a278f364/src/algorithm/InteriorPointArea.cpp#L163 In the past, the Mapnik "interior" algorithm was used for labels. This sometimes resulted in better label placesments, but other times the placement was worse. Unfortunately, good label placement algorithms are complex and computationally expensive, so they are difficult to use with this map style, which is primarily intended for the standard map on openstreetmap.org, which needs to provides very frequent updates for the whole globe. If someone is interested in developing a better algorithm for use in PostGIS, I would be interested in trying that here. But it would need to be not too much slower than |
The name of a building doesn't show up
https://www.openstreetmap.org/way/101424849
The text was updated successfully, but these errors were encountered: