Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - jurajs

Pages: [1]
Discussion/New features / forum quota exceeded ?
« on: May 19, 2012, 12:38:33 »
hmmm ... i was just trying to attach cca 50kb file here... what is the problem ? is the quota somehow counted altogether among all my posts ? in that case i need more ;-)

Tools / [TOOL] guide to creating .poly files easily
« on: May 03, 2012, 20:21:43 »
Hi there

does anyone have experience with creating .poly files (those used with osmosis) ?
all the sources of polygon files out there are not suitable enough for me. i want to do it by myself, but creating it manually is really annoying and time consuming. :-(

simple "by-mouse click-clack way" graphical tool is prefered. (if you know what i mean ... nak-nak)

any ideas are welcome

*EDIT: renamed subject from [wanted] to [TOOL]

Themes - Vector maps / [Theme] only_contours
« on: May 02, 2012, 20:22:42 »

this theme needs special maps generated with contour lines data like these: viewtopic.php?f=43&t=1839. theme renders only contour lines /black on white/ and captions with altitude every 100 meters.

- extract "" into ".../Locus/mapsVector/_themes/"
- activate theme in locus in "Settings / Map - advanced / Theme of the maps"

maps and guide available here:

@menion - feel free to publish in locus shop

Themes - Vector maps / [Theme] Hiking v0.6
« on: May 01, 2012, 02:26:47 »
hiking map theme

this theme is massively inspired by hiking maps from http:// and supposed to render in very similar way.
latest version: 0.6 (available here: viewtopic.php?f=40&t=1871#p12497)

main features:
- handy for outdoor activities like hiking, cycling, etc...
- supports maps with terrain contour lines  (
- some new patterns
- rendering order changed slighty (tunnels, military area, etc...)
- landuse rendering is more fancy (more colors)

- extract "" into ".../Locus/mapsVector/_themes/"
- activate theme in locus in "Settings / Map - advanced / Theme of the maps"

maps with terrain contour lines available here:

@menion - feel free to publish in locus shop

Themes - Vector maps / [Theme] osmarender + terrain contours rules
« on: April 26, 2012, 00:04:13 »

this theme is same as original osmarender theme... with added rules needed to display terrain contour lines. can be used with any regular vector map, but was mainly created to work with special vector maps which contains also terrain contours.

- extract "" into ".../Locus/mapsVector/_themes/"
- activate theme in locus in "Settings / Map - advanced / Theme of the maps"

maps and guide available here:

@menion - feel free to publish in locus shop

Maps / [MAPS] - Vector maps (with terrain contour lines)
« on: April 22, 2012, 16:04:18 »
Maps for download presented in this post are rarely updated these days, because i became too lame to keep them fresh. :) But don't get upset. You can still find many interesting information, guides, hints and hopefully also latest news in this thread.

For regulary updated vector maps you can:
-  buy them in locus shop directly or also
-  download maps for free from
(don't forget to buy a beer to kech61, he is doing great job).

Hi there.

Just to use these maps you will need:
- render theme(s) that supports elevation tags (e.g.
- vector map made with elevation data (e.g. some maps are available at the bottom of this post in "Maps for download" section)
- thats it !

Short description:
- here I describe briefly how to make mapsforge vector map(s) using original osm data along with srtm terrain elevation data. Final map tiles will be generated also with fancy terrain contour lines.
- i will share here also download links for some maps, so you can test/use it by yourself
- there are also themes available (read below)

Themes supporting these maps:
. [Theme] osmarender + terrain contours rules <!-- m --><!-- m -->
- [Theme] Volatile <!-- m --><!-- m -->
- [Theme] Hiking <!-- m --><!-- m -->
- [Theme] only_contours <!-- m --><!-- m -->

Guide to make your own map (v0.4_2012-05-08):
As an example i will write here how I managed to create a map of Slovakia as this was my really first more or less successfull attempt <!-- s;-) -->;-)<!-- s;-) -->

1. download and install osmosis, phyghtmap, mapsforge mapwriter plugin, srtmfill. get some osm map data from e.g. osm/cloudmade/geofabrik including polygon files, but I preffer my own "handmade" polygons with the smallest complexity possible for better processing speeds.
(computing time increases rapidly with complexity of polygon files, i don't recommend using files with size > 5KB)

2. download "tag-mapping.xml" and add there these lines. (needed for mapwriter)
Code: [Select]
   <!-- Elevation TAGS -->
      <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" />
      <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" />
       <!-- .... etc ....  -->

3. [you can skip this by downloading suitable theme]
use rendertheme of your choice and edit rule file ".xml". Add the following code just before waterways section. This edited file use as rendering theme for vector maps in your locus in order to display also terrain contour lines.
Code: [Select]

        <!-- 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_minor">   
              <line stroke="#60800000" stroke-width="0.3"/>
           <rule e="way" k="contour_ext" v="elevation_medium|elevation_major">   
              <line stroke="#60800000" stroke-width="0.6"/>
        <!-- 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="#60800000" stroke-width="0.2"/>
           <rule e="way" k="contour_ext" v="elevation_medium|elevation_major">   
              <line stroke="#60800000" stroke-width="0.5"/>
        <!-- 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="#60800000" stroke-width="0.15"/>
           <rule e="way" k="contour_ext" v="elevation_medium|elevation_major">   
              <line stroke="#60800000" stroke-width="0.4"/>
              <rule e="way" k="*" v="*">
                 <pathText k="ele" font-style="bold" font-size="10" fill="#000000" stroke="#ffffff" stroke-width="2.0" />
        <!-- 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="#60800000" stroke-width="0.12"/>
           <rule e="way" k="contour_ext" v="elevation_medium|elevation_major">   
              <line stroke="#60800000" stroke-width="0.3"/>
              <rule e="way" k="*" v="*">
                 <pathText k="ele" font-style="bold" font-size="10" fill="#000000" stroke="#ffffff" stroke-width="2.0" />
        <!-- 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="#60800000" stroke-width="0.08"/>
           <rule e="way" k="contour_ext" v="elevation_medium|elevation_major">   
              <line stroke="#60800000" stroke-width="0.2"/>
              <rule e="way" k="*" v="*">
                 <pathText k="ele" font-style="bold" font-size="10" fill="#000000" stroke="#ffffff" stroke-width="2.0" />
        <!-- 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="#60800000" stroke-width="0.06"/>
           <rule e="way" k="contour_ext" v="elevation_medium|elevation_major">   
              <line stroke="#60800000" stroke-width="0.15"/>
              <rule e="way" k="*" v="*">
                 <pathText k="ele" font-style="bold" font-size="10" fill="#000000" stroke="#ffffff" stroke-width="2.0" />

4. if you have prepared your environment correctly, run these commands, and you should end-up with map file created.

4.1 download and process the terrain data.
Code: [Select]
C:Python27Scriptsphyghtmap --polygon=E:OSMpolygonsslovakia.poly -o E:OSMsrtm-dataslovakia_srtm6 --source=view1,view3,srtm1,srtm3  -s 20 -c 200,100 --start-node-id=20000000000 --start-way-id=10000000000 --write-timestamp --max-nodes-per-tile=0
4.1.1 [highly recommended] after the pyghtmap has downloaded hgt elevation data, you can kill phyghtmap and use srtmfill utility to fix "null" data in hgt files (I had a lot of null/invalid data so i had to fix them all). before proceeding to next step you have to run phyghtmap command again so the osm file will be created from valid elevation data.

4.1.2 [better speed - not recommended] instead of --polygon option you can use -a in this step and cut the map polygon in next step with osmosis (processed in few seconds/minutes, but the result quality is worse).

4.1.3 [optional] you can cut-out the map area corresponding with polygon file used for processing the terrain data
Code: [Select]
osmosis --rx e:OSMosm-map-dataeurope.osm.bz2 --tee 1 --bp file="E:OSMpolygonsslovakia.poly" --wx e:OSMosm-map-dataslovakia.osm
4.2 [optional] sort is essential before merge (merge task is requiring all osm files sorted). proceed with this step for one or both files if you get errors during merge.
Code: [Select]
osmosis --rx e:OSMosm-map-dataslovakia.osm.bz2 --sort --wx e:OSMosm-map-dataslovakia.sorted.osm
4.3 merge both files together
Code: [Select]
osmosis --rx e:OSMosm-map-dataslovakia.sorted.osm --rx E:OSMsrtm-dataslovakia_srtm6.osm --merge --wx e:OSMosm-map-dataslovakia.merged.osm
4.4 create final map using mapsforge mapwriter plugin
Code: [Select]
osmosis --rx e:OSMosm-map-dataslovakia.merged.osm --mw bbox=47.6,16.7,49.8,22.7 type=hd tag-conf-file=e:OSMtag-mapping.xml
- zoom level 12 and 13 doesn't generate well - probably a bug of mapsforge library (maps published after 8th of May are much better)
- elevation text is more likely displayed at zooms 16-17, but for zooms 14-15 is very rarely visible, although its defined

Maps for download:
(minor contour line steps are 20m, major line steps are 100m)

France 2012-05-29 (1095 MB):
Germany 2012-09-09 (728 MB):

Europe (Custom regions):
Alps 2012-09-09 (631 MB):
Austria+Switzerland 2012-09-09 (309 MB):
Baltic states (EE,LT,LV+Kaliningrad) 2012-09-09 (77 MB):
BeNeLux 2012-09-09 (369 MB):
former Yugoslavia (SI,HR,SRB,BiH,MN,MC) 2012-09-09 (192 MB)
Greece, Albania, Cyprus 2012-09-09 (146 MB)
Iberian peninsula (ES,PT,AD,GI) + isles 2012-09-09 (387 MB):
Italy + Malta 2012-09-09 (408 MB):
Romania+Bulgaria 2012-09-09 (225 MB):
Scandinavia (DK,NO,FI,SE)  2012-09-09 (689 MB):
UK+Ireland+Iceland 2012-09-09 (360 MB):
Visegrád Group (CZ,SK,PL,HU) 2012-09-09 (399 MB):

Asia (Japan):
Hokkaido 2012-05-19 (58 MB):
Ryukyu islands and Pacific islands 2012-05-14 (8 MB):
Honshu 2012-05-?? (??? MB): cancelled...
Shikoku 2012-05-19 (37 MB):
Kyushu 2012-05-26 (72 MB):

if you are missing something, try to make a wish <!-- s;-) -->;-)<!-- s;-) -->

europe regions maps available for download here are created according to these polygons: 

*** starting from 8th May, new tag-mapping.xml ruleset will be used to create maps***
so you can adjust your themes accordingly. hiking (v0.3) theme will be updated too.
Code: [Select]
<osm-tag key="highway" value="bus_stop" zoom-appear="15" />
<osm-tag key="amenity" value="cafe" zoom-appear="16" />
<osm-tag key="amenity" value="drinking_water" zoom-appear="15" />
<osm-tag key="amenity" value="fast_food" zoom-appear="16" />
<osm-tag key="amenity" value="parking" zoom-appear="16" />
<osm-tag key="amenity" value="pharmacy" zoom-appear="16" />
<osm-tag key="amenity" value="place_of_worship" zoom-appear="15" />
<osm-tag key="amenity" value="pub" zoom-appear="16" />
<osm-tag key="amenity" value="restaurant" zoom-appear="15" />
<osm-tag key="shop" value="supermarket" zoom-appear="15" />
<osm-tag key="railway" value="halt" zoom-appear="15" />
<osm-tag key="railway" value="tram_stop" zoom-appear="15" />
<osm-tag key="tourism" value="alpine_hut" zoom-appear="14" />
<osm-tag key="tourism" value="attraction" zoom-appear="16" />
<osm-tag key="tourism" value="hostel" zoom-appear="15" />
<osm-tag key="tourism" value="hotel" zoom-appear="15" />
<osm-tag key="tourism" value="information" zoom-appear="15" />
<osm-tag key="tourism" value="museum" zoom-appear="16" />
<osm-tag key="tourism" value="viewpoint" zoom-appear="15" />
<osm-tag key="historic" value="memorial" zoom-appear="16" />
<osm-tag key="historic" value="monument" zoom-appear="16" />

see also some screenshots in attachment.
any feedbacks welcome.

Resources used: ... xmapsforge (thanks to kech61 for first kick)

### this post will be edited from time to time, so please check it sometimes for updates, improvements and fixes ###
last update: 2012-09-09 22:41

Hi Menion,

I have seen that you have added an option to change font size for captions in vector maps. Good one.
But I have another idea to improve rendering vector maps.

Can you just add similar possibility to render all symbols and/or captions also on lower/higher zooms to achieve more/less detailed map rendered ?

My intention was to replace all rendertheme strings zoom-min="X" for something like zoom-min="X+/-Y".

What do you think?


Pages: [1]