[Openstreetmap-dev] Re: Streets in GPX

nick at hogweed.org nick at hogweed.org
Fri Sep 23 10:40:46 BST 2005


On Friday 23 September 2005 08:40, Frank Mohr wrote:
> nick at hogweed.org wrote:
> > On Thursday 22 September 2005 19:53, Petter Reinholdtsen wrote:
> >
> > ...
> >
> > Please correct me if I'm wrong (it may just be the way the manual is
> > written and the lack of good tutorials on the web)
>
> have you seen this intro to GML?
> http://www.xml.com/pub/a/2004/11/24/tourist.html
> http://www.xml.com/pub/a/2004/12/29/tourist.html

That makes it a bit clearer but still seems a bit of a strange way of doing 
things; according to the document GML merely provides a way to describe 
features primarily defined in some other XML namespace. It just doesn't seem 
to be the clearest way of doing it. e.g.

  <cityMember>
    <River>
      <gml:description>The river that runs through 
Cambridge.</gml:description>
      <gml:name>Cam</gml:name>
      <gml:centerLineOf>
        <gml:LineString 
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
          <gml:coordinates>0,50</gml:coordinates>
          <gml:coordinates>70,60</gml:coordinates>
          <gml:coordinates>100,50</gml:coordinates>
        </gml:LineString>
      </gml:centerLineOf>
    </River>
  </cityMember>

I'm sure there are advantages doing it this way in some scenarios, but it 
seems to be a more complex way of doing things than other commonly-used XML 
formats such as GPX or XHTML. Why not:

<line class="river"> 
<name>Cam</name>
<desc>The river that runs through Cambridge.</desc>
<point lat="lat1" lon="lon1"/>
<point lat="lat2" lon="lon2"/>
<point lat="lat3" lon="lon3"/>
</line>

This does not validate the separation of content from presentation, any more 
than XHTML does. It's just pure data. An application could read this, see 
we're dealing with a river and present it accordingly, in its own way.

> not only keys/values ...
> i still missing a way to define a street by a list of segments that
> also belong to other streets
> (my old example for Bundestraße in Germany/route nationale in france
> where the B#/RN# goes over several hundered km
> and has additional names in cities,
> in some cases, the same segment belongs to several B# and has also
> a city street name)

Key/val could accommodate numbered roads with names but I agree, cases where
two numbered roads merge are not easily accommodated.

While we're on the subject of road numbering, it's gone a bit strange here. 
The UK used to have quite a logical numbering system, but someone in 
government decided to do wacky things sometime in the 90s. (Probably the same
one that thinks Sherborne, Dorset is spelt "Sherbourne", look at the road 
signs on the Dorchester bypass....)  For example, the
A34 road disappears at Oxford and then re-emerges at Birmingham, some 60 miles 
north.....

> GPX also lacks support for areas

True, forgot about that, I extend GPX myself to deal with polygons.

> > Of course OSM could make up its own XML format for representing maps....
>
> maybe we should ..

Maybe, indeed: use GPX for the moment, but in the longer term, it would be 
good to see a simple, clear mapping format that's as accessible as XHTML. It 
could easily use GPX as a base, renaming some of the tags e.g. <feature> 
rather than <wpt>. Will also look into shapefiles though, they may fit the 
bill though I don't believe they are XML so you lose the advantages (e.g. 
transformability, standard format) of XML.

In the meantime I'll adjust osm-editor so that it reads and writes key/values 
in the <property key="key" value="value"/> format in GPX.

Nick




More information about the dev mailing list