<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Felix,<br><br><div>> Well yes you can commit it as is. But please document somewhere (best in <br>> the default style with an example how to cope with it). Is it only <br>> oneway=-1 that's reversed by mkgmap? Or are there other tags?<br><br>yes, oneway=-1 and oneway=reverse. I don't know why the 2nd alternative<br>is needed, tagInfo doesn't show that oneway=reverse is used.<br><br>> I agree the new handling is better and easier to write a style for, <br>> however the old handling was more straight forward logical because <br>> mkgmap simply never reversed something... :-)<br>I can't confirm that. Routable ways with oneway=-1 or oneway=reverse<br>were reversed since r1272.<br><br>> <br>> Is there a need to harmonize oneway values in style? (oneway=reverse, <br>> oneway=opposite, oneway=yes, oneway=1, oneway=forward, oneway=backward, <br>> oneway=true are all values that I've seen from time to time.). Are there <br>> other tags like bicycle=oneway that will change something?<br><br>mkgmap treats oneway=1 and oneway=true like oneway=yes,<br>oneway=-1 is treated like oneway=reverse. No other<br>values are recognized, so <br>oneway=forward and oneway=backward are ignored<br>and have to be handled in the style.<br><br>bicycle=oneway is not handled by mkgmap, but<br>bicycle:oneway and oneway:bicycle are treated by the make-opposite-cycleways <br>option.<br><br>There are still some other tags without prefix mkgmap: that<br>are interpreted, e.g. barrier=*, highway=*<br>Maybe this should be changed in the future.<br><br>Gerd<br><br>> (e.g.<br>> highway=path; oneway:bicycle=-1<br>> highway=residential, oneway=yes; bicycle:oneway=no<br>> highway=residential; oneway=opposite # or any other of the strange above <br>> values sometimes present in OSM<br>> )<br>> <br>> <br>> On 30.04.2014 11:51, GerdP wrote:<br>> > Hi Felix,<br>> ><br>> > ah, that sounds good :-)<br>> > Yes, the patch doesn't restore the old handling of oneways.<br>> ><br>> > If I got that right you have two alternatives:<br>> > Use two different types for left and right, or use the same type and add tag<br>> > "oneway=-1" were needed, but should not do both.<br>> ><br>> > With the old version you needed both, and that's what I wanted to fix<br>> > when I decided to apply the reversing also to overlay lines,<br>> > but only with this last patch it works as I want it.<br>> ><br>> > I hope you agree that I should commit the patch as is?<br>> ><br>> > Gerd<br>> ><br>> ><br>> > Felix Hartmann-2 wrote<br>> >> Hi Gerd, the patch doesn't work correctly (in so far that mkgmap version<br>> >> October 2013 or older worked) - but I think consistent at least now.<br>> >><br>> >> If a way is tagged incline=down or incline=negative number (copy=99<br>> >> further in the style)- it seems to work for the area I checked.<br>> >> If however a way is tagged incline=up (copy=98 further down in the<br>> >> style) - the way ends up in the opposite direction (because I add<br>> >> oneway=-1???).<br>> >><br>> >> Now - that could be style related, or not... I actually don't really<br>> >> reverse the ways for layout. So far I just use opposing arrows. If a way<br>> >> is copy=99 - the arrows point to the right (equals in the direction of<br>> >> the way), if a way is copy=98 - then the arrows point to the left and I<br>> >> add a onway=-1.<br>> >> If there would be a command to actually reverse ways (not only set<br>> >> oneway) - then I would not need left/right pointing arrows but just<br>> >> right pointing arrows.<br>> >><br>> >> I made the important part bold. I assume mkgmap now actually changes the<br>> >> direction of the way if I manually set oneway=-1....<br>> >><br>> >> It's okay for me (will require 10-12 hours checking my style, but<br>> >> actually save me lines in the typfile If I can be sure that mkgmap now<br>> >> actually reverses all ways where I add oneway=-1).<br>> >> However - please tell me for which keys mkgmap now reverses ways? Only<br>> >> oneway=-1? Or are there other keys where mkgmap reverses the way. I do<br>> >> have more direction dependent types than downhill arrows...<br>> >><br>> >><br>> >><br>> >> Heres all lines of my style that are related to this - In 2013 theese<br>> >> lines worked perfectly consistent (yes they are complicated, but they<br>> >> should work correctly).:<br>> >><br>> >> incline >5 & incline <11 & highway=* & mtb:scale:uphill=1 &<br>> >> mtb:scale>0 {set copy=198; set copy1=yes}<br>> >> incline <-5 & incline >-11 & highway=* & mtb:scale:uphill=1 &<br>> >> mtb:scale>0 {set copy=199; set copy1=yes}<br>> >> incline >10 & incline <30 & highway=* & mtb:scale:uphill=1 {set<br>> >> copy=198; set copy1=yes}<br>> >> incline <-10 & incline >-30 & highway=* & mtb:scale:uphill=1 {set<br>> >> copy=199; set copy1=yes}<br>> >> ### maybe make it for all scale:uphill if very light color possible<br>> >> incline >30 & highway=* & mtb:scale:uphill=1 {set copy=98; set copy1=yes}<br>> >> incline <-30 & highway=* & mtb:scale:uphill=1 {set copy=99; set<br>> >> copy1=yes}<br>> >> incline >8 & highway=* & mtb:scale:uphill=2 {set copy=98; set copy1=yes}<br>> >> incline <-8 & highway=* & mtb:scale:uphill=2 {set copy=99; set copy1=yes}<br>> >> incline >30 & highway=* & mtb:scale:uphill=2 & length()>300 {set<br>> >> oneway=-1; set copy=98; set copy1=yes}<br>> >> incline <-30 & highway=* & mtb:scale:uphill=2 & length()>300 {set<br>> >> oneway=yes; set copy=99; set copy1=yes}<br>> >> incline >20 & highway=* & mtb:scale:uphill!=0 & mtb:scale:uphill!=1 &<br>> >> mtb:scale:uphill!=2 {set oneway=-1; set copy=98; set copy1=yes}<br>> >> incline <-20 & highway=* & mtb:scale:uphill!=0 & mtb:scale:uphill!=1 &<br>> >> mtb:scale:uphill!=2 {set oneway=yes; set copy=99; set copy1=yes}<br>> >><br>> >><br>> >> # Make steep pathes downhill only<br>> >> mtb:scale=0 & incline>20 & mtb:scale:uphill!=1 & mtb:scale:uphill!=2<br>> >> {set oneway=-1; set copy=98; set copy1=yes}<br>> >> mtb:scale=1 & incline>15 & mtb:scale:uphill!=1 & mtb:scale:uphill!=2<br>> >> {set oneway=-1; set copy=98; set copy1=yes}<br>> >> mtb:scale=1 & incline>20 & mtb:scale:uphill!=1 {set oneway=-1; set<br>> >> copy=98; set copy1=yes}<br>> >> mtb:scale=2 & incline>10 & mtb:scale:uphill!=1 & mtb:scale:uphill!=2<br>> >> {set oneway=-1; set copy=98; set copy1=yes}<br>> >> mtb:scale=2 & incline>15 & mtb:scale:uphill!=1 {set oneway=-1; set<br>> >> copy=98; set copy1=yes}<br>> >> mtb:scale=3 & incline>10 & mtb:scale:uphill!=1 {set oneway=-1; set<br>> >> copy=98; set copy1=yes}<br>> >> mtb:scale=4 & incline>10 & mtb:scale:uphill!=1 {set oneway=-1; set<br>> >> copy=98; set copy1=yes}<br>> >> mtb:scale=5 & incline>10 & mtb:scale:uphill!=1 {set oneway=-1; set<br>> >> copy=98; set copy1=yes}<br>> >><br>> >> mtb:scale=0 & incline<-20 & mtb:scale:uphill!=1 & mtb:scale:uphill!=2<br>> >> {set oneway=yes; set copy=99; set copy1=yes}<br>> >> mtb:scale=1 & incline<-15 & mtb:scale:uphill!=1 & mtb:scale:uphill!=2<br>> >> {set oneway=yes; set copy=99; set copy1=yes}<br>> >> mtb:scale=1 & incline<-20 & mtb:scale:uphill!=1 {set oneway=yes; set<br>> >> copy=99; set copy1=yes}<br>> >> mtb:scale=2 & incline<-10 & mtb:scale:uphill!=1 & mtb:scale:uphill!=2<br>> >> {set oneway=yes; set copy=99; set copy1=yes}<br>> >> mtb:scale=2 & incline<-15 & mtb:scale:uphill!=1 {set oneway=yes; set<br>> >> copy=99; set copy1=yes}<br>> >> mtb:scale=3 & incline<-10 & mtb:scale:uphill!=1 {set oneway=yes; set<br>> >> copy=99; set copy1=yes}<br>> >> mtb:scale=4 & incline<-10 & mtb:scale:uphill!=1 {set oneway=yes; set<br>> >> copy=99; set copy1=yes}<br>> >> mtb:scale=5 & incline<-10 & mtb:scale:uphill!=1 {set oneway=yes; set<br>> >> copy=99; set copy1=yes}<br>> >><br>> >><br>> >><br>> >> ( mtb:scale:uphill=1 ) & ( incline=negative | incline=down | incline=- )<br>> >> & mtb:scale>0 {add mkgmap:taxi=no; set copy=99; set copy1=yes}<br>> >> ( mtb:scale:uphill=1 ) & ( incline=positive | incline=up | incline=+ )<br>> >> & mtb:scale>0 {add mkgmap:taxi=no; set copy=98; set copy1=yes}<br>> >> ( mtb:scale:uphill=2 ) & ( incline=negative | incline=down | incline=- |<br>> >> incline<0 ) {add mkgmap:taxi=no; set copy=99; set copy1=yes}<br>> >> ( mtb:scale:uphill=2 ) & ( incline=positive | incline=up | incline=+ |<br>> >> incline>0 ) {add mkgmap:taxi=no; set copy=98; set copy1=yes}<br>> >> ( mtb:scale:uphill=3 | mtb:scale:uphill=4 | mtb:scale:uphill=5 ) & (<br>> >> incline=negative | incline=down | incline=- | incline<0 ) {add<br>> >> mkgmap:taxi=no; set oneway=yes; set copy=99; set copy1=yes; add<br>> >> mkgmap:unpaved=1}<br>> >> ( mtb:scale:uphill=3 | mtb:scale:uphill=4 | mtb:scale:uphill=5 ) & (<br>> >> incline=positive | incline=up | incline=+ | incline>0 ) {add<br>> >> mkgmap:taxi=no; set oneway=-1; set copy=98; set copy1=yes; add<br>> >> mkgmap:unpaved=1}<br>> >><br>> >> *copy=99 & highway=* & mtb:scale:uphill=5 & mtb:scale=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x10f0a<br>> >> resolution 21 continue with_actions]**<br>> >> **copy=98 & highway=* & mtb:scale:uphill=5 & mtb:scale=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x10406<br>> >> resolution 21 continue with_actions]**<br>> >> **copy=99 & highway=* & mtb:scale:uphill=4 & mtb:scale=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x10405<br>> >> resolution 21 continue with_actions]**<br>> >> **copy=98 & highway=* & mtb:scale:uphill=4 & mtb:scale=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x10407<br>> >> resolution 21 continue with_actions]**<br>> >> **copy=99 & highway=* & mtb:scale:uphill=3 & mtb:scale=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x10409<br>> >> resolution 21 continue with_actions]**<br>> >> **copy=98 & highway=* & mtb:scale:uphill=3 & mtb:scale=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x1040a<br>> >> resolution 21 continue with_actions]**<br>> >> **copy=199 & highway=* & mtb:scale:uphill=1 & length()>150 {add<br>> >> mkgmap:taxi=no; set dontadd=oneway} [0x10016 resolution 21 continue<br>> >> with_actions]**<br>> >> **copy=198 & highway=* & mtb:scale:uphill=1 & length()>150 {add<br>> >> mkgmap:taxi=no; set dontadd=oneway} [0x10019 resolution 21 continue<br>> >> with_actions]**<br>> >> **copy=99 & highway=* & mtb:scale:uphill=2 & mtb:scale=* &<br>> >> mtb:scale!=5 & length()>30 {add mkgmap:taxi=no; set<br>> >> dontadd=oneway} [0x10016 resolution 21 continue with_actions]**<br>> >> **copy=98 & highway=* & mtb:scale:uphill=2 & mtb:scale=* &<br>> >> mtb:scale!=5 & length()>30 {add mkgmap:taxi=no; set<br>> >> dontadd=oneway} [0x10019 resolution 21 continue with_actions]**<br>> >> **copy=99 & highway=* & mtb:scale:uphill=1 & mtb:scale=* &<br>> >> mtb:scale!=5 & length()>60 {add mkgmap:taxi=no; set<br>> >> dontadd=oneway} [0x10016 resolution 21 continue with_actions]**<br>> >> **copy=98 & highway=* & mtb:scale:uphill=1 & mtb:scale=* &<br>> >> mtb:scale!=5 & length()>60 {add mkgmap:taxi=no; set<br>> >> dontadd=oneway} [0x10019 resolution 21 continue with_actions]**<br>> >> **copy=99 & highway=* & mtb:scale:uphill=5 & mtb:scale!=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x10f0a<br>> >> resolution 22 continue with_actions]**<br>> >> **copy=98 & highway=* & mtb:scale:uphill=5 & mtb:scale!=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x10406<br>> >> resolution 22 continue with_actions]**<br>> >> **copy=99 & highway=* & mtb:scale:uphill=4 & mtb:scale!=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x10405<br>> >> resolution 22 continue with_actions]**<br>> >> **copy=98 & highway=* & mtb:scale:uphill=4 & mtb:scale!=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x10407<br>> >> resolution 22 continue with_actions]**<br>> >> **copy=99 & highway=* & mtb:scale:uphill=3 & mtb:scale!=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x10409<br>> >> resolution 22 continue with_actions]**<br>> >> **copy=98 & highway=* & mtb:scale:uphill=3 & mtb:scale!=* &<br>> >> mtb:scale!=5 {add mkgmap:taxi=no; set dontadd=oneway} [0x1040a<br>> >> resolution 22 continue with_actions]**<br>> >> **copy=99 & highway=* & mtb:scale:uphill=2 & mtb:scale!=* &<br>> >> mtb:scale!=5 & length()>30 {add mkgmap:taxi=no; set<br>> >> dontadd=oneway} [0x10016 resolution 23 continue with_actions]**<br>> >> **copy=98 & highway=* & mtb:scale:uphill=2 & mtb:scale!=* &<br>> >> mtb:scale!=5 & length()>30 {add mkgmap:taxi=no; set<br>> >> dontadd=oneway} [0x10019 resolution 23 continue with_actions]**<br>> >> **dontadd=oneway & highway=* & copy=99 {set<br>> >> oneway=-1; set mkgmap:toll=yes; add mkgmap:taxi=no; set<br>> >> mkgmap:unpaved=1; set mkgmap:set_unconnected_type=none} [0x13<br>> >> road_class=0 road_speed=0 resolution 24 continue]**<br>> >> **dontadd=oneway & highway=* & copy=98 {set<br>> >> oneway=yes; set mkgmap:toll=yes; add mkgmap:taxi=no; set<br>> >> mkgmap:unpaved=1; set mkgmap:set_unconnected_type=none} [0x13<br>> >> road_class=0 road_speed=0 resolution 24 continue]*<br>> >><br>> >> # make reverse steep climb pathes/tracks<br>> >> ( copy=99 | copy=98 ) & ( mtb:scale:uphill=2 | mtb:scale:uphill=1 |<br>> >> mtb:scale:uphill=0 ) & dontadd!=oneway & highway=* {set oneway=no; set<br>> >> mkgmap:set_unconnected_type=none} [0x13 road_class=0 road_speed=1<br>> >> resolution 24 continue]<br>> >> ( copy=99 | copy=98 ) & mtb:scale:uphill!=2 & mtb:scale:uphill!=1 &<br>> >> mtb:scale:uphill!=0 & dontadd!=oneway & highway=* {set oneway=no; set<br>> >> mkgmap:set_unconnected_type=none} [0x13 road_class=0 road_speed=0<br>> >> resolution 24 continue]<br>> >><br>> >><br>> >><br>> >><br>> >> Note for Gerd:<br>> >> Lines further down, then respect the oneway=yes or oneway=-1...<br>> >><br>> >><br>> >><br>> >> On 28.04.2014 08:03, Gerd Petermann wrote:<br>> >>> Hi Felix,<br>> >>><br>> >>> attached is a patch that may help to solve your problems with reversed<br>> >>> oneways.<br>> >>><br>> >>> It may not work without --ignore-turn-restrictions. I'd first like to<br>> >>> make sure<br>> >>> that I understand what you are doing.<br>> >>><br>> >>> I've added a few lines to the default style to produce additional<br>> >>> lines for<br>> >>> ways with highway=* & incline=up<br>> >>> If I got you right, you create one oneway for the uphill direction and<br>> >>> another<br>> >>> one with reverse direction for downhill, and also overlaying lines with<br>> >>> types that are direction dependent. The result is in switch_oneway.zip.<br>> >>><br>> >>> The attached reverse-oneway-v3.patch changes mkgmap to keep the order of<br>> >>> points in each way. That means, points are reversed after style<br>> >>> processing if<br>> >>> tag oneway=-1 is found, and this order is then maintained in the rest<br>> >>> of the program.<br>> >>><br>> >>> Gerd<br>> >>> P.S. I think we can drop the idea of reversing ways with "oneway=-1"<br>> >>> before style processing.<br>> >>> This will not help in your case, as you add the tag in the style.<br>> >>><br>> >>><br>> >>><br>> >>> _______________________________________________<br>> >>> mkgmap-dev mailing list<br>> >>><br>> >> mkgmap-dev@.org<br>> >>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> >> -- <br>> >> keep on biking and discovering new trails<br>> >><br>> >> Felix<br>> >> openmtbmap.org & www.velomap.org<br>> >><br>> >><br>> >> _______________________________________________<br>> >> mkgmap-dev mailing list<br>> >> mkgmap-dev@.org<br>> >> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> ><br>> ><br>> ><br>> ><br>> > --<br>> > View this message in context: http://gis.19327.n5.nabble.com/patch-v3-reverse-oneways-tp5804371p5804673.html<br>> > Sent from the Mkgmap Development mailing list archive at Nabble.com.<br>> > _______________________________________________<br>> > mkgmap-dev mailing list<br>> > mkgmap-dev@lists.mkgmap.org.uk<br>> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> <br>> -- <br>> keep on biking and discovering new trails<br>> <br>> Felix<br>> openmtbmap.org & www.velomap.org<br>> <br>> _______________________________________________<br>> mkgmap-dev mailing list<br>> mkgmap-dev@lists.mkgmap.org.uk<br>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br></div>                                            </div></body>
</html>