Talk:Proposed features/label

From OpenStreetMap Wiki
Jump to: navigation, search

Questions

Tagging structure

  • Rather than the proposal label='words to be rendered', label_size=1|2|3|4|5, an alternative tagging structure would be label_size_1 = 'large words to be rendered', label_size_2 = 'smaller words to be rendered', etc. The choice of structure being dependent upon which it would be easier for Osmarender & Mapnik to deal with.

Label Colours

  • It would be nice if the tagging structure could be extended to say label_color=red, or label_color=ff0000, so that coloured text could be placed on the map.

If someone with detailed knowledge of Osmarender, and Mapnik, could comment on the above I'd be grateful. Dmgroom 17:59, 26 December 2006 (UTC)

  • Colo(u)rs should be left out of the OSM data and left entirely to the renderers. Assigning a text color in OSM then placing red text on a red road loses the intended emphasis of the red text. Assigning colours for emphasis also fails to work as expected when rendering a monochrome maps, or maps for various forms of color-blindness. Rw 18:54, 26 December 2006 (UTC)
    • I take on board your points above, but when you say 'Colo(u)rs should be .... left entirely to the renderers' that would mean all label text would be the same colour, probably I guess black. In certain circumstances, to give emphasis to a label, or for clarity where a label is being displayed over an area which is dark in colour, it might be nice to have the ability to specify a label colour. If you wanted to produce a monochrome map your could simply ignore the label_colour tag. Dmgroom 22:42, 27 December 2006 (UTC)
      • I'll restate that colors should be left to the renderer, and clarify by adding that all colors should be left to the renderer. Early web browsers assigned fixed colors to links. Current practice is to control link (and other) colors with the css file, created at design time with the web site application in mind. We're making maps, not web sites but the analogy should hold. The person making a map for a given application will know better what should be emphasized and how to do it. Rw 00:13, 28 December 2006 (UTC)

I have reservations about the "label size=1|2|3|4|5" proposal. I recognize that some maps require greater emphasis on some features than might be granted by the default rendering schemes. The assignment of fixed size values to certain features strikes me as less flexible than the current system. Perhaps we can extend the number of values for k="place", v="city, town, etc." so that the place-data in OSM is correct and descriptive. Then let the renderers select options for label-size at render-time, depending on the intended application for the map. Rw 19:02, 26 December 2006 (UTC)

  • I'm not suggesting fixed sizes, simply that there is a method to attach a hierarchy of sizes to the label, where size 1 is bigger than size 2, size 2 bigger than size 3, etc. This is extacly the same as we currently have for the rendering of place names.Dmgroom 22:42, 27 December 2006 (UTC)
    • The simple numerical hierarchy will be useful and make sense when it is assigned, but it provides no information to the person making a specialty map (other than "the person who entered this data assigned this hierarchy"). Perhaps a fabricated example will help. To create a provincial map of "beautiful villages of 4,000 to 5,000 inhabitants" one could use a population tag to select the village names to emphasize on the map. Even if we all agree ( and remember ) to assign label=3 to villages with 4000 < population < 5000 it becomes unusable for a map of villages with population between 4,500 and 5,500. Label=3 doesn't tell us why it is 3 rather than 2 or 4. Did the original mapper emphasize towns with higher population or with better municipal water quality, or higher property tax rates? Perhaps I map a group of off-shore islands and name them all with label sizes. I choose to emphasize the island that has the best hunting. Another OSM user wants a map of the same area, sees my emphasis an believes that my emphasis must mean the island has the best beach for sunbathing. Better to indicate why you think a label of name should be emphasized. That gives other users the context they need to make the right choice about how to use the information you provided in their application. Rw 00:13, 28 December 2006 (UTC)

I don't think this whole thing with extra labels is a good idea. As others have mentioned it is the job of the renderer to place labels at the right positions and in the right form. All the data in the OSM database should be semantically right, i.e. it should say what something is, not how something should look. If a specific rendering needs more info we might need extra tags specific to this rendering, so we could say: "If this city label is rendered with the osmarender standard styles in scale x, then shift the label 40m east and 60m south" or whatever. But this would make things a lot more complicated. So yes, I see the problem this proposal is trying to solve and we need to solve it at some point, but not in the way proposed here which creates more questions than it answers. Joto 14:51, 28 December 2006 (UTC)

  • An 'alignment=[left|center|right]' would be useful to help placement on the resultant map next to object. In particular I think that this tag could be used to render a map key from a seperate/specialised source file. The rendered SVG could then be cut'n'pasted onto the real map. Done with something like 'osmarender -r my_style.xml my_style_key.xml key.svg' where 'my_style_key.xml' is the special map. --Mungewell 19:53, 28 March 2008 (UTC)