Opened 10 years ago

Closed 10 years ago

#753 closed defect/bug (worksforme)

Routing error, Selects a minor road a short distance.

Reported by: henrik Owned by: cp15
Priority: trivial Milestone: version 0.5.0
Component: port/android Version:
Severity: Keywords:
Cc:

Description

Error in route choice between these points: (Unnecessary detour)

From 62 30 14 N 15 29 53 E

To 62 29 57 N 15 29 5 E

Link to road in OpenStreetMap?: http://www.openstreetmap.org/?lat=62.50246&lon=15.49055&zoom=17&layers=M

I use the latest anroid version, 0.5.0.4033 and a new mapp from http://maps.navit-project.org/download/

See attached image.

Attachments (1)

wrong.png (80.6 KB) - added by henrik 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by henrik

comment:1 Changed 10 years ago by tegzed

Hello,

I had a very similar problem before. This is caused by the method navit uses to assign weight to roads. Please see my forum topic: http://sourceforge.net/projects/navit/forums/forum/512960/topic/3702652

The problem is in how navit maps osm way objects to its own road type.

These are your roads:

http://www.openstreetmap.org/browse/way/94642360 http://www.openstreetmap.org/browse/way/38290594

This is the mapping from osm type to navit's own type in maptool/osm.c

        "w      highway=secondary                       street_3_land\n"
        "w      highway=secondary,name=*,rural=1        street_3_land\n"
        "w      highway=secondary,name=*                street_3_city\n"
        "w      highway=secondary,rural=0               street_3_city\n"
        "w      highway=secondary,area=1                poly_street_3\n"
        "w      highway=secondary_link                  ramp\n"
        "w      highway=tertiary                        street_2_land\n"
        "w      highway=tertiary,name=*,rural=1         street_2_land\n"
        "w      highway=tertiary,name=*                 street_2_city\n"
        "w      highway=tertiary,rural=0                street_2_city\n"
        "w      highway=tertiary,area=1                 poly_street_2\n"
        "w      highway=tertiary_link                   ramp\n"

and this is the roadprofile in navit.xml that sets routing weights to navit road types(check the route_weight numbers):

                        <roadprofile item_types="street_3_city" speed="40" route_weight="40" maxspeed="50" >
                                        <announcement level="0" distance_metric="50"/>
                                        <announcement level="1" distance_metric="200"/>
                                        <announcement level="2" distance_metric="500"/>
                        </roadprofile>
                        <roadprofile item_types="street_2_land" speed="65" route_weight="65" maxspeed="90" >
                                        <announcement level="0" distance_metric="100"/>
                                        <announcement level="1" distance_metric="400"/>
                                        <announcement level="2" distance_metric="1000"/>
                        </roadprofile>

You can see that the main road Albyvägen is mapped to street_3_city since it has a name attribute. navit assumes that roads with name are city roads with speed 40km/h. If you set the osm attribute rural=1 the road will be mapped to street_3_land which has rote weight 70km/h by default and this should solve your problem.

Bye David Tegze

comment:2 Changed 10 years ago by henrik

  • Resolution set to worksforme
  • Status changed from new to closed

I changed the street to residential, what is more correct and the routing error is fixed for now.

Note: See TracTickets for help on using tickets.