Slow Routing in OSMAnd

157 views
Skip to first unread message

RizkyAM

unread,
Jul 3, 2021, 10:22:36 PM7/3/21
to OsmAnd
My OSMAnd in-built routing is very slow compared to the Brouter plugin, even if it's just several kilometres (in city area), but it's normal when I try it outside the city (countryside).

Harry van der Wolf

unread,
Jul 4, 2021, 4:45:36 AM7/4/21
to osmand
That is due to the heuristic coefficient of 1.0 that OsmAnd uses. That is way over the top. Search for heuristic coefficients in this group and you will find many posts about it (a lot from me criticizing this ;) and offering modified route xmls).

I use 2 routing xmls.
One with a hc=1.2 for big city travel for s little more accuracy.
One with a hc=1.5 for long(er) distance travels.

I have a spreadsheet with lots of comparisons (every route calculation 3x without cache and then averaged for the final time)
See for example two (longer) distance calculations. The calculation differences remain the same on shorter distances, but if it calculatates a route in 3 seconds inside a city or 10 seconds is for me not that important.
heuristic coefficientdistance
(calculated)
calc. travel time
(hours minutes)
calculation time
minutes/seconds)
Remarks
Zwolle, Nl - Puttgarden ferry, Gelot of motorway/highway
hc=1.0487km4h57m1m58s
hc=1.2487km4h57m19s
hc=1.5487km4h57m7s
Zwolle - Machiel Vrijenhoeklaan 354, The Hague, Nlfirst and last part quite some "in city" routing
hc=1.0169km2h4m1m21s
hc=1.2169km2h4m11s
hc=1.5169km2h4m5s

Note that for in-city routing I always use OsmAnd as it calculates the best estimated arrival times and routes as it uses its time penalties for crossroads, traffic lights, etc.

My spreadsheet contains many more lines of comparable calculations in several countries, road-types, straight-on routes, routes with lots of parallel route options, routes with much in-city traffic, etc. They continuously show to me (prove to me) that an hc=1.5 is good for longer distance and 1.2 is optimal for big city traffic.

Harry

Op zo 4 jul. 2021 om 04:22 schreef RizkyAM <rijk...@gmail.com>:
My OSMAnd in-built routing is very slow compared to the Brouter plugin, even if it's just several kilometres (in city area), but it's normal when I try it outside the city (countryside).

--
You received this message because you are subscribed to the Google Groups "OsmAnd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osmand/85e44fb1-c539-483e-a9d7-617584695f1fn%40googlegroups.com.

RizkyAM

unread,
Jul 4, 2021, 7:09:48 AM7/4/21
to OsmAnd
Thanks for the reply

I've tested one of your routing.xml (mycar12), sometimes it works sometimes not.
The problem is your mycar12.xml is a car profile, and I didn't use a car, I use a motorcycle.
How can I change my own motorcycle profile Heuristic Coefficient? Or maybe you can help change the HC from this file?
Motorcycle test.osf

Harry van der Wolf

unread,
Jul 4, 2021, 7:53:18 AM7/4/21
to osmand
How did you create this motorcycle profile?
It is based, as far as I can see, on the Nautical profile which is completely wrong.
For example, it uses:
"default_speed": "13.888889",
"min_speed": "2.777778",
"max_speed": "23.88889",


Next to that you tell me my profile is a car profile (true), and yours is a motorcycle profile, but if I look into your items.json it mentions:
        "parent": "motorcycle",
        "routeService": "OSMAND",
        "routingProfile": "car",
        "stringKey": "motorcycle_1622362544309",
        "userProfileName": "Motorcycle test"


So the used profile is car and its parent is motorcycle? To me that should be the other way round or you have messed up something in the base routing.xml.

Do you also have a modified routing.xml in your Routing folder?

And as a side note: an .osf file is nothing more than a zip file containing 2 json files: unzip, modify and rezip.
But it is better to modify a routing.xml and rename it.

But the first question is: What is it you want different in your profile, compared to the car profile (or nautical profile).
Do you prefer motorways, or not? Avoid toll roads or not? These kind of questions.

Harry

Op zo 4 jul. 2021 om 13:09 schreef RizkyAM <rijk...@gmail.com>:

RizkyAM

unread,
Jul 4, 2021, 8:17:39 AM7/4/21
to OsmAnd
Nautical? I don't know about that either.
Modified routing.xml in routing folder? Yes, your mycar12.xml is the only file in the routing folder.
Of course no motorway and toll roads, it's restricted here for motorcycle.

lodrog...@gmail.com

unread,
Jul 4, 2021, 10:20:34 AM7/4/21
to OsmAnd
Don't waste your time with scientific analysis about the route algorithm of osmand. After 10 years, the company has decided to choose this working philosophy, for some reasons. It will be never like the sygic aura, tomtom go, or here we go. Osmand it is not a true city navigation software, it is an adventure app
this is my opinion

Helmut Jarausch

unread,
Jul 6, 2021, 10:17:36 AM7/6/21
to osm...@googlegroups.com
Hi,
the map of many countries is divided into several regions.
Is there an easy way to find out which region contains a given city? 
E.g., which map of Germany contains the city Koblenz?
Many thanks for a hint, 
Helmut 

lodrog...@gmail.com <lodrog...@gmail.com> schrieb am So., 4. Juli 2021, 16:20:
Don't waste your time with scientific analysis about the route algorithm of osmand. After 10 years, the company has decided to choose this working philosophy, for some reasons. It will be never like the sygic aura, tomtom go, or here we go. Osmand it is not a true city navigation software, it is an adventure app
this is my opinion

--
You received this message because you are subscribed to the Google Groups "OsmAnd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.

Greg Troxel

unread,
Jul 6, 2021, 12:41:45 PM7/6/21
to Helmut Jarausch, osm...@googlegroups.com

Helmut Jarausch <hjar...@gmail.com> writes:

> Hi,
> the map of many countries is divided into several regions.
> Is there an easy way to find out which region contains a given city?
> E.g., which map of Germany contains the city Koblenz?
> Many thanks for a hint,

I have not so much experience because the US is mostly divided into
states :-) but Texas has multiple map regions and I did have to deal
with this.

1) Pick the one that looks closest and install it. If that's not it,
install more. Don't worry about the space unless your phone is running
low.

2) With just overview map, zoom way out and then find the city. As you
zoom in, you'll get a prompt to download. I picked California,
because it's too large and thus probably has regions. I zoomed in on
San Jose, and as I got to the level where the scale bar is 10 km, it
shows me a prompt to downoad the "Santa Cruz" map.
signature.asc
Reply all
Reply to author
Forward
0 new messages