Contourlines added for Orux>Mapsforge
+3
chilobo
pedja
kech61
7 posters
OruxMaps :: ENGLISH :: IMPROVEMENTS
Page 1 of 1
Contourlines added for Orux>Mapsforge
Its Possible without being a MapGuru, doe to the fantastic work and documentation of the OSM/Mapsforge community
Example from Duernstein/Lower Austria
-Oruxmaps on Sony Xperia Active-
Made with Srtm2osm, osmosis, Mapsforge Osmosis Plugin.
To be honest, there are some tweaks in tag-mapping.xml that could be done much more elegant,
the Names of the major contourlines do not render (my fault for sure)
but ist works so far - ist's a good start for serious work on.
The .map - file is only 15% larger than the one without contour data (25m -step) and the rendering speed is perfect Ok.
regards
Chris
Example from Duernstein/Lower Austria
-Oruxmaps on Sony Xperia Active-
Made with Srtm2osm, osmosis, Mapsforge Osmosis Plugin.
To be honest, there are some tweaks in tag-mapping.xml that could be done much more elegant,
the Names of the major contourlines do not render (my fault for sure)
but ist works so far - ist's a good start for serious work on.
The .map - file is only 15% larger than the one without contour data (25m -step) and the rendering speed is perfect Ok.
regards
Chris
kech61- Cantidad de envíos : 67
Fecha de inscripción : 2012-01-30
Re: Contourlines added for Orux>Mapsforge
Can you post some tutorial?
pedja- Cantidad de envíos : 111
Fecha de inscripción : 2010-12-06
Re: Contourlines added for Orux>Mapsforge
pedja wrote:Can you post some tutorial?
Hello,
You have to install:
Osmosis latest built
Osmosis 0.35
srtm2osm
the MapwriterPlugin from Mapsforge (the one with dependencies!!)
Read the tutorials at Mapsforge, esp. for the installation of the mapwriter-plugin.
Here are the Commands to generate the contour Lines:
- Code:
#test of merging osm + srtm and render in mapsforge using a small aera in LowerAustria along the river Danube
#Merging Srtm + osm: Thanks to user Fireball2 at http://forum.openstreetmap.org/viewtopic.php?id=5359
#get srtm (output in 0.5 format)
Srtm2Osm.exe -step 25 -cat 500 100 -large -bounds1 48.0 14.0 48.5 16.5 -o D:\maps\Mapsforge\at_test\srtm.osm
#convert srtm to 0.6 (use osmosis 0.35!!! and deactivate the mapwriterplugin = remove it from homefolder)
osmosis --read-xml-0.5 enableDateParsing=no D:\maps\Mapsforge\at_test\srtm.osm --migrate --wx D:\maps\Mapsforge\at_test\srtm6.osm
#cut out osm-data from austria.osm
osmosis --rx D:\maps\OSM_Data\austria.osm.bz2 --tee 1 --bounding-box top="48.50" bottom="48.00" left="14.00" right="16.50" --wx D:\maps\Mapsforge\at_test\at_test.osm.bz2
#merge srtm + osm
osmosis --rx D:\maps\Mapsforge\at_test\at_test.osm.bz2 --sort-0.6 --rx D:\maps\srtm6.osm --sort-0.6 --merge --wx D:\maps\Mapsforge\at_test\at_test_srtm.osm.bz2
#mapsforge output (use mapwriter plugin WITH dependencies)
osmosis --rx file=D:\maps\Mapsforge\at_test\at_test_srtm.osm.bz2 --mw file=D:\maps\Mapsforge\at_test\at_test_srtm.map bbox=48.0,14.0,48.5,16.5 type=hd tag-conf-file=D:\maps\Mapsforge\at_test\tag-mapping-srtm.xml
#Custom tag-mapping-srtm.xml:
#added lines to tag-mapping.xml:
<!-- Elevation TAGS -->
<ways>
<osm-tag key="contour_ext" value="elevation_minor" zoom-appear="13" />
<osm-tag key="contour_ext" value="elevation_medium" zoom-appear="12" />
<osm-tag key="contour_ext" value="elevation_major" zoom-appear="12" />
</ways>
#Custom at_test_srtm.map.xml
#added lines bevore waterways:
<!-- contour lines -->
<rule e="way" k="contour_ext" v="*">
<rule e="way" k="contour_ext" v="elevation_major">
<line stroke="#0a630c" stroke-width="1.1" stroke-dasharray="7,5"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium">
<line stroke="#0a630c" stroke-width="0.8" stroke-dasharray="7,5"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_minor">
<line stroke="#0a630c" stroke-width="0.4" stroke-dasharray="7,5"/>
</rule>
</rule>
However, there are problems with rendering contour-lines at level 13 or lower, I passed this issue to mapsforg-dev group.
regards
Christian
kech61- Cantidad de envíos : 67
Fecha de inscripción : 2012-01-30
Re: Contourlines added for Orux>Mapsforge
This is great! Thanks.
pedja- Cantidad de envíos : 111
Fecha de inscripción : 2010-12-06
Re: Contourlines added for Orux>Mapsforge
An addition to the Tutorial:
I switched from srtm2osm to PHYGHTMAP 1.43, the countourlines are smoother esp. in relative flat aeras and it uses the enhanced www.viewfinderpanoramas.org - .hdrs wherever they are available.
There is no further need for Osmosis 0.35 - the output of PHYGHTMAP is already in Version 0.6.
Unfortunately the issues with rendering the contourlines in Mapsforge at level 13 are still the same.
The installation is easy, be careful to install the Version 1.43, the links at the Windows section points to the version 1.42.
http://katze.tfiu.de/projects/phyghtmap/
So the updated Commands are:
regards
Chris
I switched from srtm2osm to PHYGHTMAP 1.43, the countourlines are smoother esp. in relative flat aeras and it uses the enhanced www.viewfinderpanoramas.org - .hdrs wherever they are available.
There is no further need for Osmosis 0.35 - the output of PHYGHTMAP is already in Version 0.6.
Unfortunately the issues with rendering the contourlines in Mapsforge at level 13 are still the same.
The installation is easy, be careful to install the Version 1.43, the links at the Windows section points to the version 1.42.
http://katze.tfiu.de/projects/phyghtmap/
So the updated Commands are:
- Code:
#test of merging osm + srtm and render in mapsforge using a small aera in LowerAustria along the river Danube
#Merging Srtm + osm: Thanks to user Fireball2 at http://forum.openstreetmap.org/viewtopic.php?id=5359
#Contours with PHYGHTMAP (output is in version 0.6 so no further conversion is needed)
C:\Python27\Scripts\phyghtmap -a 14.0:48.0:16.5:48.5 -o D:\maps\Mapsforge\at_test\srtm6 --source=view1,view3,srtm3 -s 25 -c 500,100 --start-node-id=2000000000 --start-way-id=1000000000 --write-timestamp --max-nodes-per-tile=0 --max-nodes-per-way=0
#cut out osm-data from austria.osm
osmosis --rx D:\maps\OSM_Data\austria.osm.bz2 --tee 1 --bounding-box top="48.50" bottom="48.00" left="14.00" right="16.50" --wx D:\maps\Mapsforge\at_test\at_test.osm
#merge srtm + osm
osmosis --rx D:\maps\Mapsforge\at_test\at_test.osm --sort-0.6 --rx D:\maps\Mapsforge\at_test\srtm6.osm --sort-0.6 --merge --wx D:\maps\Mapsforge\at_test\at_test_srtm.osm
#mapsforge output (use mapwriter plugin WITH dependencies)
osmosis --rx file=D:\maps\Mapsforge\at_test\at_test_srtm.osm --mw file=D:\maps\Mapsforge\at_test\at_test_srtm.map bbox=48.0,14.0,48.5,16.5 type=hd tag-conf-file=D:\maps\Mapsforge\at_test\tag-mapping-srtm.xml
#Custom tag-mapping-srtm.xml:
#added lines to tag-mapping.xml:
<!-- Elevation TAGS -->
<ways>
<osm-tag key="contour_ext" value="elevation_minor" zoom-appear="13" />
<osm-tag key="contour_ext" value="elevation_medium" zoom-appear="12" />
<osm-tag key="contour_ext" value="elevation_major" zoom-appear="12" />
</ways>
#Custom [render].xml
#added lines:
<!-- contour lines -->
<rule e="way" k="contour_ext" v="*">
<rule e="way" k="contour_ext" v="elevation_major">
<line stroke="#0a630c" stroke-width="1.1" stroke-dasharray="7,5"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium">
<line stroke="#0a630c" stroke-width="0.8" stroke-dasharray="7,5"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_minor">
<line stroke="#0a630c" stroke-width="0.4" stroke-dasharray="7,5"/>
</rule>
</rule>
regards
Chris
kech61- Cantidad de envíos : 67
Fecha de inscripción : 2012-01-30
Re: Contourlines added for Orux>Mapsforge
Hello,
Here is the optimized Version of the contourlines for Oruxmaps/Mapsforge.
- reduced the size of the map for faster creation
- switched to 10m intervals, this dosn't create much overhead and the results are fine.
- rendering of contourlines optimized for Xperia Active and Samsung XCover (lowres displays)
- adapted the rendering for each zomm-level
- added pathtext for 100m-lines from level 14 upwards
regards
Chris
Here is the optimized Version of the contourlines for Oruxmaps/Mapsforge.
- reduced the size of the map for faster creation
- switched to 10m intervals, this dosn't create much overhead and the results are fine.
- rendering of contourlines optimized for Xperia Active and Samsung XCover (lowres displays)
- adapted the rendering for each zomm-level
- added pathtext for 100m-lines from level 14 upwards
- Code:
#test of merging osm + srtm and render in mapsforge using a small aera in LowerAustria along the river Danube
#Merging Srtm + osm: Thanks to user Fireball2 at http://forum.openstreetmap.org/viewtopic.php?id=5359
#Contours with PHYGHTMAP (output is in version 0.6)
C:\Python27\Scripts\phyghtmap -a 15.0:48.0:16.5:48.5 -o D:\maps\Mapsforge\at_test\srtm6 --source=view1,view3,srtm3 -s 10 -c 100,50 --start-node-id=2000000000 --start-way-id=1000000000 --write-timestamp --max-nodes-per-tile=0
#cut out osm-data from austria.osm
osmosis --rx D:\maps\OSM_Data\austria.osm --tee 1 --bounding-box top="48.50" bottom="48.00" left="15.00" right="16.50" --wx D:\maps\Mapsforge\at_test\at_test.osm
#merge srtm + osm
osmosis --rx D:\maps\Mapsforge\at_test\at_test.osm --sort-0.6 --rx D:\maps\Mapsforge\at_test\srtm6.osm --sort-0.6 --merge --wx D:\maps\Mapsforge\at_test\at_test_srtm.osm
#mapsforge output (use mapwriter plugin WITH dependencies)
osmosis --rx file=D:\maps\Mapsforge\at_test\at_test_srtm.osm --mw file=D:\maps\Mapsforge\at_test\at_test_srtm.map bbox=48.0,15.0,48.5,16.5 type=hd tag-conf-file=D:\maps\Mapsforge\at_test\tag-mapping-srtm.xml
#Custom tag-mapping-srtm.xml:
#added lines to tag-mapping.xml:
<!-- Elevation TAGS -->
<ways>
<osm-tag key="contour_ext" value="elevation_minor" zoom-appear="13" />
<osm-tag key="contour_ext" value="elevation_medium" zoom-appear="12" />
<osm-tag key="contour_ext" value="elevation_major" zoom-appear="12" />
<osm-tag key="ele" value="100" zoom-appear="14" />
<osm-tag key="ele" value="200" zoom-appear="14" />
<osm-tag key="ele" value="300" zoom-appear="14" />
<osm-tag key="ele" value="400" zoom-appear="14" />
<osm-tag key="ele" value="500" zoom-appear="14" />
<osm-tag key="ele" value="600" zoom-appear="14" />
<osm-tag key="ele" value="700" zoom-appear="14" />
<osm-tag key="ele" value="800" zoom-appear="14" />
<osm-tag key="ele" value="900" zoom-appear="14" />
<osm-tag key="ele" value="1000" zoom-appear="14" />
<osm-tag key="ele" value="1100" zoom-appear="14" />
<osm-tag key="ele" value="1200" zoom-appear="14" />
<osm-tag key="ele" value="1300" zoom-appear="14" />
<osm-tag key="ele" value="1400" zoom-appear="14" />
<osm-tag key="ele" value="1500" zoom-appear="14" />
<osm-tag key="ele" value="1600" zoom-appear="14" />
<osm-tag key="ele" value="1700" zoom-appear="14" />
<osm-tag key="ele" value="1800" zoom-appear="14" />
<osm-tag key="ele" value="1900" zoom-appear="14" />
<osm-tag key="ele" value="2000" zoom-appear="14" />
<osm-tag key="ele" value="2100" zoom-appear="14" />
<osm-tag key="ele" value="2200" zoom-appear="14" />
<osm-tag key="ele" value="2300" zoom-appear="14" />
<osm-tag key="ele" value="2400" zoom-appear="14" />
<osm-tag key="ele" value="2500" zoom-appear="14" />
<osm-tag key="ele" value="2600" zoom-appear="14" />
<osm-tag key="ele" value="2700" zoom-appear="14" />
<osm-tag key="ele" value="2800" zoom-appear="14" />
<osm-tag key="ele" value="2900" zoom-appear="14" />
<osm-tag key="ele" value="3000" zoom-appear="14" />
<osm-tag key="ele" value="3100" zoom-appear="14" />
<osm-tag key="ele" value="3200" zoom-appear="14" />
<osm-tag key="ele" value="3300" zoom-appear="14" />
<osm-tag key="ele" value="3400" zoom-appear="14" />
<osm-tag key="ele" value="3500" zoom-appear="14" />
<osm-tag key="ele" value="3600" zoom-appear="14" />
<osm-tag key="ele" value="3700" zoom-appear="14" />
<osm-tag key="ele" value="3800" zoom-appear="14" />
<osm-tag key="ele" value="3900" zoom-appear="14" />
<osm-tag key="ele" value="4000" zoom-appear="14" />
<osm-tag key="ele" value="4100" zoom-appear="14" />
<osm-tag key="ele" value="4200" zoom-appear="14" />
<osm-tag key="ele" value="4300" zoom-appear="14" />
<osm-tag key="ele" value="4400" zoom-appear="14" />
<osm-tag key="ele" value="4500" zoom-appear="14" />
<osm-tag key="ele" value="4600" zoom-appear="14" />
<osm-tag key="ele" value="4700" zoom-appear="14" />
<osm-tag key="ele" value="4800" zoom-appear="14" />
<osm-tag key="ele" value="4900" zoom-appear="14" />
<osm-tag key="ele" value="5000" zoom-appear="14" />
</ways>
#Custom [render].xml
#added lines just bevore the waterways:
<!-- contour lines optimized for low-res displays interval = 10,(50/100)(Sony Xperia active)-->
<!-- Contour lines below level 12 do not make sense because of the optimization prozessof the map-creator -->
<!-- Level 12 + 13 do not render nice, there seems to be a bug in the renderer -->
<!-- contour lines level 12 -->
<rule e="way" k="contour_ext" v="*" zoom-min="12" zoom-max="12">
<rule e="way" k="contour_ext" v="elevation_medium|elevation_major">
<line stroke="#0a630c" stroke-width="1.1" stroke-dasharray="1,2"/>
</rule>
</rule>
<!-- contour lines level 13 -->
<rule e="way" k="contour_ext" v="*" zoom-min="13" zoom-max="13">
<rule e="way" k="contour_ext" v="elevation_minor">
<line stroke="#0a630c" stroke-width="0.65" stroke-dasharray="1,2"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium|elevation_major">
<line stroke="#0a630c" stroke-width="0.95" stroke-dasharray="1,3"/>
</rule>
</rule>
<!-- contour lines level 14-->
<rule e="way" k="contour_ext" v="*" zoom-min="14" zoom-max="14">
<rule e="way" k="contour_ext" v="elevation_minor">
<line stroke="#0a630c" stroke-width="0.45" stroke-dasharray="1,4"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium|elevation_major">
<line stroke="#0a630c" stroke-width="0.8" stroke-dasharray="1,4"/>
</rule>
</rule>
<!-- contour lines level 15-->
<rule e="way" k="contour_ext" v="*" zoom-min="15" zoom-max="15">
<rule e="way" k="contour_ext" v="elevation_minor" zoom-max="15">
<line stroke="#0a630c" stroke-width="0.35" stroke-dasharray="1,5"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium|elevation_major">
<line stroke="#0a630c" stroke-width="0.65" stroke-dasharray="1,5"/>
<rule e="way" k="*" v="*">
<pathText k="ele" font-style="bold" font-size="10" fill="#000000" stroke="#ffffff" stroke-width="1.0" />
</rule>
</rule>
</rule>
<!-- contour lines level 16 -->
<rule e="way" k="contour_ext" v="*" zoom-min="16" zoom-max="16">
<rule e="way" k="contour_ext" v="elevation_minor">
<line stroke="#0a630c" stroke-width="0.2" stroke-dasharray="1,5"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium|elevation_major">
<line stroke="#0a630c" stroke-width="0.5" stroke-dasharray="1,5"/>
<rule e="way" k="*" v="*">
<pathText k="ele" font-style="bold" font-size="14" fill="#000000" stroke="#ffffff" stroke-width="1.5" />
</rule>
</rule>
</rule>
<!-- contour lines level 17 and above -->
<rule e="way" k="contour_ext" v="*" zoom-min="17">
<rule e="way" k="contour_ext" v="elevation_minor">
<line stroke="#0a630c" stroke-width="0.2" stroke-dasharray="1,5"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium|elevation_major">
<line stroke="#0a630c" stroke-width="0.4" stroke-dasharray="1,5"/>
<rule e="way" k="*" v="*">
<pathText k="ele" font-style="bold" font-size="14" fill="#000000" stroke="#ffffff" stroke-width="1.5" />
</rule>
</rule>
</rule>
regards
Chris
kech61- Cantidad de envíos : 67
Fecha de inscripción : 2012-01-30
Re: Contourlines added for Orux>Mapsforge
Nice maps!
I'm not sure how you achieved this.
As far as I understand it you use data from OSM and SRTM and code / programs
to obtain vector map data on your windows PC which is almost as small (15 % added for contour lines) as the map data obtained from mapsforge.
Do you have to download the data from OSM and SRTM to your local PC before starting the process?
Then you copy the resulting mapfile and the rendertheme (*.XML with added lines to display the contour lines) to your smartphone and the rendering itself is done on your smartphone, right?
If you put the map file and render theme on a server / dropbox I would like to try it on my Samsung 9001.
Thank you Christian
I'm not sure how you achieved this.
As far as I understand it you use data from OSM and SRTM and code / programs
kech61 wrote:
PHYGHTMAP 1.43, osmosis, Mapsforge Osmosis Plugin.
to obtain vector map data on your windows PC which is almost as small (15 % added for contour lines) as the map data obtained from mapsforge.
Do you have to download the data from OSM and SRTM to your local PC before starting the process?
Then you copy the resulting mapfile and the rendertheme (*.XML with added lines to display the contour lines) to your smartphone and the rendering itself is done on your smartphone, right?
If you put the map file and render theme on a server / dropbox I would like to try it on my Samsung 9001.
Thank you Christian
chilobo- Cantidad de envíos : 15
Fecha de inscripción : 2012-02-19
Re: Contourlines added for Orux>Mapsforge
Thanks a lot. I use the Srtm2Osm.exe but at the beginning I had some troubles. If I use the -large option at the Srtm2Osm.exe then I don't have the elevation_minor _medium and _major tags. I am also creating with these options every 10 meters a contour line and every 50 meter a bold line.
Srtm2Osm.exe -step 10 -cat 100 50
Here how it looks like:
https://2img.net/r/ihimg/photo/my-images/824/oruxmapcontours.png
Regards,
zapfen
Srtm2Osm.exe -step 10 -cat 100 50
Here how it looks like:
https://2img.net/r/ihimg/photo/my-images/824/oruxmapcontours.png
Regards,
zapfen
zapfen- Cantidad de envíos : 14
Fecha de inscripción : 2012-06-05
Re: Contourlines added for Orux>Mapsforge
zapfen wrote:Thanks a lot. I use the Srtm2Osm.exe but at the beginning I had some troubles. If I use the -large option at the Srtm2Osm.exe then I don't have the elevation_minor _medium and _major tags. I am also creating with these options every 10 meters a contour line and every 50 meter a bold line.
Srtm2Osm.exe -step 10 -cat 100 50
Here how it looks like:
https://2img.net/r/ihimg/photo/my-images/824/oruxmapcontours.png
Hi Zapfen,
One additional hint: Add force-polygon-line="true" to the contour_ext tags in the tag-mapping.xml, this minimize the rendering problems in level 12+13
- Code:
<osm-tag key="contour_ext" value="elevation_minor" zoom-appear="12" force-polygon-line="true"/>
<osm-tag key="contour_ext" value="elevation_medium" zoom-appear="12" force-polygon-line="true"/>
<osm-tag key="contour_ext" value="elevation_major" zoom-appear="12" force-polygon-line="true"/>
If you are mapping european regions I strongly suggest to switch from srtm2osm to phyghtmap.
With Phyghtmap you can use the optimized contourdata from www.viewfinderpanoramas.org where they are available by setting the approbriate parameters.
best regards
Chris
kech61- Cantidad de envíos : 67
Fecha de inscripción : 2012-01-30
Re: Contourlines added for Orux>Mapsforge
Dear Chris,
thank a lot for the hint about the force-polygon-line="true". This helped to increase the rendering quality.
Sometimes oruxmaps jumps to the map center while I am changing the zoom. But only sometimes. It depends where I am or anything else. Do you have also this issue?
Until now I did not try the phyghtmap.
Regards,
zapfen
thank a lot for the hint about the force-polygon-line="true". This helped to increase the rendering quality.
Sometimes oruxmaps jumps to the map center while I am changing the zoom. But only sometimes. It depends where I am or anything else. Do you have also this issue?
Until now I did not try the phyghtmap.
Regards,
zapfen
zapfen- Cantidad de envíos : 14
Fecha de inscripción : 2012-06-05
Hosting the maps somewhere?
It would be very nice if such maps were available for download, not everyone has the resources to build them.
So I have created a request at the mapsforge tracker - http://code.google.com/p/mapsforge/issues/detail?id=325
Other ideas?
So I have created a request at the mapsforge tracker - http://code.google.com/p/mapsforge/issues/detail?id=325
Other ideas?
RichZ- Cantidad de envíos : 27
Fecha de inscripción : 2012-05-18
Re: Contourlines added for Orux>Mapsforge
I succeeded with your tutorial and built the at_test map. It shows correct in oruxmaps. I tried to find a renderfile, but only found the one in the source of mapsforge (https://code.google.com/p/mapsforge/source/browse/trunk/mapsforge-map/src/main/resources/org/mapsforge/android/maps/rendertheme/osmarender/osmarender.xml).
But when i add it to the folder, the map is all black.
Which renderfile do you use? I would be great, if you can post it for me.
Thank you for the hints and the idea,
Berni
But when i add it to the folder, the map is all black.
Which renderfile do you use? I would be great, if you can post it for me.
Thank you for the hints and the idea,
Berni
BerniPi- Cantidad de envíos : 26
Fecha de inscripción : 2011-05-24
Localización : Austria
www.openandromaps.org
Good news to everybody looking for downloadable mapsforge maps with contourlines. Have a look at:
http://www.openandromaps.org/
Christian has made a great job.
Thank you very much, Christian!
http://www.openandromaps.org/
Christian has made a great job.
Thank you very much, Christian!
hansdampf- Cantidad de envíos : 18
Fecha de inscripción : 2011-07-28
Similar topics
» MAPSFORGE 0.30 - OpenCycleMap?
» Orux-Standard ---> Orux Donate
» Mapsforge render themes
» Vector graphics format
» mapsforge xml selection
» Orux-Standard ---> Orux Donate
» Mapsforge render themes
» Vector graphics format
» mapsforge xml selection
OruxMaps :: ENGLISH :: IMPROVEMENTS
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum