NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

xiaoweishen
66225
accept rate: 0%


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?

permanent link

answered 06 Nov '17, 13:00

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 06 Nov '17, 13:00

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.

permanent link

answered 29 Jan '21, 15:20

xerusf's gravatar image

xerusf
76234
accept rate: 0%

(30 Jan '21, 10:25) SK53 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×710
×92
×16

question asked: 06 Nov '17, 11:02

question was seen: 3,403 times

last updated: 30 Jan '21, 10:25

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum