navit-project.org

forum for navit navigation tool
It is currently 21 Aug 2017, 04:47
View unanswered posts | View active topics


All times are UTC


Forum rules


Feel free to ask anything here related to the installation and configuration of Navit.

Some notes before your first post:

Please provide as much informations as possible:



Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Adding elevation to the maps
PostPosted: 27 Nov 2016, 17:16 
Offline

Joined: 30 Apr 2015, 16:33
Posts: 31
I often travel on the logging roads in the back country and it is important to know specific elevation for me, so I am wondering if there is a good and easy to follow write-up anywhere on adding elevation to the OpenStreetMaps used with Navit.
Can anyone please point me in the right direction?

If it matters, I am using the maps generated from Open Street Maps for Ontario,Canada.


 Profile  
 
 Post subject: Re: Adding elevation to the maps
PostPosted: 31 Dec 2016, 17:00 
Offline

Joined: 10 Aug 2014, 16:04
Posts: 14
Hi,

The path to add elevation is collect SRTM data, convert to OSM using strm2osm and then let maptool turn it into a seperate navit map.
A bit of info here :
http://wiki.openstreetmap.org/wiki/Srtm2Osm

Navit will show heightlines on the map and sice a while you can also have some rudimentary heightprofile of a route in gui Internal
Image
For this the name of the map with heightlines must be something.heightlines.bin
(you can replace something with anything)
regards.


 Profile  
 
 Post subject: Re: Adding elevation to the maps
PostPosted: 31 Dec 2016, 17:10 
Offline

Joined: 10 Aug 2014, 16:04
Posts: 14
And a view of the map with heightlines.
If you zoom in then labels show the altitude of the lines.

Image


 Profile  
 
 Post subject: Re: Adding elevation to the maps
PostPosted: 17 Jan 2017, 01:00 
Offline

Joined: 30 Apr 2015, 16:33
Posts: 31
Tried this tool under Fedora 19 with mono and it crashed soon after starting, downloaded a handful of files only.
Guess I will have to find a Windows machine to try.


 Profile  
 
 Post subject: Re: Adding elevation to the maps
PostPosted: 17 Jan 2017, 18:14 
Offline

Joined: 30 Apr 2015, 16:33
Posts: 31
Here's what I did on a Win 7 machine:
Tried downloading a map of Southern Ontario with portions of Quebec, upstate New York and some Michigan.
This did not work on a machine with 8 GB RAM as it ran out of memory at the very end of the process.

Then I moved to a machine with 16 GB RAM and it downloaded a 2650 MB file.

Tried to feed this file into maptool, but it died after allocating 112 MB RAM. Tried a handful of earlier versions as well and all crashed.

Then I downloaded smaller areas in Ontario, starting from 11 MB and up to 65 MB.
maptool crashed on all of them sooner or later, with the smallest 11 MB file getting much further according to the screen output.

So I have a bunch of OSM files which I do not know how to use with Navit.


 Profile  
 
 Post subject: Re: Adding elevation to the maps
PostPosted: 29 Jan 2017, 13:59 
Offline

Joined: 30 Apr 2015, 16:33
Posts: 31
Any tips on how to use maptool to convert elevations to a map without it crashing?


 Profile  
 
 Post subject: Re: Adding elevation to the maps
PostPosted: 01 Jun 2017, 19:27 
Offline

Joined: 26 Sep 2016, 18:30
Posts: 2
I sucessfully generated a heightline map with strm2osm under debian

Best regards,
zintor


Attachments:
heightline.PNG
heightline.PNG [ 105.48 KiB | Viewed 315 times ]
 Profile  
 
 Post subject: Re: Adding elevation to the maps
PostPosted: 12 Jul 2017, 15:47 
Offline

Joined: 18 May 2017, 12:30
Posts: 4
A couple of years ago I converted SRTM3 data into contour maps to be used in
navit. I used phyghtmap and maptool under linux. As the SRTM3 files are one
degree square tiles, I also devised three scripts to help convert a number of
files in one go.

The proces:

Download the *.hgt.zip SRTM3 files of the region.
Extract the *.hgt files in a directory, e.g. in ~/contours.
Download phghtmap and install in /usr/local/bin.
Phyghtmap is used to convert the *.hgt files into .osm files.
Place the script hight2osm.sh in the directory ~/contours with the *.hgt files.

Script hgt2osm.sh:

for file in ´echo *.hgt´
do
/usr/local/bin/phyghtmap -0 ¨$file¨
done

Execute the script:
sudo sh ~/contours/hgt2osm.sh

Remarks:
- -0 is used to prevent the land contour.
- depending on the number of files and the processing power this may take a
considerable time.

Now remove the *.hgt files from the ~/contours directory:
rm ~/contours/*.hgt

Maptool is used to convert the .osm files into .bin files. In the .osm files you
now see ´><´. For maptool all labels must start a new line. Therefore the script
osm_label.sh is used. Place the script osm_label.sh in the directory ~/contours.

Script osm_label.sh:

for file in ´echo *.osm´
do
sed -i ´s/></>\n</g´ ¨$file¨
done

Execute the script:
sudo sh ~/contours/osm_label.sh

With the script osm2bin.sh maptool converts the osm files. Place the script
osm2bin.sh in the directory ~/contours.

Script osm2bin.sh:

for file in ´echo *.osm´
do
maptool -i ¨$file¨ ¨file¨.bin
done

Execute the script:
sudo sh ~/contours/osm2bin.sh

Remark:
-i to use the names of the input files.

Removing the *.osm files:
rm ~/contours/*.osm

As a result there remain files with the extension .osm.bin. E.g. with KRename
thes may be changed in .bin.

Remarks:
- Default phyghtmap gives contour steps of 20 m, 100 m for elevation medium and
200 m for elevation major.
- I don´t know how to make navit show the values in the contour lines.
- You have to place the contour .bin files in the ~/.navi/maps directory and to
enable them in the navit.xml file.
- In navit.xml you can change the way the contour lines are shown. My navit.xml
now has:

<layer name="heightlines">
<itemgra item_types="height_line_1" order="4-6">
<polyline color="#C48E48C8" width="1"/>
</itemgra>
<itemgra item_types="height_line_1" order="7">
<polyline color="#C48E48C8" width="2"/>
</itemgra>
<itemgra item_types="height_line_1" order="8-">
<polyline color="#C48E48C8" width="4"/>
<text text_size="8"/>
</itemgra>
<itemgra item_types="height_line_2" order="7">
<polyline color="#C48E48C8" width="1"/>
</itemgra>
<itemgra item_types="height_line_2" order="8-">
<polyline color="#C48E48C8" width="2"/>
<text text_size="8"/>
</itemgra>
<itemgra item_types="height_line_3" order="8-11">
<polyline color="#C48E48C8" width="1"/>
</itemgra>
<itemgra item_types="height_line_3" order="12-">
<polyline color="#C48E48C8" width="1"/>
<text text_size="8"/>
</itemgra>
</layer>


 Profile  
 
 Post subject: Re: Adding elevation to the maps
PostPosted: 18 Jul 2017, 21:50 
Offline

Joined: 27 Sep 2013, 21:10
Posts: 44
We also recently fixed a bug that was preventing the elevation profile to be displayed correctly : https://github.com/navit-gps/navit/pull/294


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 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