navit-gps / navit

The open source (GPL v2) turn-by-turn navigation software for many OS
http://www.navit-project.org
Other
559 stars 174 forks source link

Can’t pass through country #962

Closed navitraspi closed 4 years ago

navitraspi commented 4 years ago

Hey!

I have an issue. I am in Latvia and I’m trying to enter the destination based in Poland - after doing this nothing happens. There is no navigation. Where is the problem? I can easily set the destination in country where I currently am, but it can’t pass through the border I think.

Thanks for any help!

mvglasow commented 4 years ago

Borders are not the issue; Navit has happily routed me from Munich to Tallinn many times.

AFAIK Navit still has issues if it needs to route across roads of a lower order than trunk—out of the box, these are only supported in the immediate vicinity of your position or the destination. For your route, you would have a stretch of primary road between Kalvarija/Budzisko and Białystok.

The fix is to modify the vehicleprofile you are using with a special route_depth attribute. Here’s what I use:

<vehicleprofile name="car" route_depth="4:25%,6:1%,8:40000,18:10000" flags="0x4000000" flags_forward_mask="0x4000002" flags_reverse_mask="0x4000001" maxspeed_handling="0" route_mode="0" static_speed="5" static_distance="25">

The other attributes are safe to leave alone for now—route_depth governs what roads are considered for which portions of the route, and this value tells Navit to consider primary roads for long-distance routing. This does use more memory, which is presumably why it was left out. (Also, there seems to be some holy war as to whether national roads which are not expressways should be primary or trunk.)

If this doesn’t work for you (because of memory constraints or because you’re on the road and can’t modify navit.xml right now), you can set the border crossing as your destination, and once you’ve reached that point, try to route to your actual destination (or use waypoints). For the border crossing, Kalvarija/Budzisko should work best as it’s connected to a trunk road on the Lithuanian side; the last stretch to Lazdijai/Sejny on the Lithuanian side is primary (although it might be faster).

If you decide to fix route_depth, check the route description before you follow it. Navit does not know anything about visa restrictions or border waiting times, and decides the shortest route between Vilnius and Białystok is through Belorussia.

navitraspi commented 4 years ago

Thanks so much for the reply! I will try your solution. Otherwise, I tried to reach Suwałki from Druskinnikai and there were no reaction. Other time, my track was from Białystok to Warsaw and it worked perfectly and almost instantly gave me the navigation. Białystok-Warsaw is way longer than Druskinnikai-Suwałki, so I really don’t understand it...

mvglasow commented 4 years ago

Druskininkai–Suwałki includes nothing higher than primary and is about 100 km, which may already be too long for primary roads to be included. Białystok–Warsaw is all trunk since the S8 got completed last year. With the modified route_depth you should be fine.

navitraspi commented 4 years ago

Oh, thank you so much, brother. I will let you know if it works.

By the way, you are very informed about roads and cities here around me! ☺️

navitraspi commented 4 years ago

Works perfectly now! Thank you, thank you, thank you! Much love from Białystok :)