[OSM-dev] Machine-readable list of map features?

Karl Guggisberg karl.guggisberg at guggis.ch
Thu Dec 18 13:49:18 GMT 2008


Hi,

I have been assembling a similiar file by hand. A typical entry looks as
follows:
	<tag key="junction" type="xs:string" for-way="yes" for-node="yes" >
		<label value="roundabout" for-way="yes"/>
		<label value="motorway_junction" for-node="yes"/>
	</tag>

Beside the names of keys and labels, I'm interested in
- the applicable scope (node, way, areay, probably also relation). This is
"encoded" as an image in the Wiki source.
- the "type" of a value, mainly for tags whose type is not an arbitrary
string or a list of predefined labels, i.e. an
  enumeration. Examples: maxwidth and maxheight. 

The wiki also provides information about dependencies between tags. For
instance, http://wiki.openstreetmap.org/wiki/Tag:highway%3Dmotorway
mentiones that this tag implies
    * access=no
    * motorcar=yes
    * hgv=yes
    * oneway=yes
Useful combinations like
    * name=*
    * ref=*
    * oneway=yes
    * lanes=*
for http://wiki.openstreetmap.org/wiki/Tag:highway%3Dmotorway is another
useful piece of information.

I'd like this information be part of the machine readable list too. 

I had a look at the wiki template pages for tags, i.e.
http://wiki.openstreetmap.org/wiki/Template:Map_Features:highway
and I realized that they always consists of two section,
- a noinclude-Section including sort of a structured encoding of tags and
values
- a Wiki-formatted section including the same information nicely formatted
for rendering in the Wiki

Unfortunately, these two sections are rarely in sync. 

When we strive for a machine readable list of tags then we should fix the
wiki source first. I think that we should agree on a structured format to
defined tags in the noinclude-section of templates pages, provide and
maintain the information there and assemble a machine readable list from
these sections. 

Regards
Karl


-----Ursprüngliche Nachricht-----
Von: Olaf Hannemann [mailto:ohannemann at gmx.de] 
Gesendet: Donnerstag, 18. Dezember 2008 14:28
An: karl.guggisberg at guggis.ch
Betreff: Re: [OSM-dev] Machine-readable list of map features?

Hi,

Am Donnerstag, 18. Dezember 2008 13:53:29 schrieb Karl Guggisberg:
> just wondering whether there is a machine readable equivalent of
>     http://wiki.openstreetmap.org/wiki/Map_Features
> which is easier to parse than formatted Wiki source?
>
> Rumors are that the JOSM validator plugin relies on such a list.

There is a Perl-Module named Geo-OSM-MapFeatures available. Take a look at
http://search.cpan.org/~bobkare/Geo-OSM-MapFeatures-0.02.
I am currently working on a little script which parses the Map_Features into
a xml file. You can see first results at
http://opensource-werkstatt-stubben.org/osm/map_features.xml.

But there is a little work todo:
- sort all values into one key tag.
- remove some "User Defined" values.

regards

Olaf





More information about the dev mailing list