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

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

0 Members and 5 Guests are viewing this topic.

benoitb

#135
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.
  •  

kech61

#136
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)

      <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

<!-- 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
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

tommi

#137
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 :)
  •  

kech61

#138
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
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

benoitb

#139
I don't know yet where in China I will go. I still have to study the interesting places I want to visit.

Quotea 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:
<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.
  •  

kech61

#140
Quotea 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.

QuoteCould you share that ?

My script is written in Perl, but keep in mind that this is coded for a special folder structure:
# 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)
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
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

kech61

#141
Hi beboitb,

The Maps for

iran_north
kyrgyzstan
tajikistan
turkmenistan
uzbekistan

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

Please report if they are usefull
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

jurajs

#142
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 ?
  •  

kech61

#143
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 : //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: ?
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

benoitb

#144
Quote from: "kech61"Hi beboitb,

The Maps for

iran_north
kyrgyzstan
tajikistan
turkmenistan
uzbekistan

are ready for download at
//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.
  •  

PeterPablo

#145
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
  •  

kech61

#146
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.
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

tommi

#147
Hi Christian,
great work.
Seems the link for New Zealand points to Israel. Would you fix?
  •  

kech61

#148
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
Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

PeterPablo

#149
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..
  •