[mkgmap-dev] Problem with nested apply
From Marko Mäkelä marko.makela at iki.fi on Mon Jan 4 21:26:39 GMT 2010
On Mon, Jan 04, 2010 at 05:09:43PM +0200, Marko Mäkelä wrote: > I figured out that mkgmap does already support nested relations, but it > is not working for me. The attached patch attempts to copy the route name > to the members of member relations. This is the relation in question: > > <relation id='155054' timestamp='2010-01-03T22:13:56Z' uid='93285' user='skela' visible='true' version='3' changeset='3533281'> > <member type='relation' ref='375952' role='stop' /> > <member type='way' ref='2735495' role='' /> > <member type='relation' ref='375951' role='stop' /> > > The route name is successfully applied to relation 375952 (and its members) > and way 2735495, but according to an echo action that I added, not even > the outer apply is executed on relation 375951. What am I doing wrong? > I could not see any obvious bug in the code. The bug apparently is in the relation parser, in the way how uk.me.parabola.mkgmap.reader.osm.Relation.addElement() is invoked. In the source file, <relation id='375952'> occurs after the super-relation, while relation 375951 is defined before the super-relation. It seems that there should be a Relation.addRelation(String role, long id) and the subrelation id resolution would be deferred until all relation definitions have been parsed. Currently, the id resolution is attempted too early. It works for node and way members, because they always occur before relations in the input file. It is broken for relation members. Another bug in Relation.addElement() is that it allows members to occur in at most one role. Route relations can legitimately contain members multiple times in different roles. Marko
- Previous message: [mkgmap-dev] Problem with nested apply
- Next message: [mkgmap-dev] Problem with nested apply
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list