logo separator

[mkgmap-dev] [patch v3] reverse oneways

From Felix Hartmann extremecarver at gmail.com on Wed Apr 30 12:11:31 BST 2014

I don't know yet if it works that way - didn't test yet. I'm slowly 
moving forward (but will take a break now to get something to eat 
first...)...
However wanted to understand before starting to change too much - as 
that will be about 500 lines in my style that need adapting or change 
(basically I not only add arrows for DH incline, but also for all 
streets with oneway, plus I add cycleway=left/right and so on, and that 
also needs to end up on the proper side of the street. No matter if 
before style processing there has been a oneway=-1 or oneway=yes or no 
oneway tag at all..., plus I need to check if all rivers work correctly 
meaning point in the direction of the waterflow).

So far everything seemed just random to me, so I will have to go step by 
step.

As for continue with_actions and {} - I do hope it uses leaves the way 
intact for all uses before it was given...


On 30.04.2014 13:05, Gerd Petermann wrote:
> Hi Felix,
>
> when mkgmap finds the tag oneway=-1 or oneway=reverse
> the points of the way are reversed and the tag is changed to oneway=yes.
> This happens after style processing and is done with a copy of the 
> original way
> if the style used continue.
> So, if you use continue in your style you should see the way with 
> unchanged tags
> and unchanged order of points.
>
> Do you think that it works in a different way?
>
> Gerd
>
> ------------------------------------------------------------------------
> Date: Wed, 30 Apr 2014 12:48:35 +0200
> From: extremecarver at gmail.com
> To: mkgmap-dev at lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] [patch v3] reverse oneways
>
> oh - could you please read through points 1.3 lower down.
>
> Even though the reversing now is clear, I don't understand what 
> happens to the tags!!!!
> On 30.04.2014 12:46, Gerd Petermann wrote:
>
>     Hi Felix,
>
>     no, since 1272 routable ways with tag oneway=-1 or oneway=reverse
>     were reversed after style processing.
>     Note that these old versions also may have used
>     one instance of the way, so maybe with your style
>     the reversing was done multiple times.
>
>     Anyway, as you said the behaviour with the patch
>     is much more predictable.
>     I'll check if I have to modify the code for
>     the restriction relations as well.
>
>     Gerd
>
>     ------------------------------------------------------------------------
>     Date: Wed, 30 Apr 2014 12:30:53 +0200
>     From: extremecarver at gmail.com <mailto:extremecarver at gmail.com>
>     To: mkgmap-dev at lists.mkgmap.org.uk
>     <mailto:mkgmap-dev at lists.mkgmap.org.uk>
>     Subject: Re: [mkgmap-dev] [patch v3] reverse oneways
>
>
>     On 30.04.2014 12:13, Gerd Petermann wrote:
>
>         Hi Felix,
>
>         > Well yes you can commit it as is. But please document
>         somewhere (best in
>         > the default style with an example how to cope with it). Is
>         it only
>         > oneway=-1 that's reversed by mkgmap? Or are there other tags?
>
>         yes, oneway=-1 and oneway=reverse. I don't know why the 2nd
>         alternative
>         is needed, tagInfo doesn't show that oneway=reverse is used.
>
>         > I agree the new handling is better and easier to write a
>         style for,
>         > however the old handling was more straight forward logical
>         because
>         > mkgmap simply never reversed something... :-)
>         I can't confirm that. Routable ways with oneway=-1 or
>         oneway=reverse
>         were reversed since r1272.
>
>     Yes - but before processing and the tags were kept intact. That's
>     why I need a left pointing arrows for oneway=-1...
>     However if I now with the patch add oneway=-1 the way is actually
>     turned around... - before there was no turning around once the
>     style-file was read in...
>
>
>
>         >
>         > Is there a need to harmonize oneway values in style?
>         (oneway=reverse,
>         > oneway=opposite, oneway=yes, oneway=1, oneway=forward,
>         oneway=backward,
>         > oneway=true are all values that I've seen from time to
>         time.). Are there
>         > other tags like bicycle=oneway that will change something?
>
>         mkgmap treats oneway=1 and oneway=true like oneway=yes,
>         oneway=-1 is treated like oneway=reverse. No other
>         values are recognized, so
>         oneway=forward and oneway=backward are ignored
>         and have to be handled in the style.
>
>         bicycle=oneway is not handled by mkgmap, but
>         bicycle:oneway and oneway:bicycle are treated by the
>         make-opposite-cycleways
>         option.
>
>         There are still some other tags without prefix mkgmap: that
>         are interpreted, e.g. barrier=*, highway=*
>         Maybe this should be changed in the future.
>
>     Is it possible that there has been some changes regarding barrier
>     in the last 6 months too? I think some of the handling changed as
>     well..
>
>
>     *1. **
>     **I hope that this now gets me the right result:**
>     **( copy=99 | copy=98 ) & highway=* & mtb:scale:uphill>2 &
>     mtb:scale!=*   {set mkgmap:unpaved=1}**
>     **( copy=99 | copy=98 )& highway=* & mtb:scale:uphill=5 &
>     mtb:scale=* & mtb:scale!=5    {add mkgmap:taxi=no; set
>     dontadd=oneway}    [0x10f0a resolution 21 continue with_actions]**
>     **( copy=99 | copy=98 )& highway=* & mtb:scale:uphill=4 &
>     mtb:scale=* & mtb:scale!=5    {add mkgmap:taxi=no; set
>     dontadd=oneway}    [0x10405 resolution 21 continue with_actions]**
>     **( copy=99 | copy=98 )& highway=* & mtb:scale:uphill=3 &
>     mtb:scale=* & mtb:scale!=5    {add mkgmap:taxi=no; set
>     dontadd=oneway}    [0x10409 resolution 21 continue with_actions]**
>     **( copy=199 | copy=198 ) & highway=* & mtb:scale:uphill=1 &
>     length()>150 {add mkgmap:taxi=no; set dontadd=oneway}    [0x10016
>     resolution 21 continue with_actions]**
>     **( copy=99 | copy=98 )& highway=* & mtb:scale:uphill=2 &
>     mtb:scale=* & mtb:scale!=5     & length()>30 {add mkgmap:taxi=no;
>     set dontadd=oneway}    [0x10016 resolution 21 continue with_actions]**
>     **( copy=99 | copy=98 )& highway=* & mtb:scale:uphill=1 &
>     mtb:scale=* & mtb:scale!=5     & length()>60 {add mkgmap:taxi=no;
>     set dontadd=oneway}    [0x10016 resolution 21 continue with_actions]**
>     **( copy=99 | copy=98 )& highway=* & mtb:scale:uphill=5 &
>     mtb:scale!=* & mtb:scale!=5    {add mkgmap:taxi=no; set
>     dontadd=oneway}    [0x10f0a resolution 22 continue with_actions]**
>     **( copy=99 | copy=98 )& highway=* & mtb:scale:uphill=4 &
>     mtb:scale!=* & mtb:scale!=5    {add mkgmap:taxi=no; set
>     dontadd=oneway}    [0x10405 resolution 22 continue with_actions]**
>     **( copy=99 | copy=98 )& highway=* & mtb:scale:uphill=3 &
>     mtb:scale!=* & mtb:scale!=5    {add mkgmap:taxi=no; set
>     dontadd=oneway}    [0x10409 resolution 22 continue with_actions]**
>     **( copy=99 | copy=98 )& highway=* & mtb:scale:uphill=2 &
>     mtb:scale!=* & mtb:scale!=5     & length()>30 {add mkgmap:taxi=no;
>     set dontadd=oneway}    [0x10016 resolution 23 continue with_actions]**
>     **--- copy=98 reversed the way actually - so I hope the arrows all
>     point in the same direction now.**
>     **However I'm still a bit perplexed what happens to oenway=-1
>     after it is passed in style. Is the following handling what mkgmap
>     does, consider highway=path & incline=up:**
>     ****
>     **highway=path & incline=up {set oneway=-1} # Mkgmap now reverses
>     the way, and **
>     **sets oneway tag to a) yes b) leaves oneway tag at -1????**
>     ****
>     **I hope it does a). Everything else would be really strange. I
>     hope I manage to adapt my styles to a). Because as with the copy
>     tag, I often set additional tags myself - and of course mkgmap
>     cannot change them...**
>     **So I hope you see the logic here is really complicated. I'm
>     actually still a bit lost on the outcome of what really
>     happens.... (especially because we have 1. {}  2. continue 3.
>     continue with_actions**
>     ****
>     **So**
>     ****
>     **2. **
>     **dontadd=oneway & highway=* & copy=99                            
>         {set oneway=-1; set mkgmap:toll=yes; add mkgmap:taxi=no; set
>     mkgmap:unpaved=1; set mkgmap:set_unconnected_type=none}       
>     [0x13 road_class=0 road_speed=0 resolution 24 continue]**
>     **dontadd=oneway & highway=* & copy=98                            
>         {set oneway=yes; set mkgmap:toll=yes; add mkgmap:taxi=no; set
>     mkgmap:unpaved=1; set mkgmap:set_unconnected_type=none}       
>     [0x13 road_class=0 road_speed=0 resolution 24 continue]**
>     **Here I need to reverse the ways - I DO hope that because of
>     continue and not continue with_actions - mkgmap is reversing the
>     ways but further down the actual before direction is kept and also
>     oneway=-1 is kept intact too, as continue should not have any
>     implications on lines further down the style... (0x13 is invisble
>     in my map, so here the focus is only on routing). This is actually
>     for copy=99 the first reversal, while it's a reverse of the
>     reverse for copy=98...**
>     ****
>     **3. **
>     **dontadd=oneway & highway=* & copy=99                            
>         {set oneway=-1; set mkgmap:toll=yes; add mkgmap:taxi=no; set
>     mkgmap:unpaved=1; set mkgmap:set_unconnected_type=none}       
>     [0x13 road_class=0 road_speed=0 resolution 24 continue
>     with_actions] **
>     **dontadd=oneway & highway=* & copy=98                            
>         {set oneway=yes; set mkgmap:toll=yes; add mkgmap:taxi=no; set
>     mkgmap:unpaved=1; set mkgmap:set_unconnected_type=none}       
>     [0x13 road_class=0 road_speed=0 resolution 24 continue with_actions]**
>     **This is actually not from my style. I do hope mkgmap here
>     reverses the way, and further down the style only oneway=yes is
>     present as tag, and the reversed direction is kept. *
>
>
>
>     I have about 500 more lines in my code that are direction
>     dependent. So I will experiment now and see if all works as
>     expected... The old behaviour was more straight forward - the
>     newer is ligher on the style and especially saves me lot of lines
>     in my .typfile. That's why I like it and prefer it over the old
>     way even though I don't understand it yet completly. From a
>     logical point this big change (not the patch that just corrects a
>     complete havoc mkgmap) is still a bit a mistery to me...
>
>
>         Gerd
>
>         > (e.g.
>         > highway=path; oneway:bicycle=-1
>         > highway=residential, oneway=yes; bicycle:oneway=no
>         > highway=residential; oneway=opposite # or any other of the
>         strange above
>         > values sometimes present in OSM
>         > )
>         >
>         >
>         > On 30.04.2014 11:51, GerdP wrote:
>         > > Hi Felix,
>         > >
>         > > ah, that sounds good :-)
>         > > Yes, the patch doesn't restore the old handling of oneways.
>         > >
>         > > If I got that right you have two alternatives:
>         > > Use two different types for left and right, or use the
>         same type and add tag
>         > > "oneway=-1" were needed, but should not do both.
>         > >
>         > > With the old version you needed both, and that's what I
>         wanted to fix
>         > > when I decided to apply the reversing also to overlay lines,
>         > > but only with this last patch it works as I want it.
>         > >
>         > > I hope you agree that I should commit the patch as is?
>         > >
>         > > Gerd
>         > >
>         > >
>         > > Felix Hartmann-2 wrote
>         > >> Hi Gerd, the patch doesn't work correctly (in so far that
>         mkgmap version
>         > >> October 2013 or older worked) - but I think consistent at
>         least now.
>         > >>
>         > >> If a way is tagged incline=down or incline=negative
>         number (copy=99
>         > >> further in the style)- it seems to work for the area I
>         checked.
>         > >> If however a way is tagged incline=up (copy=98 further
>         down in the
>         > >> style) - the way ends up in the opposite direction
>         (because I add
>         > >> oneway=-1???).
>         > >>
>         > >> Now - that could be style related, or not... I actually
>         don't really
>         > >> reverse the ways for layout. So far I just use opposing
>         arrows. If a way
>         > >> is copy=99 - the arrows point to the right (equals in the
>         direction of
>         > >> the way), if a way is copy=98 - then the arrows point to
>         the left and I
>         > >> add a onway=-1.
>         > >> If there would be a command to actually reverse ways (not
>         only set
>         > >> oneway) - then I would not need left/right pointing
>         arrows but just
>         > >> right pointing arrows.
>         > >>
>         > >> I made the important part bold. I assume mkgmap now
>         actually changes the
>         > >> direction of the way if I manually set oneway=-1....
>         > >>
>         > >> It's okay for me (will require 10-12 hours checking my
>         style, but
>         > >> actually save me lines in the typfile If I can be sure
>         that mkgmap now
>         > >> actually reverses all ways where I add oneway=-1).
>         > >> However - please tell me for which keys mkgmap now
>         reverses ways? Only
>         > >> oneway=-1? Or are there other keys where mkgmap reverses
>         the way. I do
>         > >> have more direction dependent types than downhill arrows...
>         > >>
>         > >>
>         > >>
>         > >> Heres all lines of my style that are related to this - In
>         2013 theese
>         > >> lines worked perfectly consistent (yes they are
>         complicated, but they
>         > >> should work correctly).:
>         > >>
>         > >> incline >5 & incline <11 & highway=* & mtb:scale:uphill=1 &
>         > >> mtb:scale>0 {set copy=198; set copy1=yes}
>         > >> incline <-5 & incline >-11 & highway=* & mtb:scale:uphill=1 &
>         > >> mtb:scale>0 {set copy=199; set copy1=yes}
>         > >> incline >10 & incline <30 & highway=* &
>         mtb:scale:uphill=1 {set
>         > >> copy=198; set copy1=yes}
>         > >> incline <-10 & incline >-30 & highway=* &
>         mtb:scale:uphill=1 {set
>         > >> copy=199; set copy1=yes}
>         > >> ### maybe make it for all scale:uphill if very light
>         color possible
>         > >> incline >30 & highway=* & mtb:scale:uphill=1 {set
>         copy=98; set copy1=yes}
>         > >> incline <-30 & highway=* & mtb:scale:uphill=1 {set
>         copy=99; set
>         > >> copy1=yes}
>         > >> incline >8 & highway=* & mtb:scale:uphill=2 {set copy=98;
>         set copy1=yes}
>         > >> incline <-8 & highway=* & mtb:scale:uphill=2 {set
>         copy=99; set copy1=yes}
>         > >> incline >30 & highway=* & mtb:scale:uphill=2 &
>         length()>300 {set
>         > >> oneway=-1; set copy=98; set copy1=yes}
>         > >> incline <-30 & highway=* & mtb:scale:uphill=2 &
>         length()>300 {set
>         > >> oneway=yes; set copy=99; set copy1=yes}
>         > >> incline >20 & highway=* & mtb:scale:uphill!=0 &
>         mtb:scale:uphill!=1 &
>         > >> mtb:scale:uphill!=2 {set oneway=-1; set copy=98; set
>         copy1=yes}
>         > >> incline <-20 & highway=* & mtb:scale:uphill!=0 &
>         mtb:scale:uphill!=1 &
>         > >> mtb:scale:uphill!=2 {set oneway=yes; set copy=99; set
>         copy1=yes}
>         > >>
>         > >>
>         > >> # Make steep pathes downhill only
>         > >> mtb:scale=0 & incline>20 & mtb:scale:uphill!=1 &
>         mtb:scale:uphill!=2
>         > >> {set oneway=-1; set copy=98; set copy1=yes}
>         > >> mtb:scale=1 & incline>15 & mtb:scale:uphill!=1 &
>         mtb:scale:uphill!=2
>         > >> {set oneway=-1; set copy=98; set copy1=yes}
>         > >> mtb:scale=1 & incline>20 & mtb:scale:uphill!=1 {set
>         oneway=-1; set
>         > >> copy=98; set copy1=yes}
>         > >> mtb:scale=2 & incline>10 & mtb:scale:uphill!=1 &
>         mtb:scale:uphill!=2
>         > >> {set oneway=-1; set copy=98; set copy1=yes}
>         > >> mtb:scale=2 & incline>15 & mtb:scale:uphill!=1 {set
>         oneway=-1; set
>         > >> copy=98; set copy1=yes}
>         > >> mtb:scale=3 & incline>10 & mtb:scale:uphill!=1 {set
>         oneway=-1; set
>         > >> copy=98; set copy1=yes}
>         > >> mtb:scale=4 & incline>10 & mtb:scale:uphill!=1 {set
>         oneway=-1; set
>         > >> copy=98; set copy1=yes}
>         > >> mtb:scale=5 & incline>10 & mtb:scale:uphill!=1 {set
>         oneway=-1; set
>         > >> copy=98; set copy1=yes}
>         > >>
>         > >> mtb:scale=0 & incline<-20 & mtb:scale:uphill!=1 &
>         mtb:scale:uphill!=2
>         > >> {set oneway=yes; set copy=99; set copy1=yes}
>         > >> mtb:scale=1 & incline<-15 & mtb:scale:uphill!=1 &
>         mtb:scale:uphill!=2
>         > >> {set oneway=yes; set copy=99; set copy1=yes}
>         > >> mtb:scale=1 & incline<-20 & mtb:scale:uphill!=1 {set
>         oneway=yes; set
>         > >> copy=99; set copy1=yes}
>         > >> mtb:scale=2 & incline<-10 & mtb:scale:uphill!=1 &
>         mtb:scale:uphill!=2
>         > >> {set oneway=yes; set copy=99; set copy1=yes}
>         > >> mtb:scale=2 & incline<-15 & mtb:scale:uphill!=1 {set
>         oneway=yes; set
>         > >> copy=99; set copy1=yes}
>         > >> mtb:scale=3 & incline<-10 & mtb:scale:uphill!=1 {set
>         oneway=yes; set
>         > >> copy=99; set copy1=yes}
>         > >> mtb:scale=4 & incline<-10 & mtb:scale:uphill!=1 {set
>         oneway=yes; set
>         > >> copy=99; set copy1=yes}
>         > >> mtb:scale=5 & incline<-10 & mtb:scale:uphill!=1 {set
>         oneway=yes; set
>         > >> copy=99; set copy1=yes}
>         > >>
>         > >>
>         > >>
>         > >> ( mtb:scale:uphill=1 ) & ( incline=negative |
>         incline=down | incline=- )
>         > >> & mtb:scale>0 {add mkgmap:taxi=no; set copy=99; set
>         copy1=yes}
>         > >> ( mtb:scale:uphill=1 ) & ( incline=positive | incline=up
>         | incline=+ )
>         > >> & mtb:scale>0 {add mkgmap:taxi=no; set copy=98; set
>         copy1=yes}
>         > >> ( mtb:scale:uphill=2 ) & ( incline=negative |
>         incline=down | incline=- |
>         > >> incline<0 ) {add mkgmap:taxi=no; set copy=99; set copy1=yes}
>         > >> ( mtb:scale:uphill=2 ) & ( incline=positive | incline=up
>         | incline=+ |
>         > >> incline>0 ) {add mkgmap:taxi=no; set copy=98; set copy1=yes}
>         > >> ( mtb:scale:uphill=3 | mtb:scale:uphill=4 |
>         mtb:scale:uphill=5 ) & (
>         > >> incline=negative | incline=down | incline=- | incline<0 )
>         {add
>         > >> mkgmap:taxi=no; set oneway=yes; set copy=99; set
>         copy1=yes; add
>         > >> mkgmap:unpaved=1}
>         > >> ( mtb:scale:uphill=3 | mtb:scale:uphill=4 |
>         mtb:scale:uphill=5 ) & (
>         > >> incline=positive | incline=up | incline=+ | incline>0 ) {add
>         > >> mkgmap:taxi=no; set oneway=-1; set copy=98; set
>         copy1=yes; add
>         > >> mkgmap:unpaved=1}
>         > >>
>         > >> *copy=99 & highway=* & mtb:scale:uphill=5 & mtb:scale=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x10f0a
>         > >> resolution 21 continue with_actions]**
>         > >> **copy=98 & highway=* & mtb:scale:uphill=5 & mtb:scale=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x10406
>         > >> resolution 21 continue with_actions]**
>         > >> **copy=99 & highway=* & mtb:scale:uphill=4 & mtb:scale=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x10405
>         > >> resolution 21 continue with_actions]**
>         > >> **copy=98 & highway=* & mtb:scale:uphill=4 & mtb:scale=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x10407
>         > >> resolution 21 continue with_actions]**
>         > >> **copy=99 & highway=* & mtb:scale:uphill=3 & mtb:scale=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x10409
>         > >> resolution 21 continue with_actions]**
>         > >> **copy=98 & highway=* & mtb:scale:uphill=3 & mtb:scale=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x1040a
>         > >> resolution 21 continue with_actions]**
>         > >> **copy=199 & highway=* & mtb:scale:uphill=1 &
>         length()>150 {add
>         > >> mkgmap:taxi=no; set dontadd=oneway} [0x10016 resolution
>         21 continue
>         > >> with_actions]**
>         > >> **copy=198 & highway=* & mtb:scale:uphill=1 &
>         length()>150 {add
>         > >> mkgmap:taxi=no; set dontadd=oneway} [0x10019 resolution
>         21 continue
>         > >> with_actions]**
>         > >> **copy=99 & highway=* & mtb:scale:uphill=2 & mtb:scale=* &
>         > >> mtb:scale!=5 & length()>30 {add mkgmap:taxi=no; set
>         > >> dontadd=oneway} [0x10016 resolution 21 continue
>         with_actions]**
>         > >> **copy=98 & highway=* & mtb:scale:uphill=2 & mtb:scale=* &
>         > >> mtb:scale!=5 & length()>30 {add mkgmap:taxi=no; set
>         > >> dontadd=oneway} [0x10019 resolution 21 continue
>         with_actions]**
>         > >> **copy=99 & highway=* & mtb:scale:uphill=1 & mtb:scale=* &
>         > >> mtb:scale!=5 & length()>60 {add mkgmap:taxi=no; set
>         > >> dontadd=oneway} [0x10016 resolution 21 continue
>         with_actions]**
>         > >> **copy=98 & highway=* & mtb:scale:uphill=1 & mtb:scale=* &
>         > >> mtb:scale!=5 & length()>60 {add mkgmap:taxi=no; set
>         > >> dontadd=oneway} [0x10019 resolution 21 continue
>         with_actions]**
>         > >> **copy=99 & highway=* & mtb:scale:uphill=5 & mtb:scale!=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x10f0a
>         > >> resolution 22 continue with_actions]**
>         > >> **copy=98 & highway=* & mtb:scale:uphill=5 & mtb:scale!=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x10406
>         > >> resolution 22 continue with_actions]**
>         > >> **copy=99 & highway=* & mtb:scale:uphill=4 & mtb:scale!=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x10405
>         > >> resolution 22 continue with_actions]**
>         > >> **copy=98 & highway=* & mtb:scale:uphill=4 & mtb:scale!=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x10407
>         > >> resolution 22 continue with_actions]**
>         > >> **copy=99 & highway=* & mtb:scale:uphill=3 & mtb:scale!=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x10409
>         > >> resolution 22 continue with_actions]**
>         > >> **copy=98 & highway=* & mtb:scale:uphill=3 & mtb:scale!=* &
>         > >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway}
>         [0x1040a
>         > >> resolution 22 continue with_actions]**
>         > >> **copy=99 & highway=* & mtb:scale:uphill=2 & mtb:scale!=* &
>         > >> mtb:scale!=5 & length()>30 {add mkgmap:taxi=no; set
>         > >> dontadd=oneway} [0x10016 resolution 23 continue
>         with_actions]**
>         > >> **copy=98 & highway=* & mtb:scale:uphill=2 & mtb:scale!=* &
>         > >> mtb:scale!=5 & length()>30 {add mkgmap:taxi=no; set
>         > >> dontadd=oneway} [0x10019 resolution 23 continue
>         with_actions]**
>         > >> **dontadd=oneway & highway=* & copy=99 {set
>         > >> oneway=-1; set mkgmap:toll=yes; add mkgmap:taxi=no; set
>         > >> mkgmap:unpaved=1; set mkgmap:set_unconnected_type=none} [0x13
>         > >> road_class=0 road_speed=0 resolution 24 continue]**
>         > >> **dontadd=oneway & highway=* & copy=98 {set
>         > >> oneway=yes; set mkgmap:toll=yes; add mkgmap:taxi=no; set
>         > >> mkgmap:unpaved=1; set mkgmap:set_unconnected_type=none} [0x13
>         > >> road_class=0 road_speed=0 resolution 24 continue]*
>         > >>
>         > >> # make reverse steep climb pathes/tracks
>         > >> ( copy=99 | copy=98 ) & ( mtb:scale:uphill=2 |
>         mtb:scale:uphill=1 |
>         > >> mtb:scale:uphill=0 ) & dontadd!=oneway & highway=* {set
>         oneway=no; set
>         > >> mkgmap:set_unconnected_type=none} [0x13 road_class=0
>         road_speed=1
>         > >> resolution 24 continue]
>         > >> ( copy=99 | copy=98 ) & mtb:scale:uphill!=2 &
>         mtb:scale:uphill!=1 &
>         > >> mtb:scale:uphill!=0 & dontadd!=oneway & highway=* {set
>         oneway=no; set
>         > >> mkgmap:set_unconnected_type=none} [0x13 road_class=0
>         road_speed=0
>         > >> resolution 24 continue]
>         > >>
>         > >>
>         > >>
>         > >>
>         > >> Note for Gerd:
>         > >> Lines further down, then respect the oneway=yes or
>         oneway=-1...
>         > >>
>         > >>
>         > >>
>         > >> On 28.04.2014 08:03, Gerd Petermann wrote:
>         > >>> Hi Felix,
>         > >>>
>         > >>> attached is a patch that may help to solve your problems
>         with reversed
>         > >>> oneways.
>         > >>>
>         > >>> It may not work without --ignore-turn-restrictions. I'd
>         first like to
>         > >>> make sure
>         > >>> that I understand what you are doing.
>         > >>>
>         > >>> I've added a few lines to the default style to produce
>         additional
>         > >>> lines for
>         > >>> ways with highway=* & incline=up
>         > >>> If I got you right, you create one oneway for the uphill
>         direction and
>         > >>> another
>         > >>> one with reverse direction for downhill, and also
>         overlaying lines with
>         > >>> types that are direction dependent. The result is in
>         switch_oneway.zip.
>         > >>>
>         > >>> The attached reverse-oneway-v3.patch changes mkgmap to
>         keep the order of
>         > >>> points in each way. That means, points are reversed
>         after style
>         > >>> processing if
>         > >>> tag oneway=-1 is found, and this order is then
>         maintained in the rest
>         > >>> of the program.
>         > >>>
>         > >>> Gerd
>         > >>> P.S. I think we can drop the idea of reversing ways with
>         "oneway=-1"
>         > >>> before style processing.
>         > >>> This will not help in your case, as you add the tag in
>         the style.
>         > >>>
>         > >>>
>         > >>>
>         > >>> _______________________________________________
>         > >>> mkgmap-dev mailing list
>         > >>>
>         > >> mkgmap-dev at .org <mailto:mkgmap-dev at .org>
>         > >>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>         > >> --
>         > >> keep on biking and discovering new trails
>         > >>
>         > >> Felix
>         > >> openmtbmap.org & www.velomap.org <http://www.velomap.org>
>         > >>
>         > >>
>         > >> _______________________________________________
>         > >> mkgmap-dev mailing list
>         > >> mkgmap-dev at .org <mailto:mkgmap-dev at .org>
>         > >> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>         > >
>         > >
>         > >
>         > >
>         > > --
>         > > View this message in context:
>         http://gis.19327.n5.nabble.com/patch-v3-reverse-oneways-tp5804371p5804673.html
>         > > Sent from the Mkgmap Development mailing list archive at
>         Nabble.com.
>         > > _______________________________________________
>         > > mkgmap-dev mailing list
>         > > mkgmap-dev at lists.mkgmap.org.uk
>         <mailto:mkgmap-dev at lists.mkgmap.org.uk>
>         > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>         >
>         > --
>         > keep on biking and discovering new trails
>         >
>         > Felix
>         > openmtbmap.org & www.velomap.org <http://www.velomap.org>
>         >
>         > _______________________________________________
>         > mkgmap-dev mailing list
>         > mkgmap-dev at lists.mkgmap.org.uk
>         <mailto:mkgmap-dev at lists.mkgmap.org.uk>
>         > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
>         _______________________________________________
>         mkgmap-dev mailing list
>         mkgmap-dev at lists.mkgmap.org.uk  <mailto:mkgmap-dev at lists.mkgmap.org.uk>
>         http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
>     -- 
>     keep on biking and discovering new trails
>
>     Felix
>     openmtbmap.org &www.velomap.org  <http://www.velomap.org>
>
>
>     _______________________________________________ mkgmap-dev mailing
>     list mkgmap-dev at lists.mkgmap.org.uk
>     <mailto:mkgmap-dev at lists.mkgmap.org.uk>
>     http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
>     _______________________________________________
>     mkgmap-dev mailing list
>     mkgmap-dev at lists.mkgmap.org.uk  <mailto:mkgmap-dev at lists.mkgmap.org.uk>
>     http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
> -- 
> keep on biking and discovering new trails
>
> Felix
> openmtbmap.org &www.velomap.org  <http://www.velomap.org>
>
> _______________________________________________ mkgmap-dev mailing 
> list mkgmap-dev at lists.mkgmap.org.uk 
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

-- 
keep on biking and discovering new trails

Felix
openmtbmap.org & www.velomap.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20140430/a62f4b25/attachment-0001.html>


More information about the mkgmap-dev mailing list