Proposal:Label (relation)

From OpenStreetMap Wiki
(Redirected from Relations/Proposed/Label)
Jump to navigation Jump to search

This relation should allow the renderer to place the label or icon describing an area in a manually specified position.

Tags

Key Value Discussion
type label defines the type of the relation

Don't use this relation type to associate a label to any boundary relation, where a member node may already be given the same Role label role defined below.

Members

Element Role Recurrence? Discussion
node node Role label zero or more node(s) at which icon/label should be placed
area area Role object one or more the area that is being labeled

Rendering

If the renderer wants to place a label or icon in an area, it may check whether that area is member of a label-relation. If so, it may place the icon at the label-node, else it places it in some automatic manner (barycenter, ...) or considers location of other rendered labels.

If object shouldn't have any icon, then use label-relation which has no label member. If there should be more than one icon, then use more label members type.

Use more than one object member if you want to have only one icon for more objects (for example if they are small objects close together)

Note that different map styles will prefer to show labels of different objects, in various styles. Label placement depends also on zoom level, language used to display labels (name in one language may be longer than in another what may result in labels between objects colliding or not depending on language) and other factors.

It means that label roles would be optimized for specific map styles, making them form of tagging for the renderer.

Notes

  • The specifics are very much open for discussion.
  • Would it make sense to allow more general objects? We might want to allow labelling ways or composite areas -- can roles be members of roles?
  • This might be merged with Relations/Proposed/Site as a one-object site, but then we should rethink the naming.
  • should this go into a rendering namespace (type=rendering:label)?

Renderer support

Label relation is supported by osmarender.