navit-project.org

forum for navit navigation tool
It is currently 22 Nov 2017, 20:05
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  [ 3 posts ] 
Author Message
 Post subject: Maening of Rule-File (maptool -r Rule-file.txt)
PostPosted: 18 Dec 2013, 22:12 
Offline

Joined: 26 Sep 2013, 10:59
Posts: 50
How to change rules in Maptool for Keywords of streets a.s.o.
The first line is copied from osm.c. The second line is the same in a seperate rule-textfile.
The first character has to be the type n for node, w for way or ?, if its for both, ways and nodes.
Then whitespaces and then the keyword of Openstreetmap-Key. Then whitspaces and keyword of navit.Nothing behind it!

Code:
   "n   barrier=lift_gate   barrier_lift_gate\n"
n   barrier=lift_gate   barrier_lift_gate


How to change something. Want to show gate on the map, that has no own symbol on Navit-map as lift_gate, too:
Code:
n   barrier=lift_gate   barrier_lift_gate
n   barrier=gate      barrier_lift_gate


Now, Navit would show lift_gate and gate as lift_gate after processing maptool.
barrier_lift_gate should be in your navit.xml in the layout-section.

In your own rule-file should be all other rule-lines, that you can find in osm.c, in between static char *attrmap={...}.

You cannot create own Keywords for Navit. They are fix. You are free in use of Keywords of Openstreetmap.

Then, start maptool with maptool -r your-own-rule-file.txt -i source destination.
Source is an Openstreetmap-file (*.osm). Start Navit with destination-file as map.


Last edited by Mapmapper on 25 Dec 2013, 22:10, edited 1 time in total.

 Profile  
 
 Post subject: Re: Maening of Rule-File (maptool -r Rule-file.txt)
PostPosted: 20 Dec 2013, 20:19 
Offline
User avatar

Joined: 07 Jun 2013, 09:32
Posts: 200
Location: Rostock, North Germany
Did you already read this chapter? http://wiki.navit-project.org/index.php ... s#Hard_way


 Profile  
 
 Post subject: Re: Maening of Rule-File (maptool -r Rule-file.txt)
PostPosted: 20 Dec 2013, 21:07 
Offline

Joined: 26 Sep 2013, 10:59
Posts: 50
No, I did not read this chapter. The Pois are not so important to me, so i didnt find this chapter. But its interesting to me, thanks a lot!

Its a similiar theme. In this chapter, however, the rule-file-option of maptool is not explained. With the rule-file-option, you do not need to recompile maptool or Navit. You can change streets and areas with rule-file, not only Pois. With this rule-file, I can show Cobblestone-streets and street-beside-cycleways on the map. That is my original theme.

I needed a few hours, to find out, in wich form the rule-file is needed.

At first, I did it with recompiled maptool, but its not so easy to share this changes with other Navit-users.

And, you can change Navit-Keywords, ok. But then, you must program and recompile Navit and maptool. For an expierienced user, who uses this for its own, that is an solution. To share it with others, is not so easy.

Is it possible, to add street-types in the same way like pois? street0 up to ten for all vehicles-types as standard in Navit? Like poi_custom0..10? Then, I could much better differ for bicycle-ways. Differ between lanes and tracks beside streets p.e. Or avoid small tracks a.s.o.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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