Duck tagging

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Duck tagging
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް

Duck tagging is a philosophy of choosing appropriate tags for use in OpenStreetMap. The following is an essay (originally a mailing list post) by Richard.

If it looks like a duck and quacks like a duck, tag it as a duck. If it looks like a UXB, run away very fast.

OSM tagging has traditionally worked by identifying fairly significant "objects". This is a chemist, this is a trunk road, this is a canal. This is a farm, this is a railway station, this is a cycleway.

Each object contains a fair amount of meaning. This is a railway station, so it's open to passengers, trains call here, you can wait at it until your train turns up. This is a chemist, so it's a type of shop, you can buy medical goods at it.

The mapper can, of course, add extra tags to make the definition more precise. So, with the chemist, you might add opening hours if it's an all-night chemist. With the railway station, you might add an 'access=private' tag if it's, say, a military railway station (we have one of those near Bicester, UK) or a private one (we have one in Scotland called simply 'IBM' :) ). And so on. In true OSM fashion, this is often iterative. You add the basic tag first, then you go back later and refine it.

This approach is because, since mappers are our most valuable resource, we optimise for ease of growing the map. The data consumer is expected to postprocess, which of course they'll be doing anyway (rendering, generating routing database, extracting and reformatting as a gazetteer, whatever). But they only need to do the postprocessing they want. A renderer may choose not to care that some chemists are 24 hours, and will show them all with the same icon. A train simulator certainly won't care about that and may well not care about the private stations - hey, the driver still stops there. And so on.

Essentially, you tag according to the "duck test" - if it quacks like a duck, looks like a duck, and walks like a duck, call it a duck.

This saves you all the work of describing the species every time. If actually it's a rare Outer Hebridean Florglenood which isn't quite a duck though looks and behaves identically, hell, you just do wildfowl=duck, species=florglenood.

'highway=cycleway' is just like this. It's a meaningful object. It means a path with physical characteristics that can accommodate a bike, where bikes and pedestrians are permitted, and motor traffic is banned. It means, basically, that it quacks like a cycleway. This saves a whole bunch of tagging work, and means that clients don't need to care about the details if they don't want to. But again, if you want to refine it, you can. You can have 'highway=cycleway;foot=no' if that's the case.

The 'highway=path' tag turns OSM tagging on its head. It's a largely meaningless object. It shifts the burden onto the mapper, who has to start with four tags where one was enough. It makes it more difficult for, say, a renderer which now has to parse these four tags, rather than one, to know how to draw it. This isn't how we talk about ducks, it isn't how we tag railway stations, chemists, trunk roads or farms, and it shouldn't be how we tag cycleways.