logo separator

[mkgmap-dev] Problem with nested apply

From Marko Mäkelä marko.makela at iki.fi on Mon Jan 4 15:09:43 GMT 2010

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.

In the future, I think that it might be useful if apply supported the
following:

* apply role ~ 'regexp' {} notation,
 e.g., for matching '\(forward_\|backward_\)?stop'
* apply node ...
 for applying only to member nodes
* apply way ...
 for applying only to member ways
* apply relation ...
 for applying only to subrelations
* apply cond <conditions> { <actions> }
 for conditions on the attributes of relation members

Best regards,

	Marko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: route_ref.patch
Type: text/x-diff
Size: 1243 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20100104/4ac80a72/attachment.bin 


More information about the mkgmap-dev mailing list