navit-project.org

forum for navit navigation tool
It is currently 18 Aug 2017, 16:12
View unanswered posts | View active topics


All times are UTC


Forum rules


Feel free to ask anything here related to the development process - coding, creating new features, fixing bugs and custom changes of Navit.

Note: For reporting bugs, use the bug tracker.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Help - Read tags from OSM and use it on routing algorith
PostPosted: 28 Oct 2014, 18:08 
Offline

Joined: 28 Oct 2014, 16:44
Posts: 3
Hello everybody,

I'm working on my thesis, that aims to develop a GPS that calculates the route with best way conditions. Ok, I have some information per way, describing the way conditions (number of holes, etc...) . I've introduced those informations in the OSM ways, with a tag called "way_Condition" that can have the value (green, yellow and red).

Now my goal is to use Navit, import my OSM file, and make Navit read my tags and use those tags calculate the cost.

I've researched the route.c file and I saw the function that uses Disjkstra Algorithm. In that function, the algorithm attributes a "val", that is the cost. I think the best way to influence the routing algorithm is to add a value to that "val", based on the way's tag "way_Condition".

Is that the best approach to achieve my goal?
If so, how can I make Navit read my tag and alter it in order to change the cost of the edge?

Consider that my question is very very important for my life. My thesis depend on that, so please, if you know something about it, I would appreciate your help ;)

Thanks


 Profile  
 
 Post subject: Re: Help - Read tags from OSM and use it on routing algorith
PostPosted: 28 Oct 2014, 21:24 
Offline
User avatar

Joined: 07 Jun 2013, 17:13
Posts: 146
Location: Tartu, Estonia
First of all, there is no tag "way_Condition" in OSM. If you would like to map the way conditions, use tags such as surface and smoothness.

These tags are currently not used by Navit. To use them for routing, one would probably need to modify Navit's maptool to get them into the Navit binary map format.


 Profile  
 
 Post subject: Re: Help - Read tags from OSM and use it on routing algorith
PostPosted: 29 Oct 2014, 09:21 
Offline

Joined: 28 Oct 2014, 16:44
Posts: 3
Hi xenos1984,

First of all thanks for your answer.

xenos1984 wrote:
First of all, there is no tag "way_Condition" in OSM. If you would like to map the way conditions, use tags such as surface and smoothness.


In osm I can create my own tags. I just can't share those updates to the rest of the world without OSM approval, bit since It's for proper use, there's no problem about it.

xenos1984 wrote:
These tags are currently not used by Navit. To use them for routing, one would probably need to modify Navit's maptool to get them into the Navit binary map format.


How can this be made? What are the files that I need to view and how are the tag attributes used on route.c?

Thanks


 Profile  
 
 Post subject: Re: Help - Read tags from OSM and use it on routing algorith
PostPosted: 29 Oct 2014, 11:49 
Offline
User avatar

Joined: 07 Jun 2013, 17:13
Posts: 146
Location: Tartu, Estonia
Carlospt wrote:
In osm I can create my own tags. I just can't share those updates to the rest of the world without OSM approval, bit since It's for proper use, there's no problem about it.

There is an OSM approval for tags which describe the properties you would like to map, such as road quality - these are smoothness and surface, as I mentioned. Use these tags. It will not only allow you to upload your data to OSM, so that others can use it as well, but also allow you to use data from other mappers already present in OSM.
Quote:
How can this be made? What are the files that I need to view and how are the tag attributes used on route.c?

I'm not familiar with this part of the code. You can probably find some information on this topic at the wiki, like here:
https://wiki.navit-project.org/index.ph ... /map_items
https://wiki.navit-project.org/index.php/Navit_and_OSM
https://wiki.navit-project.org/index.php/Item_def.h


 Profile  
 
 Post subject: Re: Help - Read tags from OSM and use it on routing algorith
PostPosted: 29 Oct 2014, 15:48 
Offline

Joined: 28 Oct 2014, 16:44
Posts: 3
From what I saw,

I think I have to:
1- add a new attribute in the attr.h.
2- in the osm.c file , i need to create a new variable just like maxspeed_attr_value . So I need to use the add_tag and add_way functions !
3- Here, I would like to multiply the variable introduced above with the value(cost) of the segment, in the route_graph_flood function. Is it possible?


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Silver Orange 2.0.6 for IPB Designed by Skins and Hosting
Converted for phpBB3, based on Royal Blue template by BigB © 2007 2008 AEON KINGS