Hi Thorsten

Ah, the different road_class your style is generating would explain why my
change didn't work for you.

I started looking at the order in which to consider:
 road_class, sameWay, straightEnough, sameName, road_speed
and, in a typical area looking for conflict between these, came to the
conclusion that road_class should be first, which is unfortunate for your first
case.

I'll implement it a bit more and look at examples and see if they really matter.

Introducing "sameWay" might fix your second example.

Regards
Ticker

On Mon, 2024-08-12 at 10:23 +0200, Thorsten Kukuk wrote:
> 
> Hi Ticker,
> 
> The way straight forward is
> https://www.openstreetmap.org/way/36138336
> 
> It's one long way in OSM, which means all tags before and after the 
> junction are the same:
> road_class=1 and road_speed=2
> 
> The way starting at the junction to the left is 
> https://www.openstreetmap.org/way/144732811 and has
> road_class=2 and road_speed=2 in my style.
> 
> Regards,
> Thorsten
> 
> Am 2024-08-10 18:38, schrieb Ticker Berkin:
> > Hi Thorsten
> > 
> > Let me know if the road_speed and/or road_class are different with the 
> > style you
> > are using. If they are all the same I don't understand why it should 
> > give a turn
> > instruction.
> > 
> > If it is just the road_speed, I'll do another patch that prioritises 
> > road_class,
> > then "likely same road", then road_speed.
> > 
> > Ticker
> > 
> > On Sat, 2024-08-10 at 16:27 +0100, Ticker Berkin wrote:
> > > Hi Thorsten
> > > 
> > > The algorithm, in choosing which arc headings to adjust to remove 
> > > sharp turns,
> > > prefers to adjust lower class roads. If class is the same it adjusts 
> > > lower
> > > speed
> > > road. If these are the same, with my change it, it sees if one is 
> > > reasonably
> > > straight and adjusts the other. As a last resort it adjusts both.
> > > 
> > > This, I consider, is reasonable and gives good results almost all the 
> > > time.
> > > 
> > > With the default style both ways have speed=1 class=0 and so it 
> > > adjusts way
> > > 144732811. However if your style gives them different classes/speeds
> > > (144732811
> > > is paved, the other is unpaved) it will bend way 36138336 such that 
> > > this might
> > > trigger a right-turn instruction if going from south to north.
> > > 
> > > I'm not sure what the best solution is for your example.
> > > 
> > > Regards
> > > Ticker
> > > 
> > > On Sat, 2024-08-10 at 10:01 +0200, Thorsten Kukuk wrote:
> > > > Am 2024-08-10 09:39, schrieb Thorsten Kukuk:
> > > > 
> > > > > To get that right: Your patch fixes one half of my first example: if
> > > > > you let Garmin calculate the route, it will now use the junction and
> > > > > will not use u-turns and detours to avoid it. So your patch is an
> > > > > improvement.
> > > > > What it does not fix is the wrong navigation instruction: it tells you
> > > > > to turn right if you need to go straight forward, and if you need to
> > > > > turn left it doesn't tell you anything. And this shouldn't have
> > > > > anything to do with road speed or surface.
> > > > 
> > > > Maybe pictures explain it better:
> > > > 
> > > > 1. routing-no-patch.png is vanilla mkgmap r4921, Garmin makes two
> > > > forbidden u-turns and a detour and avoids the junction.
> > > > 2. routing-with-patch.png is mkgrmap r4921 with your patch, Garmin uses
> > > > the junction.
> > > > 3. navigation-instruction-turn-right.png: at the junction with a route
> > > > straight forward Garmin Software and Devices tell you to turn right in
> > > > navigation mode.
> > > > 
> > > > I hope this explains it better.
> > > > 
> > > > Regards,
> > > > Thorsten
> > > > 
> > > > _______________________________________________
> > > > mkgmap-dev mailing list
> > > > mkgmap-dev@lists.mkgmap.org.uk
> > > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> > > 
> > > _______________________________________________
> > > mkgmap-dev mailing list
> > > mkgmap-dev@lists.mkgmap.org.uk
> > > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> > 
> > _______________________________________________
> > mkgmap-dev mailing list
> > mkgmap-dev@lists.mkgmap.org.uk
> > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev@lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to