[MAPS] - Vector maps (with terrain contour lines)

Started by jurajs, April 22, 2012, 16:04:18

0 Members and 12 Guests are viewing this topic.

jurajs

#180
hi col...

i hope it will work for you now....
btw: using just view3 source should be enough. see post written by kech61 viewtopic.php?f=43&t=1839&p=14620&#p14620

J.
  •  

john_percy

#181
Currently, the "sea level" contour line disagrees with the coastline. My workaround is to simply amend the theme to hide the elevation=0 contour line, relying on the fact that the tag mapping does not add elevation data to this line. This won't work in areas where the land comes down steeply to sea level as other contour lines may stray into the sea area. And if you use a map with sea tiles from OpenAndroMaps, then this is not needed - those maps seem to hide the zero elevation contour line by default.
Is there a better way of doing this?
<!-- 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>
  <rule e="way" k="contour_ext" v="elevation_medium|elevation_major">  
<rule e="way" k="ele" v="*">
<line stroke="#60800000" stroke-width="0.6"/>
</rule>
  </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="#60800000" stroke-width="0.2"/>
  </rule>
  <rule e="way" k="contour_ext" v="elevation_medium|elevation_major">  
<rule e="way" k="ele" v="*">
 <line stroke="#60800000" stroke-width="0.5"/>
</rule>
  </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="#60800000" stroke-width="0.15"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium|elevation_major">  
<rule e="way" k="ele" v="*">
<line stroke="#60800000" stroke-width="0.4"/>
<pathText k="ele" font-style="bold" font-size="10" fill="#60800000" stroke="#60ffffff" stroke-width="2.0" />
</rule>
</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="#60800000" stroke-width="0.12"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium|elevation_major">  
<rule e="way" k="ele" v="*">
<line stroke="#60800000" stroke-width="0.3"/>
<pathText k="ele" font-style="bold" font-size="10" fill="#60800000" stroke="#60ffffff" stroke-width="2.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="#60800000" stroke-width="0.08"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium|elevation_major">  
<rule e="way" k="ele" v="*">
<line stroke="#60800000" stroke-width="0.2"/>
<pathText k="ele" font-style="bold" font-size="10" fill="#60800000" stroke="#60ffffff" stroke-width="2.0" />
</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="#60800000" stroke-width="0.06"/>
</rule>
<rule e="way" k="contour_ext" v="elevation_medium|elevation_major">  
<rule e="way" k="ele" v="*">
<line stroke="#60800000" stroke-width="0.15"/>
<pathText k="ele" font-style="bold" font-size="10" fill="#60800000" stroke="#60ffffff" stroke-width="2.0" />
</rule>
</rule>
</rule>
Sea level contour line, before and after (there are other differences between the themes)
[attachment=1:the7iu35]2012-10-31 14.05.21.jpg[/attachment:the7iu35]
Zero level contour line hidden in OpenAndroMaps sea tile maps:[attachment=0:the7iu35]2012-10-31 14.06.05.jpg[/attachment:the7iu35]
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

kech61

#182
Quote from: "john_percy"Currently, the "sea level" contour line disagrees with the coastline. My workaround is to simply amend the theme to hide the elevation=0 contour line, relying on the fact that the tag mapping does not add elevation data to this line. This won't work in areas where the land comes down steeply to sea level as other contour lines may stray into the sea area. And if you use a map with sea tiles from OpenAndroMaps, then this is not needed - those maps seem to hide the zero elevation contour line by default.
Is there a better way of doing this?

Hi John,

I recommend to use phyghtmap V1.44, it has an option (-0) to skip the creation of the zero-contourline.
So there is no more need to hack phyghtmap as it was necessary up to V1.43 or to play arround with the theme.
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

kech61

#183
Quote from: "col"Can anyone shed some light on what is happening here. The maps create fine, but have missing parts. First image has missing centre of map, zoom 1-7, whole map appears at zoom 8, but with squares of polygon data missing.

Hi col,

As Jurajs mentioned, this is an issue of displaying too much data.
Keep in mind that:
- every time you zoom out 4 times the amount of data have to be rendered
- you render data on a smartphone, this means 1GHz cpu, one core, a couple of MB Ram, a usual Tileserver has at least 4cores an 32Gb ram..

To look deeper into this issue:
Per default Mapsforge stores data into 3 BaseZoomlevels
- 0-7
- 8-11
- 12-22
So if you store  <osm-tag key="contour_ext" value="elevation_major" zoom-appear="6" force-polygon-line="true" /> it means that this have to be prozessed (checked at least) in level 0 to 7  :shock: result is crash.
Same with  <osm-tag key="contour_ext" value="elevation_medium" zoom-appear="10" force-polygon-line="true" /> it means that this have to be prozessed in level 8 to 11

I do not recommend to use elevation Data above Level 12

However, the BaseZoolLevel can be modified by the param "zoom-interval-conf".
For some Maps I use 4 BaseLevels zoom-interval-conf=5,0,6,8,7,9,11,10,12,15,13,21
0-6
7-9
10-12
13-21
With this conf. you MAY try to start contourlines (mayor, medium) at level 10,
IF you move tags that you do not realy need at level 12 to level 13.

There is another issue for rendering Data in Levels 0-11: simplification-factor

"simplifies ways and polygons with a topology preserving algorithm similar to the Douglas Peucker algorithm, using as the maximum distance difference value the given simplification factor (evaluated in pixels on max zoom level of a base zoom level); on base zoom levels higher than 12, no simplification is computed,  Default=5"

This means that per default ways are simplyfied in these levels to reduce memory footprint resulting in ugly/useless contourlines.

Critical Areas in Europe (not only for contourlines):
Netherlands, Germany along the NL Border, UK mid+south
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

col

#184
Thanks both Jurajs & Kech61 for your detailed reply. I have been busy so have not had time to return to some rendering of maps, but will give it a go in the next few days with the information in mind. Have either of you tried building and using the newest version of map-writer pluging with the coastline? Have some Maven issues but intrested in the results.
  •  

kech61

#185
Quote from: "col"Have either of you tried building and using the newest version of map-writer pluging with the coastline? Have some Maven issues but intrested in the results.

No, the plugin has several pitfalls compared to my solution:
- pure 64bit
- need lots of memory (type=HD does'nt work)
- no chance to correct faulty polygons (there are several)
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

col

#186
Ok thanks for the heads up. I have also just found your cycle/hike/coastline maps, that kind of makes it unneccessary for me to do my own maps at the moment, at least until the mapwriter is updated to include rendering of cycleways and hiking routes. Thanks for supplying them, will look forward to the map of Great Britain to include hiking.

Regards

Col
  •  

sebbo

#187
did anybody manage to get this stuff running on a linux (ubuntu server) machine?
  •  

kech61

#188
Quote from: "sebbo"did anybody manage to get this stuff running on a linux (ubuntu server) machine?

All tools are running on Linux too, it should be no problem to set this stuff up on an Ubuntu machine.
In the contrary, it will be easier cause you dont have to hassle with <cr><lf> line endings, the shell scripts are more powerfull than DOS-Batches, compiling the gdal-bindings for Phyton on Windows is a pain - on Linux its straight forward, aso...

Best regards
Christian
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

vitamin

#189
As I need to make some screen shots in full screen size, could you tell me please if there is a way to view those maps on Windows XP machine?
  •  

jurajs

#190
hi there guys....

i was going to create new bunch of maps.... and as i am looking around... i can see that new pyghtmap is out... also new osmosis.... but that bloody mapsfogre map-writer plugin is more than 1 year old... still on the 0.3.0  :-( so the latest possible osmosis here to use is still 0.40.1 ? am i right ? :-(

jurajs
  •  

joe76

#191
France 2012-05-29 (1095 MB): https://docs.google.com/open?id=0B3Ijv5 ... WNKaVJsLVE
--> NOT FOUND???
  •  

jurajs

#192
hi joe.... France is missing at the moment... please be patient... I am trying to build brand new maps at the moment... but tihs can take few more days.... please check again in a week or so....

jurajs
  •  

gazoox

#193
Hi Jurajs.

Don't you do any more updates? Is it planned to get updates?

You map of 2012 is still better quality with the data included in the zoom levels in comparison to the maps from www.openandromaps.org
  •  

tommi

#194
Quote from: "gazoox"Hi Jurajs.

Don't you do any more updates? Is it planned to get updates?

You map of 2012 is still better quality with the data included in the zoom levels in comparison to the maps from http://www.openandromaps.org
Hi gazoox,
could you add screenshots to explain what you mean?
Thanks,
Tommi
  •