Bg:Beginners Guide 1.4.1
Добавяне на етикети
In the previous section you learned about OpenStreetMap's geo elements, it is time to learn a little about OpenStreetMap's tagging scheme. The basic tagging scheme can be found in Tagging. The tagging page links to the Map_Features page which lists most of the keys accepted by OSM community. Many of the examples on the Map_Features page, particularly those regarding roads, are specific to the U.K. Users in other countries will want to look at Tagging for guidance in applying the tagging scheme to their country.
Types Of Geoobjects
OpenStreetMap's Tagging Scheme has 3 data types that may be tagged:
- Node: Is just a node used to mark a particular point on the map. For example:
- Linear Is a way used to mark a particular linear item on the map. For example:
- Area: Is a closed way to mark a particular area on the map. For example:
Types Of Tags
There are many tags, but they all serve different purposes. There are 4 different types of tags that frequently appear. (The terminology used here isn’t OSM recognised. It is altered to make better if necessary.)
- Element Tags: These tags state 1 bit of information each. (e.g. oneway=yes, lanes=2)
- Pre-defined Tags: These tags are shortcuts which have the value of many element tags. (e.g. highway=motorway, which would be the same as lanes=3 oneway=yes maxspeed=112 etc. when used in the UK)
- Tweaking Tags: These tags can be used to make a pre-defined tags correct. (e.g. motorcycle=no may be used along with highway=motorway where motorbikes can’t go, assuming there is such a place. lanes=2 may be used for smaller motorways, such as ones commonly found in Scotland)
- Rendering Tags: These are tags that are unrelated to what is being mapped, but rather are there to tell the renderer how to render something. (e.g. layer=1)
Tags are also designed to be used in different ways. Some should be used for nodes, some for ways, and others for closed ways.
There are many tags that can be used to list all the facts about a road (or whatever you happen to be mapping), but to start with, and just to get your first render you only need to add a highway tag for a road. From this point on, you should be able to see your work rendering on OSM's maps, and add more and more details.
- Q: I have added highway=unclassified, yet it doesn’t show up.
- A: The renderers are case-sensitive, it should be highway=unclassified. All tags are lower-case.
- Q: I have added tags to the nodes/segments, yet it doesn’t show up.
- A: You should add tags that apply to the whole way, to the way itself, not the nodes and segments that it is made from. Tagging nodes is for marking specific spots, such as a petrol station. You shouldn't tag segments in almost all instances, if ever.