logo separator

[mkgmap-dev] Mkgmap complains about '&' in role id

From Marko Mäkelä marko.makela at iki.fi on Sat Jan 23 18:02:45 GMT 2010

Hi Lambertus,

On Sat, Jan 23, 2010 at 06:11:56PM +0100, Lambertus wrote:
> There are a few tiles that fail to render due to 'Bad file format: 
> 63240029.osm.gz' on every update and I've tracked it down to Mkgmap 
> complaining about a '&' character in the role id of a way in a relation.
> 
> Example:
> http://www.openstreetmap.org/browse/relation/359107
> 
> Can Mkgmap be made to accept this? Or is this an error in the planet 
> dump procedure?

It is obviously crappy map data, but mkgmap should not complain on
valid XML data structure anyway.

I started by downloading the following in JOSM:

http://www.openstreetmap.org/?lat=29.52352&lon=-98.39367&zoom=18

Then I downloaded the remaining relation members in JOSM's relation editor
and saved the result to a file.  But mkgmap did not croak for me on this:

  <relation id='359107' timestamp='2010-01-22T11:39:42Z' uid='110263' user='wern
er2101' visible='true' version='5' changeset='3682358'>
    <member type='way' ref='45878370' role='632' />
    <member type='way' ref='40995493' role='630' />
    <member type='way' ref='33181726' role='17 &amp;94' />
    <tag k='route' v='bus' />
    <tag k='type' v='route' />
  </relation>

This looks like well-formed XML to me.  I double-checked by downloading
the URL reported by JOSM:
http://www.openstreetmap.org/api/0.6/map?bbox=-98.39435664550781,29.523176677246095,-98.39298335449219,29.523863322753908

I downloaded it both with Debian Iceweasel (aka Mozilla Firefox)
and wget.  In both copies, it was correctly encoded as role='17 &amp;94'.

Side note: The node that I downloaded is part of the way
http://www.openstreetmap.org/browse/way/45878370
which looks like it was directly converted from a GPS track,
not connected to other roads.  The relation is utter nonsense too.
It seems to combine four different bus lines to one relation.

I suspect that your map splitter is at error: it does not encode
role='' values properly.

	Marko



More information about the mkgmap-dev mailing list