Author Topic: [MAPS] - Vector maps (with terrain contour lines)  (Read 127605 times)

Offline benoitb

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://ofoofo.net
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #135 on: July 31, 2012, 19:40:14 »
Thank you Christian !

I am reprocessing the elevation data right now.
Your website looks really good, I'm going to try to download one of your maps and have it load in Locus. I may try Turkey.

The countries I should be crossing are:
France
Italy
Greece
Turkey
Iran
Turkmenistan
Uzbekistan
Tajikistan
Kirghyzstan
China
South Korea

And maybe:
Japan
Vietnam

Are you using custom polygons ? Can you recommend a tool ? For my first try (tajikistan) I used a polygon I found online, I think it is the official from openstreetmaps, it is heavy with 3458 lines.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline kech61

  • Apprentice of Locus
  • **
  • Posts: 166
  • Thanked: 3 times
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #136 on: July 31, 2012, 20:12:28 »
Quote from: "benoitb"
China

Oh, well... this is a quite a big country, maybe you can specify the parts of China you want to cross..  :shock:  :shock:

Quote from: "benoitb"
Are you using custom polygons ? Can you recommend a tool ? For my first try (tajikistan) I used a polygon I found online, I think it is the official from openstreetmaps, it is heavy with 3458 lines.


Yes I use custom polygons, I draw them as tracks in QV6 (former Touratech QuoVadis), export them as GPX and run a Perl-Script that
- converts the GPX to Poly
- writes the batchfile for the final batch that calls the mapwriter with the right BBox.
(Its part of a series of nested scripts driven by a central make-file)

[attachment=0:2nmnpd6w]tajikistan.jpg[/attachment:2nmnpd6w]

Tatschikistan is running now for 9hours and says "completing read"  :lol:  so ist will run for a day or more further...

If you feed the data into the mapwriter its a good idea to use a custom tag-mapping.xml for these wide and "empty" countrys that forces even low-level roads and ways to appear at low zoom-levels otherwise you dont have any overview an keep scroling around on a empty map - I hope you got the picture...

Something like this (towns)
Code: [Select]

      <pois>
<osm-tag key="place" value="city" zoom-appear="6" />
<osm-tag key="place" value="country" zoom-appear="3" />
<osm-tag key="place" value="hamlet" zoom-appear="9" />
<osm-tag key="place" value="island" zoom-appear="9" />
<osm-tag key="place" value="suburb" zoom-appear="9" />
<osm-tag key="place" value="town" zoom-appear="8" />
<osm-tag key="place" value="village" zoom-appear="8" />
</pois>

and roads

Code: [Select]
<!-- HIGHWAY TAGS -->
<ways>
<osm-tag key="highway" value="bridleway" zoom-appear="9" />
<osm-tag key="highway" value="bus_guideway" zoom-appear="13" />
<osm-tag key="highway" value="byway" zoom-appear="13" />
<osm-tag key="highway" value="construction" zoom-appear="9" />
<osm-tag key="highway" value="cycleway" zoom-appear="12" />
<osm-tag key="highway" value="footway" zoom-appear="10" />
<osm-tag key="highway" value="living_street" zoom-appear="13" />
<osm-tag key="highway" value="motorway" zoom-appear="6" />
<osm-tag key="highway" value="motorway_link" zoom-appear="6" />
<osm-tag key="highway" value="path" zoom-appear="9" />
<osm-tag key="highway" value="pedestrian" zoom-appear="13" />
<osm-tag key="highway" value="primary" zoom-appear="8" />
<osm-tag key="highway" value="primary_link" zoom-appear="8" />
<osm-tag key="highway" value="raceway" zoom-appear="12" />
<osm-tag key="highway" value="residential" zoom-appear="9" />
<osm-tag key="highway" value="road" zoom-appear="9" />
<osm-tag key="highway" value="secondary" zoom-appear="9" />
<osm-tag key="highway" value="secondary_link" zoom-appear="9" />
<osm-tag key="highway" value="service" zoom-appear="9" />
<osm-tag key="highway" value="services" zoom-appear="9" />
<osm-tag key="highway" value="steps" zoom-appear="12" />
<osm-tag key="highway" value="tertiary" zoom-appear="9" />
<osm-tag key="highway" value="track" zoom-appear="9" />
<osm-tag key="highway" value="trunk" zoom-appear="6" />
<osm-tag key="highway" value="trunk_link" zoom-appear="6" />
<osm-tag key="highway" value="unclassified" zoom-appear="9" />
</ways>
Dont use this code in crowdy european aeras, it might couse performance problems there.

I will give you a download link as soon a Tatschikistan is ready - so you can get an idea what OSM worth in these aeras.

regards
Christian
« Last Edit: July 31, 2012, 20:26:56 by kech61 »
Best regards/ Grüsse
Christian
www.openandromaps.org
 

Offline tommi

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1198
  • Thanked: 1 times
  • Devices: Samsung S7 + S5 + S3 + Nexus7 flo
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #137 on: July 31, 2012, 20:26:41 »
Hi Christian/kech61,
just tried to download some andromaps and related themes. All downloads work except this theme: Theme Volatile_ICE, the link doesn't work for me.

Could you check/fix?

Thanks,
Thomas

*edit*: uups, sorry, I checked my download folder again and there are 5 copies of the theme :)
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline kech61

  • Apprentice of Locus
  • **
  • Posts: 166
  • Thanked: 3 times
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #138 on: July 31, 2012, 20:38:41 »
Quote from: "tommi62"
just tried to download some andromaps and related themes. All downloads work except this theme: Theme Volatile_ICE, the link doesn't work for me.

Hmm, I checked this and for me it workes fine, maybe there is an old version of the link in your browsercache with the google_drive-link that does'nt work.
Nethermind, here is the theme:

[attachment=0:23wi4g6t]Volatile_ICE.zip[/attachment:23wi4g6t]

There are only minor changes to original theme from Jusc, most important: the glaciers are rendered as pattern, essential for iceland.
And there are adaptions to the tag-mapping as mentioned obove.

best regards
Christian
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Best regards/ Grüsse
Christian
www.openandromaps.org
 

Offline benoitb

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://ofoofo.net
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #139 on: July 31, 2012, 20:41:21 »
I don't know yet where in China I will go. I still have to study the interesting places I want to visit.

Quote
a Perl-Script that
- converts the GPX to Poly
Could you share that ? Maybe you also know something to convert from kml tracks. This is what I get inside a Google Earth generated kml:
Code: [Select]
<name>testpoly</name>
<styleUrl>#m_ylw-pushpin</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
17.22054464856527,49.28001021156068,0 19.21312815102696,50.56227420701203,0 22.62511147551977,49.36756264330402,0 20.67631306408464,47.56113170067063,0 17.5669935667743,47.98766289167538,0 17.11276781405985,49.2505230935986,0
</coordinates>
</LineString>

Thanks, now I understand what tag-mapping.xml is used for. It reminds me settings about visibility in a telecom software (Actix) that uses Mapinfo I think.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline kech61

  • Apprentice of Locus
  • **
  • Posts: 166
  • Thanked: 3 times
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #140 on: July 31, 2012, 21:37:51 »
Quote
a Perl-Script that
- converts the GPX to Poly
Maybe you also know something to convert from kml tracks. This is what I get inside a Google Earth generated kml:
Sorry, never dealed with kml-xml but I'm pretty shure that there is a solution somewhere in google space...
Or you convert kml to gpx using gpsbabel or some other tool.

Quote
Could you share that ?

My script is written in Perl, but keep in mind that this is coded for a special folder structure:
Code: [Select]
# script to convert a GPX file to a polygon file.
#
# written by Rodolphe Quiédeville <rodolphe@quiedeville.org>, GPL.
#
# Modified for better usability = no more ">" "|", direct file output
# so it's suitable for Windows environment and so on ....
# ensured compatibility with "GPX10" output of tracks from QuoVadis6.0
#
# by Christian Kernbeis 2012, GPL
#
# usage: eg given file = "germany_north.gpx" in subfolder "germany" in continent folder "europe"
# call = gpx2poly.pl germany germany europe
# + map_germany_noth.bat = batch for creating mapsforge map with bbox parameters
# output is written to germany_noth.poly
#
# usage: eg given file ="austria.gpx" in continent folder "europe"
# call = gpx2poly.pl austria europe
# output is written to austria.poly

use strict;

my $infile = shift; #mapname
my $subdir = shift; #subdir
my $basedir = shift; #basedir usually europe

my $subdira = $subdir;
if ($subdir ne ""){
$subdir = $subdir."\";
}
my $basedira = $basedir;
if ($basedir ne ""){
$basedir = $basedir."\";
}
my $polydir = "\osm_data\my_clipbounds\".$basedir.$subdir;

my $inextension = "gpx";
my $outextension = "poly";
my $infilestring = $polydir.$infile.".".$inextension;
my $outfilestring = $polydir.$infile.".".$outextension;
my $bboxfileCYCLE = "map_".$infile.".bat";

#debug
print "n",$infilestring,"n";
print $outfilestring,"n";
#

my $poly_id = 0;
my $poly_file;
my $polybuf;
my $outbuf;
my $id=0;
my $fh;
my $line;



my @latbuff;
my @lonbuff;

my $bbox;

my $min_lat;
my $max_lat;
my $min_lon;
my $max_lon;



#open file
open (fh, $infilestring) or die $!;

while($line = <fh>)
{
if ($line =~ /^s*<trkpt.*slat=["']([0-9.eE-]+)["'] lon=["']([0-9.eE-]+)["']/){
       $polybuf .= sprintf "t%ft%fn", $2,$1;
push (@lonbuff, $2);
push (@latbuff, $1);
}
   elsif ($line =~ /^s*<trk>/){
       $polybuf = "";
       $poly_id++;
   }
   elsif ($line =~ /^s*</trk>/){
       $outbuf .= "$poly_idn$polybuf"."ENDn";
   }
}
close (fh);

open (fh,">",$outfilestring) or die $!;
print fh "$infilen$outbuf"."ENDn";
close fh;


@latbuff = sort { $a <=> $b } @latbuff;
@lonbuff = sort { $a <=> $b } @lonbuff;
$min_lat = @latbuff[0] - 0.0005; #runden auf 3 stellen genau FLOOR
$min_lon = @lonbuff[0] - 0.0005;
@latbuff = reverse sort { $a <=> $b } @latbuff;
@lonbuff = reverse sort { $a <=> $b } @lonbuff;
$max_lat = @latbuff[0] + 0.0005; #runden auf 3 stellen genau CEIL
$max_lon = @lonbuff[0] + 0.0005;


$bbox=
"bbox="
.sprintf ("%.3f",$min_lat)
.","
.sprintf ("%.3f",$min_lon)
.","
.sprintf ("%.3f",$max_lat)
.","
.sprintf ("%.3f",$max_lon);

open (fh,">",$bboxfileCYCLE) or die $!;
print fh "m:\osmosis\bin\osmosis.bat --rb file=m:\Mapsforge\","$basedir","$subdir","$infile\$infile","_merged.osm.pbf --mw file=m:\Mapsforge\","$basedir","$subdir$infile\$infile.map $bbox tag-conf-file=m:\Mapsforge\tag-mapping-cycle.xml bbox-enlargement=5 map-start-zoom=8 type=hdn";
close fh;

print "$bbox";

The call from batch is like this (a snipped from my makefile)
Code: [Select]
set mapname=austria
set subdir_a=
set basedir_a=europe

set mapdrive=m:
set subdir=%subdir_a%
if "%subdir%" == "" (set subdir=)
set basedir=%basedir_a%
if "%basedir%" == "" (set basedir=)

start "getting clipbounds %mapname%" /wait c:perlperlsitebingpx2poly.pl %mapname% %subdir_a% %basedir_a%

regards
Christian
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Best regards/ Grüsse
Christian
www.openandromaps.org
 

Offline kech61

  • Apprentice of Locus
  • **
  • Posts: 166
  • Thanked: 3 times
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #141 on: August 03, 2012, 10:40:17 »
Hi beboitb,

The Maps for

iran_north
kyrgyzstan
tajikistan
turkmenistan
uzbekistan

are ready for download at
http://http://www.openandromaps.org

Please report if they are usefull
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Best regards/ Grüsse
Christian
www.openandromaps.org
 

Offline jurajs

  • Apprentice of Locus
  • **
  • Posts: 129
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #142 on: August 03, 2012, 15:37:57 »
WOW !
what a improvements have been made last days... i am totally surprised ;-)
this thread is not completely dead... so far so good ;-)

well, kech61.... is there anything useful what should i add or modify to the first post ?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline kech61

  • Apprentice of Locus
  • **
  • Posts: 166
  • Thanked: 3 times
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #143 on: August 03, 2012, 17:11:05 »
Quote from: "jurajs"
well, kech61.... is there anything useful what should i add or modify to the first post ?

Upsss, sorry...
It was not my intention to occupy your thread  :oops:

Well the good news are that the elevation data from viewfinderpanoramas for Eurasia are now complete and Mr.Ferranti announced that he would add correct view3 data for the rest of the world soon.

So we will have reliable elevation data for our Maps and there will be no more need of tools like srtmfill.

Another stunning thread might find your attention : http://https://groups.google.com/forum/?fromgroups#!topic/mapsforge-dev/x54kHlyKiBM
This is really working besides some anoying, minor problems with the JTS-Geometry - as usual.
However, this is only a matter of fine-tuning - the basic problem of rendering coastlines and watertiles is solved.
For bigger maps the data-overhead is an issue and it might be a good idea to start the rendering of the Land_polygons from level 8 on.

The downside for the mapper is the install of the gdal-bindings and the makescripts are a little bit tricky but this is nothing that could hurt the user..

For me this is the "missing link" for the vectormaps to a wider audience...
[attachment=0:mtual7pd]screenshot_2012-08-03_1704.png[/attachment:mtual7pd]
Nice, isnt it  :mrgreen: ?
« Last Edit: August 04, 2012, 09:40:45 by kech61 »
Best regards/ Grüsse
Christian
www.openandromaps.org
 

Offline benoitb

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://ofoofo.net
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #144 on: August 03, 2012, 20:25:14 »
Quote from: "kech61"
Hi beboitb,

The Maps for

iran_north
kyrgyzstan
tajikistan
turkmenistan
uzbekistan

are ready for download at
http://http://www.openandromaps.org

Please report if they are usefull
Thank you Christian, the maps are gorgeous and certainly useful. I've loaded them all on my tablet and am browsing them right now.
With France_alps, Italy, greece and turky they use only 2.7GB total.

I haven't taken the time to try again to build them by myself yet.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline PeterPablo

  • More than Newbie
  • *
  • Posts: 38
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #145 on: August 04, 2012, 15:07:43 »
kech61, could you please be so kind and do the calculations for a Thailand map?
I will try the steps you suggested, but do not know how far I will get...

Thank you very much!

edit: Unfortunately I faild already at running "osmosis". Here I have only a Windows 7 laptop and no Linux. hmmm
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline kech61

  • Apprentice of Locus
  • **
  • Posts: 166
  • Thanked: 3 times
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #146 on: August 08, 2012, 19:30:08 »
Quote from: "PeterPablo"
kech61, could you please be so kind and do the calculations for a Thailand map?

Hi, sorry for the delay, I currently updating all European Maps with the water-tiles.
I will try rendering a Thai map soon.

Edit 10.8.2012: Thailand (+Laos, Combodia, Vietnam) is ready for download from my site.
« Last Edit: August 10, 2012, 08:35:59 by kech61 »
Best regards/ Grüsse
Christian
www.openandromaps.org
 

Offline tommi

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1198
  • Thanked: 1 times
  • Devices: Samsung S7 + S5 + S3 + Nexus7 flo
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #147 on: August 09, 2012, 20:41:41 »
Hi Christian,
great work.
Seems the link for New Zealand points to Israel. Would you fix?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline kech61

  • Apprentice of Locus
  • **
  • Posts: 166
  • Thanked: 3 times
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #148 on: August 10, 2012, 08:34:57 »
Quote from: "tommi62"
Hi Christian,
great work.
Seems the link for New Zealand points to Israel. Would you fix?

Thanks for bringing this to my attention, it's fixed

best regards
Christian
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Best regards/ Grüsse
Christian
www.openandromaps.org
 

Offline PeterPablo

  • More than Newbie
  • *
  • Posts: 38
    • View Profile
Re: [MAPS] - Vector maps (with terrain contour lines)
« Reply #149 on: August 10, 2012, 12:42:10 »
Quote from: "kech61"
Quote from: "PeterPablo"
kech61, could you please be so kind and do the calculations for a Thailand map?

Hi, sorry for the delay, I currently updating all European Maps with the water-tiles.
I will try rendering a Thai map soon.

Edit 10.8.2012: Thailand (+Laos, Combodia, Vietnam) is ready for download from my site.

You are my hero!
I will test it right away. This comes in very handy, since in a couple of days I will travel there. Any things I can/should test, while there? :-)

edit: Unfortunately the file https://docs.google.com/file/d/0BwlgvH_ ... l5TzQ/edit is currently not downloadable. May be an issue with google? I will check it again later..
« Last Edit: January 01, 1970, 01:00:00 by Guest »