Dear all, There is a question on my side about the polygon label on Map. As Australia, the admin_centre node is located at Canberra (21674637) but the label for Australia is located in the middle of Australia. I have checked the attributes of Australia in planet OSM pbf and there is nothing found. Could you please provide any clue how to get the NODE info or position about the polygon label? Great thanks. asked 06 Nov '17, 11:02 xiaoweishen |
The node for a polygon label is placed by whichever software is rendering the data. It's not something that's controlled by the OSM data itself. In the case of OSM's "standard" map, the map design is "OpenStreetMap Carto", and the software doing the rendering is called "Mapnik". Mapnik's rules for adding labels can be influenced by the map design, but even then it can be difficult to determine why it has put a label in a particular place (and it can vary with Mapnik software versions, too). However, "determining where some rendering software might have placed a label" seems like an odd request - perhaps if you explain a bit more about why you're asking the question we'll be able to help more? answered 06 Nov '17, 13:00 SomeoneElse ♦ |
I'm a bit late here, but just now stumbled upon what I was looking for here: https://github.com/mapbox/polylabel is the JS library/algorithm used by Mapnik to place the labels, which is the rendering engine behind openstreetmap.org. answered 29 Jan '21, 15:20 xerusf Also IIRC patented https://patents.justia.com/patent/10380454
(30 Jan '21, 10:25)
SK53 ♦
|