logo separator

[mkgmap-dev] comparison of relation tag and way tag

From Mike Baggaley mike at tvage.co.uk on Tue Mar 17 15:13:03 GMT 2015

Thanks Gerd, that was just what I needed. I hadn't thought of looking at the
filters. I now have the following:

type=route & (route~'.*foot.*' | route~'.*hiking.*') & network~'.*[nr]wn.*'
& name~".*\(.*\)" { set name='${name|subst:"\(.*\)~>"}'}
type=route & (route~'.*foot.*' | route~'.*hiking.*') & network~'.*[nr]wn.*'
& name=* { apply_once { set hikingroute=yes; set rn='$(rn) &
${name|not-contained: & :rn}' | '$(rn)' | '${name}'; } }

Regards,
Mike
-----Original Message-----
From: GerdP [mailto:gpetermann_muenchen at hotmail.com] 
Sent: 17 March 2015 11:18
To: mkgmap-dev at lists.mkgmap.org.uk
Subject: Re: [mkgmap-dev] comparison of relation tag and way tag

Hi Mike,

I think this problem is a bit like the one that was solved with the
not-contained filter that was recently added.
Maybe you can code a similar filter to solve your problem?

Gerd


Mike Baggaley wrote
> Hi, I have the following lines in my relations file:
> 
> type=route & (route~'.*foot.*' | route~'.*hiking.*') &
> network~'.*[nr]wn.*'
> & name~".*\(.*\)" { set name='${name|subst:"\(.*\)~>"}'}
> type=route & (route~'.*foot.*' | route~'.*hiking.*') &
> network~'.*[nr]wn.*'
> & name=* { apply_once { set hikingroute=yes; set rn='$(rn) & ${name}' |
> '${name}'; } }
> 
> This is working, but if for example the way has two hiking relations with
> names "Shropshire Way (Route 1)" and "Shropshire Way (Route 2)", the first
> rule changes the names of both relations to "Shropshire Way", and the
> second
> rule sets the rn tag of the way to "Shropshire Way & Shropshire Way". I
> would like to check whether the rn tag on the way already contains the
> name
> of the relation (or is equal to if contains can't be done), so that I end
> up
> with rn as "Shropshire Way". Can anyone tell me how this can be achieved?
> 
> Thanks,
> Mike
> 
> _______________________________________________
> mkgmap-dev mailing list

> mkgmap-dev at .org

> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev





--
View this message in context:
http://gis.19327.n5.nabble.com/comparison-of-relation-tag-and-way-tag-tp5837
374p5837503.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.




More information about the mkgmap-dev mailing list