[OSM-talk] namespaces

Frederik Ramm frederik at remote.org
Fri Apr 25 10:37:39 BST 2008


Hi,

> We don't
> want OSM data to only make sense to people familiar
> with the concept of "namespaces" do we? Or was that
> the intention?

Namespaces are

1. REQUIRED if you want to use the same tag in different contexts on  
the same object. For example if you want to use the "name" tag in the  
context "English" or "German". Another example would be if you wanted  
to use the "maxspeed" tag in the context "car" and in the context "HGV".

2. USEFUL if you introduce a potentially large group of new tags that  
should be identifiable as such. For example if you want to start  
tagging buildings with detailed information about architecture, when  
they were built and using what technology and what kind of material,  
you might want to introduce a new namespace for this so that anyone  
can see that these tags belong together even if he's not a civil  
engineer. If you don't do that then we might end up with objects that  
have 50+ tags on them and no obvious grouping; not a problem for  
machines reading the data but currently our data is fairly human- 
readable and I'd like it to remain that way.

3. UNNECESSARY (at best: an exercise in beauty for the computer geek)  
in most other cases ;-)

How you use namespaces is a completely different topic; when we  
currently write "name:en" and "name:de", or "maxspeed_hgv" and  
"maxspeed_car", we use the namespace concept. XML has a way to  
support namespaces which could be used as well. And how you then save  
the stuff in the database is still another topic.

In a way, we have also (mis?)used our key/value concept to support  
namespaces. When we write "highway=gate" that doesn't mean that this  
node is a kind of highway called gate, it means that this node is a  
gate in the "namespace" or "realm" of highways. If we had a proper  
namespace for everything highway-related, the streets would perhaps  
be tagged "highway:type=motorway" and a gate would become  
"highway:gate=true". This will become necessary if we start seeing  
collisions.

I don't really see reason for such a heated discussion. We are  
already using namespaces. Most implementations of namespaces somehow  
support the concept of a "default" or "root" namespace, which is  
where, logically, all those tags currently reside that are not  
qualified with a namespace (i.e. 95% of tags). We can move tags out  
of the default namespace into their own namespaces if and when it  
makes sense; new tags can be created with their own namespaces if it  
makes sense, old tags can remain where they are unless there's a  
pressing practical problem.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"







More information about the talk mailing list