logo separator

[mkgmap-dev] Problem in AngleFixer?

From Thorsten Kukuk kukuk at thkukuk.de on Mon Aug 12 09:23:56 BST 2024

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 at lists.mkgmap.org.uk
>> > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>> 
>> _______________________________________________
>> mkgmap-dev mailing list
>> mkgmap-dev at lists.mkgmap.org.uk
>> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list