On 24 Apr 2008, at 13:23, Steve Hill wrote:

> But in common software, do the objects have an explicit type?  In
> OpenStreetMap they do not - the type is determined by a bunch of  
> arbitrary
> tags, for which you need background knowledge of which tags define the
> object type and which just define attributes (e.g. there is no unified
> "type" tag which you know will always define what the object is).

Fortunately there aren't actually that many noun-type tags (i.e.  
object type), so you can just check against a small, predefined list.

I make it highway and all the other -ways, power, man_made, leisure,  
amenity, shop, tourism, historic, landuse, military, natural.  
Anything else you can safely assume is an attribute.

As it happens, for 99% of purposes, you'd have to filter by type  
anyway (if you're doing a small-scale highway map, you won't want  
shops or power lines), so it's no extra coding burden.

It kind of goes back IMO to the principle of having a structure  
optimised for easy editing, and expecting the users of the raw data  
(who'll all have different needs anyway) to do some post-processing;  
and how it would be good to offer some standard libraries which do  
common post-processing tasks, so you didn't even need this small  
amount of "background knowledge". But that's best done by someone  
with more l337 Perl/Ruby/Python/whatever skills than me, I'm afraid.

cheers
Richard

_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk

Reply via email to