diff --git a/Freizeitkarte-Entwicklung/TYP/contrast.txt b/Freizeitkarte-Entwicklung/TYP/contrast.txt index c418a6cd..5dc6db70 100644 --- a/Freizeitkarte-Entwicklung/TYP/contrast.txt +++ b/Freizeitkarte-Entwicklung/TYP/contrast.txt @@ -36,6 +36,7 @@ Type=0x026,4 Type=0x040,4 Type=0x015,5 Type=0x01b,5 +Type=0x022,5 Type=0x02a,5 Type=0x02b,5 Type=0x02f,5 @@ -46,7 +47,6 @@ Type=0x052,5 Type=0x016,6 Type=0x017,6 Type=0x019,6 -Type=0x022,6 Type=0x025,6 Type=0x027,6 Type=0x02d,6 diff --git a/Freizeitkarte-Entwicklung/TYP/freizeit.txt b/Freizeitkarte-Entwicklung/TYP/freizeit.txt index 39a9b1a1..aa754676 100644 --- a/Freizeitkarte-Entwicklung/TYP/freizeit.txt +++ b/Freizeitkarte-Entwicklung/TYP/freizeit.txt @@ -68,6 +68,8 @@ Type=0x040,4 Type=0x015,5 ; vineyard Type=0x01b,5 +; zoo +Type=0x022,5 ; landfill (Deponie, Aufschüttung) Type=0x02a,5 ; heath (Heide) @@ -91,8 +93,6 @@ Type=0x016,6 Type=0x017,6 ; sports_centre Type=0x019,6 -; zoo -Type=0x022,6 ; powerstations (different sizes) Type=0x025,6 ; brownfield, constructions, greenfields @@ -876,7 +876,7 @@ ExtendedLabels=Y FontStyle=NoLabel (invisible) CustomColor=No Xpm="0 0 1 0" -"1 c #33CC99" +"1 c #F0F0D8" [end] diff --git a/Freizeitkarte-Entwicklung/TYP/outdoor.txt b/Freizeitkarte-Entwicklung/TYP/outdoor.txt index a3be1eb7..df2bf3e5 100644 --- a/Freizeitkarte-Entwicklung/TYP/outdoor.txt +++ b/Freizeitkarte-Entwicklung/TYP/outdoor.txt @@ -35,6 +35,7 @@ Type=0x026,4 Type=0x040,4 Type=0x015,5 Type=0x01b,5 +Type=0x022,5 Type=0x023,5 Type=0x02a,5 Type=0x02b,5 @@ -47,7 +48,6 @@ Type=0x005,6 Type=0x016,6 Type=0x017,6 Type=0x019,6 -Type=0x022,6 Type=0x025,6 Type=0x027,6 Type=0x02d,6 diff --git a/Freizeitkarte-Entwicklung/TYP/outdoorc.txt b/Freizeitkarte-Entwicklung/TYP/outdoorc.txt index 79d283a2..447a79ac 100644 --- a/Freizeitkarte-Entwicklung/TYP/outdoorc.txt +++ b/Freizeitkarte-Entwicklung/TYP/outdoorc.txt @@ -36,6 +36,7 @@ Type=0x026,4 Type=0x040,4 Type=0x015,5 Type=0x01b,5 +Type=0x022,5 Type=0x02a,5 Type=0x02b,5 Type=0x02f,5 @@ -46,7 +47,6 @@ Type=0x052,5 Type=0x016,6 Type=0x017,6 Type=0x019,6 -Type=0x022,6 Type=0x025,6 Type=0x027,6 Type=0x02d,6 diff --git a/Freizeitkarte-Entwicklung/TYP/outdoorl.txt b/Freizeitkarte-Entwicklung/TYP/outdoorl.txt index a2bb2a68..a1a60a31 100644 --- a/Freizeitkarte-Entwicklung/TYP/outdoorl.txt +++ b/Freizeitkarte-Entwicklung/TYP/outdoorl.txt @@ -35,6 +35,7 @@ Type=0x026,4 Type=0x040,4 Type=0x015,5 Type=0x01b,5 +Type=0x022,5 Type=0x023,5 Type=0x02a,5 Type=0x02b,5 @@ -47,7 +48,6 @@ Type=0x005,6 Type=0x016,6 Type=0x017,6 Type=0x019,6 -Type=0x022,6 Type=0x025,6 Type=0x027,6 Type=0x02d,6 diff --git a/Freizeitkarte-Entwicklung/TYP/small.txt b/Freizeitkarte-Entwicklung/TYP/small.txt index 1230a015..af7986eb 100644 --- a/Freizeitkarte-Entwicklung/TYP/small.txt +++ b/Freizeitkarte-Entwicklung/TYP/small.txt @@ -36,6 +36,7 @@ Type=0x026,4 Type=0x040,4 Type=0x015,5 Type=0x01b,5 +Type=0x022,5 Type=0x02a,5 Type=0x02b,5 Type=0x02f,5 @@ -46,7 +47,6 @@ Type=0x052,5 Type=0x016,6 Type=0x017,6 Type=0x019,6 -Type=0x022,6 Type=0x025,6 Type=0x027,6 Type=0x02d,6 diff --git a/Freizeitkarte-Entwicklung/licenses/default-elevation.license b/Freizeitkarte-Entwicklung/licenses/default-elevation.license new file mode 100644 index 00000000..5f247d45 --- /dev/null +++ b/Freizeitkarte-Entwicklung/licenses/default-elevation.license @@ -0,0 +1,12 @@ +license_type_strongest=1 +license_type=free for research and private use +license_string_short=U.S. Geological Survey or J. de Ferranti +license_string_medium=U.S. Geological Survey, eros.usgs.gov or viewfinderpanoramas by J. de Ferranti, www.viewfinderpanoramas.org +license_string_long=U.S. Geological Survey (public domain), eros.usgs.gov or viewfinderpanoramas by J. de Ferranti (free for research and private use), www.viewfinderpanoramas.org +data_provider_name=U.S. Geological Survey or viewfinderpanoramas by J. de Ferranti +data_provider_homepage=eros.usgs.gov or www.viewfinderpanoramas.org +title_long_de=Lizenzbedingungen der Höhenlinien +title_long_en=License conditions of the contour data +title_short=Contour data +additional_info_de= +additional_info_en= diff --git a/Freizeitkarte-Entwicklung/licenses/default-freizeitkarte.license b/Freizeitkarte-Entwicklung/licenses/default-freizeitkarte.license new file mode 100644 index 00000000..02d4cb12 --- /dev/null +++ b/Freizeitkarte-Entwicklung/licenses/default-freizeitkarte.license @@ -0,0 +1,15 @@ +license_type=CC BY 3.0 +license_string_short=FZK project +license_string_medium=FZK project (Freizeitkarte), freizeitkarte-osm.de +license_string_long=FZK project (Freizeitkarte), freizeitkarte-osm.de, free for research and private use +data_provider_name=Freizeitkarte +data_provider_homepage=freizeitkarte-osm.de +title_long_de=Lizenzbedingungen der Karte +title_long_en=License conditions of the maps +title_short=Map +additional_info_de=Die hier verfügbaren Karten stellen ein aus den Karten- und Höhendaten abgeleitetes Werk (produced work) dar. Die Karten können für private oder wissenschaftliche Zwecke frei (uneingeschränkt) genutzt werden.\n +additional_info_en=The available maps are a derived work from map and elevation data. The maps can be used free for personal or academic purposes.\n +use_de=Nutzung des Kartenmaterial:\nDie Nutzung des Kartenmaterials erfolgt auf eigene Gefahr. Das Kartenmaterial und oder das Routing kann Fehler enthalten oder unzureichend sein. Die Ersteller dieser Karten übernehmen keinerlei Gewährleistung oder Haftung für Schäden die direkt oder indirekt durch die Nutzung des Kartenmaterial entstehen.\n +use_en=Use of the maps:\nThe use of maps is at your own risk. The map data and / or the routing may contain errors or may be insufficient.\nThe creators of these maps are not liable for any damage resulting directly or indirectly from the use of the maps.\n +help_de=Deine Mithilfe ist erwünscht:\nHilf mit die OpenStreetMap-Quelldaten dieser Karte, und damit auch diese Themenkarte, zu verbessern. Fehlende oder inkorrekte Kartendaten kannst auch du auf OpenStreetMap eintragen oder korrigieren. Dies geht viel leichter als du vielleicht glaubst. Melde dich hierzu auf OpenStreetMap an und versuche es einfach mal. Alle anderen Kartennutzer können so von deinem Wissen profitieren.\nAuch Information über Defekte, die dir bei der Nutzung dieser Karte auffallen, sind hilfreich - ebenso Änderungs- oder Verbesserungsvorschläge.\nDanke für deine Unterstützung.\n +help_en=Your help is welcome:\nYou can help to improve the OpenStreetMap source data, and therefore also this map. If something is missing or wrong in the source data you can add or correct that on OpenStreetMap. That's easier as you might think. Get registered on OpenStreetMap and just try it out. This way everyone can profit from your knowledge.\nInformation about defects found while using this map are also helpful. Also ideas about changes and improvments are very welcome.\nMany thanks for your support.\n diff --git a/Freizeitkarte-Entwicklung/licenses/default-osm.license b/Freizeitkarte-Entwicklung/licenses/default-osm.license new file mode 100644 index 00000000..15901ee2 --- /dev/null +++ b/Freizeitkarte-Entwicklung/licenses/default-osm.license @@ -0,0 +1,11 @@ +license_type=ODbl +license_string_short=OSM contributors +license_string_medium=OSM contributors, www.openstreetmap.org +license_string_long=OSM contributors, www.openstreetmap.org, ODbl +data_provider_name=OpenStreetMap +data_provider_homepage=www.openstreetmap.org +title_long_de=Lizenzbedingungen der Kartendaten +title_long_en=License conditions of the map data +title_short=Map data +additional_info_de=Die dargestellten Kartenobjekte basieren auf den Daten des OpenStreetMap-Projektes. OpenStreetMap ist eine freie, editierbare Karte der gesamten Welt, die von Menschen wie dir erstellt wird. OpenStreetMap ermöglicht es geographische Daten gemeinschaftlich von überall auf der Welt anzuschauen und zu bearbeiten.\n +additional_info_en=All maps are based on data from the OpenStreetMap project. OpenStreetMap is a free editable map of the whole world that is created by people like you. OpenStreetMap allows geographic data to look at collaborative way from anywhere in the world and edit it.\n diff --git a/Freizeitkarte-Entwicklung/mt.pl b/Freizeitkarte-Entwicklung/mt.pl index 775e5c7d..2c50d82d 100755 --- a/Freizeitkarte-Entwicklung/mt.pl +++ b/Freizeitkarte-Entwicklung/mt.pl @@ -22,7 +22,8 @@ use File::Basename; use Getopt::Long; use Data::Dumper; -use POSIX qw(uname); +use POSIX qw(uname setlocale locale_h LC_ALL LC_CTYPE); +use Encode qw(is_utf8 decode encode ); my @actions = ( # Normal User Actions for maps @@ -36,7 +37,7 @@ [ 'split', '4. split map data into tiles' , '-' ], [ 'build', '5. build map files (img, mdx, tdb)' , '-' ], [ 'gmap', '6. create gmap file (for BaseCamp OS X, Windows)' , '-' ], - [ 'nsis', '6. create nsis installer (for BaseCamp Windows)' , '-' ], + [ 'nsis', '6. create nsis installer (full installer for Windows)' ,'-' ], [ 'gmapsupp', '6. create gmapsupp image (for GPS receiver)' , '-' ], [ 'imagedir', '6. create image directory (e.g. for QLandkarte)' , '-' ], @@ -46,10 +47,9 @@ [ 'cfg', 'A. create individual cfg file' , 'optional' ], [ 'typ', 'B. create individual typ file from master' , 'optional' ], [ 'compiletyp', 'B. compile TYP files out of text files' , 'optional' ], - [ 'nsicfg', 'C. create nsi configuration file (for NSIS compiler)' , 'optional' ], - [ 'nsiexe', 'C. create nsi installer exe (via NSIS compiler)' , 'optional' ], - [ 'nsis2', 'C. create nsis installer (GMAP for BaseCamp Windows)' , 'optional' ], + [ 'nsisgmap', 'C. create nsis installer (GMAP for BaseCamp Windows)' , 'optional' ], [ 'gmap2', 'D. create gmap file (for BaseCamp OS X, Windows)' , 'optional' ], + [ 'gmap3', 'D. create gmap file (for BaseCamp OS X, Windows)' , 'optional' ], [ 'bim', 'E1.build images: create, fetch_*, join, split, build' , 'optional' ], [ 'bam', 'E2.build all maps: gmap, nsis, gmapsupp, imagedir' , 'optional' ], [ 'pmd', 'F1.Prepare Map Data: create, fetch_*, join, split' , 'optional' ], @@ -103,6 +103,13 @@ 'ru' => '1251' , ); +# Relation from (windows) codepage to isocode +my %cpisocode = ( + '1250' => 'iso-8859-2' , + '1251' => 'iso-8859-5' , + '1252' => 'iso-8859-1' , + ); + # Define the download base URLs for the Elevation Data my %elevationbaseurl = ( 'ele10' => "http://develop.freizeitkarte-osm.de/ele_10_100_200", @@ -126,7 +133,60 @@ 'http://www.navmaps.eu/boundaries?task=weblink.go&id=2', ); - +# Licenses - Default values +# -------------------------- +# (encode decode sequence needed as mt.pl is in cp1252) +# Freizeitkarte: static but license type can be overwritten by more relevant value from elevation data + +#my %lic_fzk = ( +# 'license_type' => encode('utf8', decode('iso-8859-1','CC BY 3.0')) , +## 'license_string_short' => encode('utf8', decode('iso-8859-1','FZK project 123456')) , +# 'license_string_short' => encode('utf8', decode('iso-8859-1','FZK project äöüéèê')) , +# 'license_string_medium' => encode('utf8', decode('iso-8859-1','FZK project (Freizeitkarte), freizeitkarte-osm.de')) , +# 'license_string_long' => encode('utf8', decode('iso-8859-1','FZK project (Freizeitkarte), freizeitkarte-osm.de, free for research and private use' )), +# 'data_provider_name' => encode('utf8', decode('iso-8859-1','Freizeitkarte' )), +# 'data_provider_homepage' => encode('utf8', decode('iso-8859-1','freizeitkarte-osm.de' )), +# 'additional_info_de' => encode('utf8', decode('iso-8859-1',"Die hier verfügbaren Karten stellen ein aus den Karten- und Höhendaten abgeleitetes Werk (produced work) dar. Die Karten können für private oder wissenschaftliche Zwecke frei (uneingeschränkt) genutzt werden.\n")) , +# 'additional_info_en' => encode('utf8', decode('iso-8859-1',"The available maps are a derived work from map and elevation data. The maps can be used free for personal or academic purposes.\n")) , +# 'use_de' => encode('utf8', decode('iso-8859-1',"Nutzung des Kartenmaterial:\nDie Nutzung des Kartenmaterials erfolgt auf eigene Gefahr. Das Kartenmaterial und oder das Routing kann Fehler enthalten oder unzureichend sein. Die Ersteller dieser Karten übernehmen keinerlei Gewährleistung oder Haftung für Schäden die direkt oder indirekt durch die Nutzung des Kartenmaterial entstehen.\n")), +# 'use_en' => encode('utf8', decode('iso-8859-1',"Use of the maps:\nThe use of maps is at your own risk. The map data and / or the routing may contain errors or may be insufficient.\nThe creators of these maps are not liable for any damage resulting directly or indirectly from the use of the maps.\n")) , +# 'help_de' => encode('utf8', decode('iso-8859-1',"Deine Mithilfe ist erwünscht:\nHilf mit die OpenStreetMap-Quelldaten dieser Karte, und damit auch diese Themenkarte, zu verbessern. Fehlende oder inkorrekte Kartendaten kannst auch du auf OpenStreetMap eintragen oder korrigieren. Dies geht viel leichter als du vielleicht glaubst. Melde dich hierzu auf OpenStreetMap an und versuche es einfach mal. Alle anderen Kartennutzer können so von deinem Wissen profitieren.\nAuch Information über Defekte, die dir bei der Nutzung dieser Karte auffallen, sind hilfreich - ebenso Änderungs- oder Verbesserungsvorschläge.\nDanke für deine Unterstützung.\n ")), +# 'help_en' => encode('utf8', decode('iso-8859-1',"Your help is welcome:\nYou can help to improve the OpenStreetMap source data, and therefore also this map. If something is missing or wrong in the source data you can add or correct that on OpenStreetMap. That's easier as you might think. Get registered on OpenStreetMap and just try it out. This way everyone can profit from your knowledge.\nInformation about defects found while using this map are also helpful. Also ideas about changes and improvments are very welcome.\nMany thanks for your support.\n")), +# ); +my %lic_fzk = (); + +# OSM data: static +#my %lic_osm = ( +# 'license_type' => encode('utf8', decode('iso-8859-1','ODbl')) , +## 'license_string_short' => encode('utf8', decode('iso-8859-1','OSM contributors 123456')) , +# 'license_string_short' => encode('utf8', decode('iso-8859-1','OSM contributors äöüéèê')) , +# 'license_string_medium' => encode('utf8', decode('iso-8859-1','OSM contributors, www.openstreetmap.org')) , +# 'license_string_long' => encode('utf8', decode('iso-8859-1','OSM contributors, www.openstreetmap.org, ODbl')) , +# 'data_provider_name' => encode('utf8', decode('iso-8859-1','OpenStreetMap')) , +# 'data_provider_homepage' => encode('utf8', decode('iso-8859-1','www.openstreetmap.org')) , +# 'additional_info_de' => encode('utf8', decode('iso-8859-1',"Die dargestellten Kartenobjekte basieren auf den Daten des OpenStreetMap-Projektes. OpenStreetMap ist eine freie, editierbare Karte der gesamten Welt, die von Menschen wie dir erstellt wird. OpenStreetMap ermöglicht es geographische Daten gemeinschaftlich von überall auf der Welt anzuschauen und zu bearbeiten.\n")) , +# 'additional_info_en' => encode('utf8', decode('iso-8859-1',"All maps are based on data from the OpenStreetMap project. OpenStreetMap is a free editable map of the whole world that is created by people like you. OpenStreetMap allows geographic data to look at collaborative way from anywhere in the world and edit it.\n")) , +# ); +my %lic_osm = (); + +# Elevation Data: default for viewfinderpanorama, can be overridden by sidefile to Elevation PBF: Hoehendaten_Freizeitkarte_SOMETHING.osm.pbf.license +#my %lic_ele = ( +# 'license_type_strongest' => "1", +# 'license_type' => encode('utf8', decode('iso-8859-1','free for research and private use')) , +# 'license_string_short' => encode('utf8', decode('iso-8859-1','U.S. Geological Survey or J. de Ferranti' )), +# 'license_string_medium' => encode('utf8', decode('iso-8859-1','U.S. Geological Survey, eros.usgs.gov or viewfinderpanoramas by J. de Ferranti, www.viewfinderpanoramas.org')) , +# 'license_string_long' => encode('utf8', decode('iso-8859-1','U.S. Geological Survey (public domain), eros.usgs.gov or viewfinderpanoramas by J. de Ferranti (free for research and private use), www.viewfinderpanoramas.org')) , +# 'data_provider_name' => encode('utf8', decode('iso-8859-1','U.S. Geological Survey or viewfinderpanoramas by J. de Ferranti')) , +# 'data_provider_homepage' => encode('utf8', decode('iso-8859-1','eros.usgs.gov or www.viewfinderpanoramas.org')) , +# 'additional_info_de' => encode('utf8', decode('iso-8859-1',"")) , +# 'additional_info_en' => encode('utf8', decode('iso-8859-1',"")) , +# ); +my %lic_ele = (); + +# Read the license default values +read_default_licenses (); + +# FZK maps: static my @maps = ( # ID, 'Karte', 'URL der Quelle', 'Code', 'language', 'oldName', 'Type', 'Parent' @@ -239,6 +299,7 @@ [ 6068, 'Freizeitkarte_BOL', 'http://download.geofabrik.de/south-america/bolivia-latest.osm.pbf', 'BOL', 'en', 'no_old_name', 3, 'NA' ], [ 6076, 'Freizeitkarte_BRA', 'http://download.geofabrik.de/south-america/brazil-latest.osm.pbf', 'BRA', 'en', 'no_old_name', 3, 'NA' ], # [ 6124, 'Freizeitkarte_CAN', 'http://download.geofabrik.de/north-america/canada-latest.osm.pbf', 'CAN', 'en', 'no_old_name', 3, 'NA' ], + [ 6132, 'Freizeitkarte_CPV', 'http://download.geofabrik.de/africa/cape-verde-latest.osm.pbf', 'CPV', 'en', 'no_old_name', 3, 'NA' ], [ 6144, 'Freizeitkarte_LKA', 'http://download.geofabrik.de/asia/sri-lanka-latest.osm.pbf', 'LKA', 'en', 'no_old_name', 3, 'NA' ], [ 6152, 'Freizeitkarte_CHL', 'http://download.geofabrik.de/south-america/chile-latest.osm.pbf', 'CHL', 'en', 'no_old_name', 3, 'NA' ], [ 6170, 'Freizeitkarte_COL', 'http://download.geofabrik.de/south-america/colombia-latest.osm.pbf', 'COL', 'en', 'no_old_name', 3, 'NA' ], @@ -254,6 +315,7 @@ [ 6704, 'Freizeitkarte_VNM', 'http://download.geofabrik.de/asia/vietnam-latest.osm.pbf', 'VNM', 'en', 'no_old_name', 3, 'NA' ], [ 6740, 'Freizeitkarte_SUR', 'http://download.geofabrik.de/south-america/suriname-latest.osm.pbf', 'SUR', 'en', 'no_old_name', 3, 'NA' ], [ 6858, 'Freizeitkarte_URY', 'http://download.geofabrik.de/south-america/uruguay-latest.osm.pbf', 'URY', 'en', 'no_old_name', 3, 'NA' ], + [ 6710, 'Freizeitkarte_ZAF', 'http://download.geofabrik.de/africa/south-africa-and-lesotho-latest.osm.pbf', 'ZAF', 'en', 'no_old_name', 3, 'NA' ], # Andere Regionen # [ -1, 'Andere Regionen', 'URL', 'Code', 'Language', 'oldName', 'Type', 'Parent' ], @@ -431,6 +493,7 @@ my $mapcode = $EMPTY; my $maplang = $EMPTY; my $mapcodepage= $EMPTY; +my $mapisolang = $EMPTY; my $maptype = $EMPTY; my $mapparent = $EMPTY; my $langdesc = $EMPTY; @@ -610,9 +673,11 @@ # Check if the user did choose unicode, else set the codepage to the codepage of the choosen language if ( $unicode ) { $mapcodepage = 65001; + $mapisolang = 'utf-8'; } else { $mapcodepage = $langcodepage{$maplang}; + $mapisolang = $cpisocode{$mapcodepage}; } @@ -727,6 +792,7 @@ split_mapdata (); } elsif ( $actionname eq 'build' ) { + update_ele_license (); create_cfgfile (); create_typtranslations (); compile_typfiles (); @@ -740,26 +806,29 @@ create_gmapfile (); } elsif ( $actionname eq 'nsis' ) { + update_ele_license (); create_typfile (); - create_nsis_nsifile (); - create_nsis_exefile (); - create_nsis_nsifile2 (); - create_nsis_exefile2 (); + create_nsis_nsi_full (); + create_nsis_exe_full (); } -elsif ( $actionname eq 'nsis2' ) { - create_nsis_nsifile2 (); - create_nsis_exefile2 (); +elsif ( $actionname eq 'nsisgmap' ) { + update_ele_license (); + create_nsis_nsi_gmap (); + create_nsis_exe_gmap (); } elsif ( $actionname eq 'gmapsupp' ) { + update_ele_license (); create_typfile (); create_gmapsuppfile (); } elsif ( $actionname eq 'imagedir' ) { + update_ele_license (); create_typfile (); create_image_directory (); } elsif ( $actionname eq 'cfg' ) { + update_ele_license (); create_cfgfile (); } elsif ( $actionname eq 'typ' ) { @@ -771,18 +840,16 @@ create_typtranslations (); compile_typfiles (); } -elsif ( $actionname eq 'nsicfg' ) { - create_nsis_nsifile (); - create_nsis_nsifile2 (); -} -elsif ( $actionname eq 'nsiexe' ) { - create_nsis_exefile (); - create_nsis_exefile2 (); -} elsif ( $actionname eq 'gmap2' ) { + update_ele_license (); create_typfile (); create_gmap2file (); } +elsif ( $actionname eq 'gmap3' ) { + update_ele_license (); + create_typfile (); + create_gmap3 (); +} elsif ( $actionname eq 'bim' ) { purge_dirs (); create_dirs (); @@ -797,6 +864,7 @@ check_osmid (); join_mapdata (); split_mapdata (); + update_ele_license (); create_cfgfile (); create_typtranslations (); compile_typfiles (); @@ -810,10 +878,11 @@ create_image_directory (); create_gmapfile (); create_gmapsuppfile (); - create_nsis_nsifile (); - create_nsis_exefile (); - create_nsis_nsifile2 (); - create_nsis_exefile2 (); + update_ele_license (); + create_nsis_nsi_gmap (); + create_nsis_exe_gmap (); + create_nsis_nsi_full (); + create_nsis_exe_full (); } elsif ( $actionname eq 'pmd' ) { purge_dirs (); @@ -831,6 +900,7 @@ split_mapdata (); } elsif ( $actionname eq 'bml' ) { + update_ele_license (); create_cfgfile (); create_typtranslations (); compile_typfiles (); @@ -841,10 +911,10 @@ create_image_directory (); create_gmapfile (); create_gmapsuppfile (); - create_nsis_nsifile (); - create_nsis_exefile (); - create_nsis_nsifile2 (); - create_nsis_exefile2 (); + create_nsis_nsi_gmap (); + create_nsis_exe_gmap (); + create_nsis_nsi_full (); + create_nsis_exe_full (); } elsif ( $actionname eq 'zip' ) { zip_maps (); @@ -1241,8 +1311,141 @@ sub fetch_eledata { die ( "Please check this file concerning error hints (eg. communications errors).\n" ); return ( 1 ); } + + # Try to fetch the additional files *.info *.license + download_url( "$eleurl.info", "$filename.info"); + download_url( "$eleurl.license", "$filename.license"); + + return; +} + + +# ----------------------------------------- +# Read a given local licensefile into hash +# ----------------------------------------- +sub read_licensefile { + + # Argument handed over + my $licensefile = shift; + + # Some needed local variables + my $line; + my @alllines; + my %tmphash = (); + my $tmphash_key; + my $tmphash_value; + + # Let's try to open + if ( open IN, "<:encoding(UTF-8)", $licensefile ) { + + binmode( IN, ":encoding(UTF-8)"); + + + while ( ) { + # Get the line + $line = $_; + + # Only look at lines with '=' somewhere in the middle + next unless $line =~ /^.*=.*+/; + + # Get rid of leading and trailing whitespace + $line =~ s/^\s+//; + $line =~ s/\s+$//; + + # Put result in the prepared input array + chomp ( $line ); + push ( @alllines, $line ); + + } + + # Close the file again + close IN; + + # run through the array and fill the tmphash + foreach $line ( @alllines ) { + # create the hashtable + $line =~ /^(.*)=(.*)$/; + $tmphash{ $1 } = join( "\n", split ( /\\n/, $2 )); + + } + + } + + return ( %tmphash ); + +} + +# ----------------------------------------- +# Read the default license information +# ----------------------------------------- +sub read_default_licenses { + + # Set filenames + my $fzk_licensefile = "licenses/default-freizeitkarte.license"; + my $osm_licensefile = "licenses/default-osm.license"; + my $ele_licensefile = "licenses/default-elevation.license"; + + # Handle fzk license file + my %lic_tmphash = (); + %lic_tmphash = read_licensefile($fzk_licensefile); + foreach my $hashkey ( sort ( keys %lic_tmphash ) ) { + $lic_fzk{$hashkey} = $lic_tmphash{$hashkey}; + } + + # Handle osm license file + %lic_tmphash = (); + %lic_tmphash = read_licensefile($osm_licensefile); + foreach my $hashkey ( sort ( keys %lic_tmphash ) ) { + $lic_osm{$hashkey} = $lic_tmphash{$hashkey}; + } + + # Handle ele license file + %lic_tmphash = (); + %lic_tmphash = read_licensefile($ele_licensefile); + foreach my $hashkey ( sort ( keys %lic_tmphash ) ) { + $lic_ele{$hashkey} = $lic_tmphash{$hashkey}; + } + return; + +} + +# ----------------------------------------- +# Try to update the license about elevation +# ----------------------------------------- +sub update_ele_license { + + # Argument handed over + my $ele_licensefile = "$WORKDIR/Hoehendaten_$mapname.osm.pbf.license"; + + # Some needed local variables + my %ele_tmphash = (); + + # Get eventually overriding values + %ele_tmphash = read_licensefile($ele_licensefile); + + # In case we have updates + if ( keys %ele_tmphash > 0 ) { + + # Set strongest flag to 0 + $lic_ele{license_type_strongest} = ""; + + # Override (or set) found values + foreach my $hashkey ( sort ( keys %ele_tmphash ) ) { + $lic_ele{$hashkey} = $ele_tmphash{$hashkey}; + } + + } + + # If license type of ele is strongest, then override fzk license type + if ( $lic_ele{license_type_strongest}) { + $lic_fzk{license_type} = $lic_ele{license_type}; + } + + + return; + } @@ -1564,6 +1767,199 @@ sub split_mapdata { } +# ----------------------------------------- +# Create the map specific license file needed by mkgmap +# ----------------------------------------- +sub create_licensefile { + + # Initialize some variables + my $filename = "$WORKDIRLANG/$mapname.license"; + + # Dump some output + printf { *STDOUT } ( "\n" ); + printf { *STDOUT } ( "Creating $filename ...\n" ); + + # Try to open the file in destination codepage (isocode) +# open ( my $fh, "+>:encoding($mapisolang)", $filename ) or die ( "Can't open $filename: $OS_ERROR\n" ); +# binmode( $fh, ":encoding($mapisolang)"); + open ( my $fh, "+>:encoding(UTF-8)", $filename ) or die ( "Can't open $filename: $OS_ERROR\n" ); + binmode( $fh, ":encoding(UTF-8)"); + + # Empty line (copyright-file issue) + printf { $fh } ("\n" ); + + # New: 3 line of licenses + printf { $fh } ("(c) %s: %s (%s)\n", + $lic_fzk{'title_short'}, + $lic_fzk{'license_string_short'}, + $lic_fzk{'license_type'} + ); + printf { $fh } ("(c) %s: %s (%s)\n", + $lic_osm{'title_short'}, + $lic_osm{'license_string_short'}, + $lic_osm{'license_type'} + ); + printf { $fh } ("(c) %s: %s (%s)\n", + $lic_ele{'title_short'}, + $lic_ele{'license_string_short'}, + $lic_ele{'license_type'} + ); + + # Try to close the file again + close ( $fh ) or die ( "Can't close $filename: $OS_ERROR\n" ); + + printf { *STDOUT } ( "Done\n" ); + + + return; +} + + +# ----------------------------------------- +# Create the map specific license file needed by nsis +# ----------------------------------------- +sub create_licensefile_nsis { + + # Initialize some variables + my $filename_de = "$WORKDIRLANG/$mapname.nsis.license.de"; + my $filename_en = "$WORKDIRLANG/$mapname.nsis.license.en"; + # Reverse file assignement in order to check German Umlaute for EN Map like LUX (for tests) + #my $filename_de = "$WORKDIRLANG/$mapname.nsis.license.en"; + #my $filename_en = "$WORKDIRLANG/$mapname.nsis.license.de"; + + # Dump some output + printf { *STDOUT } ( "\n" ); + + # Try to open the files for writing (always in Latin1 as we support only german and english in the installer) + printf { *STDOUT } ( "Creating $filename_de ...\n" ); + open ( my $fh_de, '+>', $filename_de ) or die ( "Can't open $filename_de: $OS_ERROR\n" ); + #open ( my $fh_de, '+>:encoding(iso-8859-1)', $filename_de ) or die ( "Can't open $filename_de: $OS_ERROR\n" ); + #binmode( $fh_de, ":encoding(iso-8859-1)"); + +printf { *STDOUT } ( "Creating $filename_en ...\n" ); + open ( my $fh_en, '+>', $filename_en ) or die ( "Can't open $filename_en: $OS_ERROR\n" ); + #open ( my $fh_en, '+>:encoding(iso-8859-1)', $filename_en ) or die ( "Can't open $filename_en: $OS_ERROR\n" ); + #binmode( $fh_en, ":encoding(iso-8859-1)"); + + + # DE: Use + printf { $fh_de } + ( "%s\n\n", + $lic_fzk{'use_de'} ); + # EN: Use + printf { $fh_en } + ( "%s\n\n", + $lic_fzk{'use_en'} ); + + # DE: Help + printf { $fh_de } + ( "%s\n\n", + $lic_fzk{'help_de'} ); + # EN: Help + printf { $fh_en } + ( "%s\n\n", + $lic_fzk{'help_en'} ); + + # DE: License map + printf { $fh_de } + ( "%s:\n" + . "Lizenztyp: %s\n" + . "Von: %s\n" + . "Name: %s\n" + . "Webseite: %s\n" + . "%s\n\n", + $lic_fzk{'title_long_de'}, + $lic_fzk{'license_type'}, + $lic_fzk{'license_string_short'}, + $lic_fzk{'data_provider_name'}, + $lic_fzk{'data_provider_homepage'}, + $lic_fzk{'additional_info_de'} + ); + + # EN: License map + printf { $fh_en } + ( "%s:\n" + . "Licensetype: %s\n" + . "By: %s\n" + . "Name: %s\n" + . "Link: %s\n" + . "%s\n\n", + $lic_fzk{'title_long_en'}, + $lic_fzk{'license_type'}, + $lic_fzk{'license_string_short'}, + $lic_fzk{'data_provider_name'}, + $lic_fzk{'data_provider_homepage'}, + $lic_fzk{'additional_info_en'} + ); + + # DE: License OSM + printf { $fh_de } + ( "%s:\n" + . "Lizenztyp: %s\n" + . "Von: %s\n" + . "Name: %s\n" + . "Webseite: %s\n" + . "%s\n\n", + $lic_osm{'title_long_de'}, + $lic_osm{'license_type'}, + $lic_osm{'license_string_short'}, + $lic_osm{'data_provider_name'}, + $lic_osm{'data_provider_homepage'}, + $lic_osm{'additional_info_de'} ); + # EN: License OSM + printf { $fh_en } + ( "%s:\n" + . "Licensetype: %s\n" + . "By: %s\n" + . "Name: %s\n" + . "Link: %s\n" + . "%s\n\n", + $lic_osm{'title_long_de'}, + $lic_osm{'license_type'}, + $lic_osm{'license_string_short'}, + $lic_osm{'data_provider_name'}, + $lic_osm{'data_provider_homepage'}, + $lic_osm{'additional_info_en'} ); + + # DE: License Contour data + printf { $fh_de } + ( "%s:\n" + . "Lizenztyp: %s\n" + . "Von: %s\n" + . "Name: %s\n" + . "Webseite: %s\n" + . "%s\n\n", + $lic_ele{'title_long_de'}, + $lic_ele{'license_type'}, + $lic_ele{'license_string_short'}, + $lic_ele{'data_provider_name'}, + $lic_ele{'data_provider_homepage'}, + $lic_ele{'additional_info_de'} ); + # EN: License Contour data + printf { $fh_en } + ( "%s:\n" + . "Licensetype: %s\n" + . "By: %s\n" + . "Name: %s\n" + . "Link: %s\n" + . "%s\n\n", + $lic_ele{'title_long_en'}, + $lic_ele{'license_type'}, + $lic_ele{'license_string_short'}, + $lic_ele{'data_provider_name'}, + $lic_ele{'data_provider_homepage'}, + $lic_ele{'additional_info_en'} ); + + # Try to close the files again + close ( $fh_de ) or die ( "Can't close $filename_de: $OS_ERROR\n" ); + close ( $fh_en ) or die ( "Can't close $filename_en: $OS_ERROR\n" ); + + printf { *STDOUT } ( "Done\n" ); + + return; +} + + # ----------------------------------------- # Create the map specific CFG file needed by mkgmap # - Note that option order is significant. @@ -1571,12 +1967,6 @@ sub split_mapdata { # ----------------------------------------- sub create_cfgfile { - # Disabled, handled in sub - ## Initialize some variables - #my $filename_source = "$WORKDIR/$mapname.osm.pbf"; - #my $filename_source_mtime = ( stat ( $filename_source ) )[ 9 ]; - #my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime ( $filename_source_mtime ); - # Initialize some variables my $filename = "$WORKDIRLANG/$mapname.cfg"; @@ -1585,7 +1975,9 @@ sub create_cfgfile { printf { *STDOUT } ( "Creating $filename ...\n" ); # Try to open the file - open ( my $fh, '+>', $filename ) or die ( "Can't open $filename: $OS_ERROR\n" ); +# open ( my $fh, '+>', $filename ) or die ( "Can't open $filename: $OS_ERROR\n" ); + open ( my $fh, "+>:encoding(UTF-8)", $filename ) or die ( "Can't open $filename: $OS_ERROR\n" ); + binmode( $fh, ":encoding(UTF-8)"); # Write the needed options into the file printf { $fh } @@ -1658,6 +2050,14 @@ sub create_cfgfile { printf { $fh } ( "#name-tag-list=name:de,name:en,int_name,name\n" ); } + + printf { $fh } + ( "\n" + . "# --lower-case\n" + . "# Allow labels to contain lower case letters.\n" + . "# Note that most or all Garmin devices are not able to display\n" + . "# lower case letters at an angle so this option is not generally useful.\n" + . "lower-case\n" ); printf { $fh } ( "\n# Address search options:\n" ); printf { $fh } ( "# ----------------------\n" ); @@ -1827,7 +2227,17 @@ sub create_cfgfile { ( "\n" . "# --copyright-message=note\n" . "# Specify a copyright message for files that do not contain one.\n" - . "copyright-message = \"Map: FZK project; Data: OSM contributors, U.S.G.S, de Ferranti\"\n" ); + . "#copyright-message = \"Map: %s; Map Data: %s; Contour Data: %s\"\n", + $lic_fzk{'license_string_short'}, $lic_osm{'license_string_short'}, $lic_ele{'license_string_short'} ); + + printf { $fh } + ( "\n" + . "# --copyright-file=file\n" + . "# Specify copyright messages from a file.\n" + . "# Note that the first copyright message is not displayed on a device, but is shown in BaseCamp.\n" + . "# The copyright file must include at least two lines.\n" + . "copyright-file=%s.license\n", + $mapname ); printf { $fh } ( "\n" @@ -1835,7 +2245,8 @@ sub create_cfgfile { . "# Specify a file which content will be added as license. Every\n" . "# line is one entry. All entrys of all maps will be merged, unified\n" . "# and shown in random order.\n" - . "license-file=license.txt\n" ); + . "license-file=%s.license\n", + $mapname ); printf { $fh } ( "\n# Optimization options:\n" ); printf { $fh } ( "# --------------------\n" ); @@ -2032,6 +2443,7 @@ sub create_alltypfile_languages { # Get the actual language code like 'en' $typfilelangcode = @$actuallanguage [$LANGCODE]; + $mapcodepage = $langcodepage{$typfilelangcode}; # Create some output printf { *STDOUT } ( "\nHandling TYP files: $typfilelangcode\n" ); @@ -2255,18 +2667,6 @@ sub create_typtranslations { } } - ## FIX for Russia: cyrillic in Typ Source file gives problem with mkgmap typcompiler - ## Overwrite the array typfilelangcode and hash typfilestringindex again - ## (actually it works with 'special build'.... for cp1251 we empty the string again, needs to be implemented nicely lateron -# if ( $langcode eq 'ru' ) { -# @typfilelangcode = (); -# %typfilestringindex = (); -# $stringindex = 1; -# push ( @typfilelangcode, $typlanguages{ 'ru' } ); -# $typfilestringindex{ $typlanguages{ 'ru' } } = $stringindex; -# $stringindex++; -# } -# ## ENDFIX (can be deleted again/or adapted for codepage1251 only if mkgmap compiles properly) # Fill the hash with the languages and the stringindex (properly sorted) $stringindex = 1; @@ -2520,16 +2920,8 @@ sub compile_typfiles { for my $thistypfile ( @typfilelist ) { # run that file through the compiler - $command = "java -Xmx" . $javaheapsize . "M" . " -jar $BASEPATH/tools/mkgmap/mkgmap.jar $max_jobs --product-id=1 --family-id=$mapid $thistypfile"; - - ## FIX for Russia/Cyrillic... actually mkgmap doesn't compile UTF8 files containing cyrillic strings... let's choose english only - ## Just to let everything run through properly for the moment -# if ( $maplang eq 'ru' ) { -# $command = "java -Xmx" . $javaheapsize . "M" . " -jar $BASEPATH/tools/mkgmap/mkgmap.jar $max_jobs --code-page=$langcodepage{'en'} --product-id=1 --family-id=$mapid $thistypfile"; -# } - ## ENDFIX (can be deleted if problem with mkgmap is fixed - - + $command = "java -Xmx" . $javaheapsize . "M" . " -Dfile.encoding=UTF-8 -jar $BASEPATH/tools/mkgmap/mkgmap.jar $max_jobs --code-page=$mapcodepage --product-id=1 --family-id=$mapid $thistypfile"; + # Run the compiler process_command ( $command ); @@ -2727,12 +3119,15 @@ sub build_map { # change to directory WORKDIR LANG chdir "$WORKDIRLANG"; + + # Try to update license info for elevation data + update_ele_license; - # copy the licence file - copy ( "$BASEPATH/license.txt", "license.txt" ) or die ( "copy() failed: $!\n" ); - + # create the licence file + create_licensefile; + # run mkgmap to build the map from the OSM data (-Dlog.config=logging.properties) (with checking style files first with --check-styles) - $command = "java -Xmx" . $javaheapsize . "M" . " -jar $BASEPATH/tools/mkgmap/mkgmap.jar $max_jobs -c $mapname.cfg --check-styles"; + $command = "java -Xmx" . $javaheapsize . "M" . " -Dfile.encoding=UTF-8 -jar $BASEPATH/tools/mkgmap/mkgmap.jar $max_jobs -c $mapname.cfg --check-styles"; process_command ( $command ); # Check Return Value @@ -2751,8 +3146,8 @@ sub build_map { # ----------------------------------------- sub create_gmap2file { - if ( $OSNAME ne 'darwin' ) { - printf { *STDERR } ( "\nError: Function only on OS X possible.\n" ); + if ( $OSNAME ne 'darwin' and $OSNAME ne 'linux') { + printf { *STDERR } ( "\nError: Function only on OS X and linux possible.\n" ); return; } @@ -2780,7 +3175,7 @@ sub create_gmap2file { # Create the NSI file needed for compiling the Windows Installer # (old style installer including ImageDir Set) # ----------------------------------------- -sub create_nsis_nsifile { +sub create_nsis_nsi_full { # Jump into the correct directory chdir "$WORKDIRLANG"; @@ -2802,13 +3197,6 @@ sub create_nsis_nsifile { printf { *STDOUT } ( "IMG-File = $imgfile\n" ); } - # Disabled; handled in sub - ## Create and show the Release Number (creation out of date) - ## example: 11.07 = year.month - #my $filename_source = "$WORKDIR/" . $mapname . ".osm.pbf"; - #my $filename_source_mtime = ( stat ( $filename_source ) )[ 9 ]; - # Disabled, handled by sub - #my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime ( $filename_source_mtime ); printf { *STDOUT } ( "Ausgabe %s\n", $releasestring ); # Create output @@ -2930,8 +3318,8 @@ sub create_nsis_nsifile { printf { $fh } ( "LangString INWpText \${LANG_ENGLISH} \"This Wizard will be guiding you through the installation of \${KARTEN_BESCHREIBUNG} \${KARTEN_AUSGABE} begleiten.\$\\n\$\\nBefore installation BaseCamp must be closed for allowing installation of the map data.\$\\n\$\\nChoose Next for starting the installation.\"\n" ); printf { $fh } ( "LangString INWpText \${LANG_GERMAN} \"Dieser Assistent wird Sie durch die Installation der \${KARTEN_BESCHREIBUNG} \${KARTEN_AUSGABE} begleiten.\$\\n\$\\nVor der Installation muss das Programm BaseCamp geschlossen werden damit Kartendateien ersetzt werden koennen.\$\\n\$\\nKlicken Sie auf Weiter um mit der Installation zu beginnen.\"\n" ); printf { $fh } ( "\n" ); - printf { $fh } ( "LicenseLangString licenseFile \${LANG_ENGLISH} \"lizenz_haftung_erstellung_en.txt\"\n" ); - printf { $fh } ( "LicenseLangString licenseFile \${LANG_GERMAN} \"lizenz_haftung_erstellung.txt\"\n" ); + printf { $fh } ( "LicenseLangString licenseFile \${LANG_ENGLISH} \"%s\"\n", "$mapname.nsis.license.en" ); + printf { $fh } ( "LicenseLangString licenseFile \${LANG_GERMAN} \"%s\"\n", "$mapname.nsis.license.de" ); printf { $fh } ( "\n" ); printf { $fh } ( "LangString INFpTitle \${LANG_ENGLISH} \"Installation of \${KARTEN_BESCHREIBUNG} \${KARTEN_AUSGABE} finished\"\n" ); printf { $fh } ( "LangString INFpTitle \${LANG_GERMAN} \"Installation der \${KARTEN_BESCHREIBUNG} \${KARTEN_AUSGABE} abgeschlossen\"\n" ); @@ -3195,7 +3583,7 @@ sub create_nsis_nsifile { # Tool : makensis.exe # OS : Linux, Windows # ----------------------------------------- -sub create_nsis_exefile { +sub create_nsis_exe_full { my $source = $EMPTY; my $destination = $EMPTY; @@ -3250,12 +3638,11 @@ sub create_nsis_exefile { # go to nsis directory chdir "$BASEPATH/nsis"; + + # Create the needed license files + create_licensefile_nsis(); - # copy license files and needed bitmaps - copy ( "lizenz_haftung_erstellung.txt", "$WORKDIRLANG/lizenz_haftung_erstellung.txt" ) - or die ( "copy() failed: $!\n" ); - copy ( "lizenz_haftung_erstellung_en.txt", "$WORKDIRLANG/lizenz_haftung_erstellung_en.txt" ) - or die ( "copy() failed: $!\n" ); + # copy needed bitmaps copy ( "Install.bmp", "$WORKDIRLANG/Install.bmp" ) or die ( "copy() failed: $!" ); copy ( "Deinstall.bmp", "$WORKDIRLANG/Deinstall.bmp" ) or die ( "copy() failed: $!" ); @@ -3296,7 +3683,7 @@ sub create_nsis_exefile { # Create the NSI file needed for compiling the Windows Installer # (old style installer including ImageDir Set) # ----------------------------------------- -sub create_nsis_nsifile2 { +sub create_nsis_nsi_gmap { # Jump into the correct directory chdir "$WORKDIRLANG"; @@ -3417,8 +3804,8 @@ sub create_nsis_nsifile2 { printf { $fh } ( "LangString INWpText \${LANG_ENGLISH} \"This Wizard will be guiding you through the installation of \${KARTEN_BESCHREIBUNG} \${KARTEN_AUSGABE} begleiten.\$\\n\$\\nBefore installation BaseCamp must be closed for allowing installation of the map data.\$\\n\$\\nMake sure you have the correct GMAP zip file downloaded to the same directory as this installer.\$\\n\$\\nChoose Next for starting the installation.\"\n" ); printf { $fh } ( "LangString INWpText \${LANG_GERMAN} \"Dieser Assistent wird Sie durch die Installation der \${KARTEN_BESCHREIBUNG} \${KARTEN_AUSGABE} begleiten.\$\\n\$\\nVor der Installation muss das Programm BaseCamp geschlossen werden damit Kartendateien ersetzt werden koennen.\$\\n\$\\nBitte stellen Sie sicher, dass die korrekte GMAP ZIP Datei schon in das gleiche Verzeichnis heruntergeladen wurde, wie dieser Installer.\$\\n\$\\nKlicken Sie auf Weiter um mit der Installation zu beginnen.\"\n" ); printf { $fh } ( "\n" ); - printf { $fh } ( "LicenseLangString licenseFile \${LANG_ENGLISH} \"lizenz_haftung_erstellung_en.txt\"\n" ); - printf { $fh } ( "LicenseLangString licenseFile \${LANG_GERMAN} \"lizenz_haftung_erstellung.txt\"\n" ); + printf { $fh } ( "LicenseLangString licenseFile \${LANG_ENGLISH} \"%s\"\n", "$mapname.nsis.license.en" ); + printf { $fh } ( "LicenseLangString licenseFile \${LANG_GERMAN} \"%s\"\n", "$mapname.nsis.license.de" ); printf { $fh } ( "\n" ); printf { $fh } ( "LangString INFpTitle \${LANG_ENGLISH} \"Installation of \${KARTEN_BESCHREIBUNG} \${KARTEN_AUSGABE} finished\"\n" ); printf { $fh } ( "LangString INFpTitle \${LANG_GERMAN} \"Installation der \${KARTEN_BESCHREIBUNG} \${KARTEN_AUSGABE} abgeschlossen\"\n" ); @@ -3670,7 +4057,7 @@ sub create_nsis_nsifile2 { # Tool : makensis.exe # OS : Linux, Windows # ----------------------------------------- -sub create_nsis_exefile2 { +sub create_nsis_exe_gmap { my $source = $EMPTY; my $destination = $EMPTY; @@ -3698,11 +4085,10 @@ sub create_nsis_exefile2 { # go to nsis directory chdir "$BASEPATH/nsis"; - # copy license files and needed bitmaps - copy ( "lizenz_haftung_erstellung.txt", "$WORKDIRLANG/lizenz_haftung_erstellung.txt" ) - or die ( "copy() failed: $!\n" ); - copy ( "lizenz_haftung_erstellung_en.txt", "$WORKDIRLANG/lizenz_haftung_erstellung_en.txt" ) - or die ( "copy() failed: $!\n" ); + # Create the needed license files + create_licensefile_nsis(); + + # copy needed bitmaps copy ( "Install.bmp", "$WORKDIRLANG/Install.bmp" ) or die ( "copy() failed: $!" ); copy ( "Deinstall.bmp", "$WORKDIRLANG/Deinstall.bmp" ) or die ( "copy() failed: $!" ); @@ -3866,15 +4252,8 @@ sub create_gmapsuppfile { # Jump to the work directory chdir "$WORKDIRLANG"; - # Disabled, handled in sub - ## Initialize some variables - #my $filename_source = "$WORKDIR/$mapname.osm.pbf"; - #my $filename_source_mtime = ( stat ( $filename_source ) )[ 9 ]; - #my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime ( $filename_source_mtime ); - #my $mapversion = sprintf ( "%d.%d", ( $year - 100 ), ( $mon + 1 ) ); - - # copy License file - copy ( "$BASEPATH/license.txt", "license.txt" ) or die ( "copy() failed: $!\n" ); + # create License file + create_licensefile; # mkgmap-Parameter # --description: Anzeige des Kartennamens in BaseCamp @@ -3883,17 +4262,22 @@ sub create_gmapsuppfile { # --family-name: primäre Anzeige des Kartennamens in einigen GPS-Geräten (z.B. Dakota) # --series-name: This name will be displayed in MapSource in the map selection drop-down. my $mkgmap_parameter = sprintf ( - "--index --gmapsupp --product-id=1 --family-id=$mapid --family-name=\"$mapname $releasestring\" " - . "--series-name=\"$mapname $releasestring\" --description=\"$mapname $releasestring\" --overview-mapnumber=%s0000 " - . "--product-version=%d $mapid*.img $mapid.TYP ", - $mapid, $releasenumeric + "--index --code-page=$mapcodepage --gmapsupp " + . "--license-file=$mapname.license " + . "--product-id=1 --family-id=$mapid --family-name=\"$mapname\" " + . "--series-name=\"$mapname\" --description=\"$mapname (Release $releasestring)\" " + . "--overview-mapname=\"$mapname\" --overview-mapnumber=%s0000 " + . "--product-version=\"%d\" $mapid*.img $mapid.TYP " + . "--show-profiles=1 ", + $mapid,$releasenumeric ); - + # run mkgmap to create the actual gmapsupp.img $command = "java -Xmx" . $javaheapsize . "M" - . " -jar $BASEPATH/tools/mkgmap/mkgmap.jar $max_jobs --license-file=license.txt $mkgmap_parameter"; + . " -Dfile.encoding=UTF-8 -jar $BASEPATH/tools/mkgmap/mkgmap.jar $max_jobs $mkgmap_parameter"; + process_command ( $command ); # Check Return Value @@ -3913,6 +4297,62 @@ sub create_gmapsuppfile { } +# ----------------------------------------- +# create gmap for basecamp: using mkgmap +# ----------------------------------------- +sub create_gmap3 { + + # Jump to the work directory + chdir "$WORKDIRLANG"; + + # create License file + create_licensefile; + + # mkgmap-Parameter + # --description: Anzeige des Kartennamens in BaseCamp + # --description: alleinige Anzeige des Kartennamens in einigen GPS-Geräten (z.B. 62er) + # --description: zusätzliche Anzeige des Kartennamens in einigen GPS-Geräten (z.B. Dakota) + # --family-name: primäre Anzeige des Kartennamens in einigen GPS-Geräten (z.B. Dakota) + # --series-name: This name will be displayed in MapSource in the map selection drop-down. + my $mkgmap_parameter = sprintf ( + "--index --code-page=$mapcodepage --gmapi " + . "--license-file=$mapname.license " + . "--product-id=1 --family-id=$mapid --family-name=\"$mapname\" " + . "--series-name=\"$mapname\" --description=\"$mapname (Release $releasestring)\" " + . "--overview-mapname=\"$mapname\" --overview-mapnumber=%s0000 " + . "--product-version=\"%d\" $mapid*.img $mapid.TYP " + . "--show-profiles=1 ", + $mapid,$releasenumeric + ); + + # run mkgmap to create the actual gmap archive + $command = + "java -Xmx" + . $javaheapsize . "M" + . " -Dfile.encoding=UTF-8 -jar $BASEPATH/tools/mkgmap/mkgmap.jar $max_jobs $mkgmap_parameter"; + + process_command ( $command ); + + # Check Return Value + if ( $? != 0 ) { + die ( "ERROR:\n Creation of the GMAP Archive for $mapname failed.\n\n" ); + } + + + # copy the created gmapsupp to the install directory +# + my $filename = "$mapname.gmap"; + rmtree ( "$INSTALLDIR/$filename", 0, 1 ); + move ( $filename, "$INSTALLDIR/$filename" ) or die ( "move() failed: $!\n" ); + # + ## remove the unneeded temporary files again + #unlink ( "osmmap.tdb" ); + #unlink ( "osmmap.img" ); + + return; +} + + # ----------------------------------------- # Create imageDir format readable by # - BaseCamp and Mapsource (with the needed Registry entries on Windows) @@ -4313,20 +4753,21 @@ sub show_fingerprint { my $inputfile = ""; printf "\n\n\n"; - printf "================================================\n"; - printf "+ +\n"; - printf "+ Fingerprint: +\n"; - printf "+ ------------ +\n"; - printf "+ Show versions of used tools +\n"; - printf "+ +\n"; - printf "================================================\n"; - printf "\n"; - - # General OS Information - # ---------------------- - printf "OS General\n"; - printf "======================================\n"; - printf "Perl Version: $PERL_VERSION\n"; + printf "================================================\n"; + printf "+ +\n"; + printf "+ Fingerprint: +\n"; + printf "+ ------------ +\n"; + printf "+ Show versions of used tools +\n"; + printf "+ +\n"; + printf "================================================\n"; + printf "\n"; + + # General OS Information + # ---------------------- + printf "OS General\n"; + printf "======================================\n"; + printf "Perl Version: $PERL_VERSION\n"; + printf "Perl LC_CTYPE: " . setlocale(LC_CTYPE) . "\n"; printf "OS Name: $OSNAME\n"; printf "OS Sysname: $os_sysname\n"; printf "OS Nodename: $os_nodename\n"; @@ -4339,273 +4780,287 @@ sub show_fingerprint { # java # ---- - printf "Java\n"; - printf "======================================\n"; - $cmdoutput = `java -version 2>&1`; - printf "$cmdoutput\n\n"; - + printf "Java\n"; + printf "======================================\n"; + chdir "$BASEPATH/tools/fzkJavaLocale"; + $cmdoutput = `java -version 2>&1`; + printf "$cmdoutput\n\n"; + + printf "Java Encodings (no parameters)\n"; + printf "--------------------------------------\n"; + chdir "$BASEPATH/tools/fzkJavaLocale"; + $cmdoutput = `java fzkJavaLocale`; + printf "$cmdoutput\n\n"; + + printf "Java Encodings (file.encoding=UTF-8)\n"; + printf "--------------------------------------\n"; + chdir "$BASEPATH/tools/fzkJavaLocale"; + $cmdoutput = `java "-Dfile.encoding=UTF-8" fzkJavaLocale`; + printf "$cmdoutput\n\n"; + chdir "$BASEPATH"; + # osmosis # ------- - printf "osmosis\n"; - printf "======================================\n"; - # OS X, Linux, FreeBSD, OpenBSD - if ( ( $OSNAME eq 'darwin' ) || ( $OSNAME eq 'linux' ) || ( $OSNAME eq 'freebsd' ) || ( $OSNAME eq 'openbsd' ) ) { - $cmdoutput = `sh $BASEPATH/tools/osmosis/bin/osmosis -v 2>&1`; - } - # Windows - elsif ( $OSNAME eq 'MSWin32' ) { - $cmdoutput = `$BASEPATH\\tools\\osmosis\\bin\\osmosis.bat -v 2>&1`; - } - # Try to match - if ( $cmdoutput =~ /INFO: (.* Version .*)/ ) { - printf "$1\n\n\n"; - } - else { - printf "PROBLEM: either tool not found or no match for version string.\n"; - printf " see detailed command output below:\n"; - printf "----------------------------\n"; - printf "$cmdoutput\n"; - printf "----------------------------\n\n\n"; - } + printf "osmosis\n"; + printf "======================================\n"; + # OS X, Linux, FreeBSD, OpenBSD + if ( ( $OSNAME eq 'darwin' ) || ( $OSNAME eq 'linux' ) || ( $OSNAME eq 'freebsd' ) || ( $OSNAME eq 'openbsd' ) ) { + $cmdoutput = `sh $BASEPATH/tools/osmosis/bin/osmosis -v 2>&1`; + } + # Windows + elsif ( $OSNAME eq 'MSWin32' ) { + $cmdoutput = `$BASEPATH\\tools\\osmosis\\bin\\osmosis.bat -v 2>&1`; + } + # Try to match + if ( $cmdoutput =~ /INFO: (.* Version .*)/ ) { + printf "$1\n\n\n"; + } + else { + printf "PROBLEM: either tool not found or no match for version string.\n"; + printf " see detailed command output below:\n"; + printf "----------------------------\n"; + printf "$cmdoutput\n"; + printf "----------------------------\n\n\n"; + } - # splitter - # -------- - printf "splitter\n"; - printf "======================================\n"; - $cmdoutput = `java -jar tools/splitter/splitter.jar --version 2>&1`; + # splitter + # -------- + printf "splitter\n"; + printf "======================================\n"; + $cmdoutput = `java -jar $BASEPATH/tools/splitter/splitter.jar --version 2>&1`; printf "$cmdoutput\n\n"; - # mkgmap - # ------ - printf "mkgmap\n"; - printf "======================================\n"; - $cmdoutput = `java -jar tools/mkgmap/mkgmap.jar --version 2>&1`; - # Try to match - if ( $cmdoutput =~ /^(\d{4,})/m ) { - printf "mkgmap r$1\n\n\n"; - } - else { - printf "PROBLEM: either tool not found or no match for version string.\n"; - printf " see detailed command output below:\n"; - printf "----------------------------\n"; - printf "$cmdoutput\n"; - printf "----------------------------\n\n\n"; - } - + # mkgmap + # ------ + printf "mkgmap\n"; + printf "======================================\n"; + $cmdoutput = `java -jar $BASEPATH/tools/mkgmap/mkgmap.jar --version 2>&1`; + # Try to match + if ( $cmdoutput =~ /^(\d{4,})/m ) { + printf "mkgmap r$1\n\n\n"; + } + else { + printf "PROBLEM: either tool not found or no match for version string.\n"; + printf " see detailed command output below:\n"; + printf "----------------------------\n"; + printf "$cmdoutput\n"; + printf "----------------------------\n\n\n"; + } + - # PPP - # ---------------- - printf "PPP - Perl Preprocessor\n"; - printf "======================================\n"; - $cmdoutput = `perl $BASEPATH/tools/ppp/ppp.pl 2>&1`; - # Try to match - if ( $cmdoutput =~ /^(PERL .*)$/m ) { - printf "$1\n"; - } - else { - printf "PROBLEM: either tool not found or no match for version string.\n"; - printf " see detailed command output below:\n"; - printf "----------------------------\n"; - printf "$cmdoutput\n"; - printf "----------------------------\n\n\n"; - } - if ( $cmdoutput =~ /^(.*Copyright.*)$/m ) { - printf "$1\n"; - } - printf "\n\n"; + # PPP + # ---------------- + printf "PPP - Perl Preprocessor\n"; + printf "======================================\n"; + $cmdoutput = `perl $BASEPATH/tools/ppp/ppp.pl 2>&1`; + # Try to match + if ( $cmdoutput =~ /^(PERL .*)$/m ) { + printf "$1\n"; + } + else { + printf "PROBLEM: either tool not found or no match for version string.\n"; + printf " see detailed command output below:\n"; + printf "----------------------------\n"; + printf "$cmdoutput\n"; + printf "----------------------------\n\n\n"; + } + if ( $cmdoutput =~ /^(.*Copyright.*)$/m ) { + printf "$1\n"; + } + printf "\n\n"; - # 7za (Windows only) - # ------------------ - printf "7-Zip CLI (7za) - Windows only\n"; - printf "======================================\n"; - # Windows - if ( $OSNAME eq 'MSWin32' ) { - $cmdoutput = `$BASEPATH\\tools\\zip\\windows\\7-Zip\\7za.exe 2>&1`; - # Try to match - if ( $cmdoutput =~ /(7-Zip .*)$/m ) { - printf "$1\n"; - } - else { - printf "PROBLEM: either tool not found or no match for version string.\n"; - printf " see detailed command output below:\n"; - printf "----------------------------\n"; - printf "$cmdoutput\n"; - printf "----------------------------\n\n\n"; - } - } - printf "\n\n"; + # 7za (Windows only) + # ------------------ + printf "7-Zip CLI (7za) - Windows only\n"; + printf "======================================\n"; + # Windows + if ( $OSNAME eq 'MSWin32' ) { + $cmdoutput = `$BASEPATH\\tools\\zip\\windows\\7-Zip\\7za.exe 2>&1`; + # Try to match + if ( $cmdoutput =~ /(7-Zip .*)$/m ) { + printf "$1\n"; + } + else { + printf "PROBLEM: either tool not found or no match for version string.\n"; + printf " see detailed command output below:\n"; + printf "----------------------------\n"; + printf "$cmdoutput\n"; + printf "----------------------------\n\n\n"; + } + } + printf "\n\n"; - # jmc_cli - # ------------ - printf "jmc_cli\n"; - printf "======================================\n"; - if ( $OSNAME eq 'darwin' ) { - # OS X - $cmdoutput = `$BASEPATH/tools/jmc/osx/jmc_cli 2>&1`; - } - elsif ( $OSNAME eq 'MSWin32' ) { - # Windows - $cmdoutput = `$BASEPATH\\tools\\jmc\\windows\\jmc_cli.exe 2>&1`; - } - elsif ( ( $OSNAME eq 'linux' ) || ( $OSNAME eq 'freebsd' ) || ( $OSNAME eq 'openbsd' ) ) { - # Linux, FreeBSD (ungetestet), OpenBSD (ungetestet) - $cmdoutput = `$BASEPATH/tools/jmc/linux/jmc_cli 2>&1`; - } - # Try to match - if ( $cmdoutput =~ /^(.*version.*)$/m ) { - printf "$1\n\n\n"; - } - else { - printf "PROBLEM: either tool not found or no match for version string.\n"; - printf " see detailed command output below:\n"; - printf "----------------------------\n"; - printf "$cmdoutput\n"; - printf "----------------------------\n\n\n"; - } - + # jmc_cli + # ------------ + printf "jmc_cli\n"; + printf "======================================\n"; + if ( $OSNAME eq 'darwin' ) { + # OS X + $cmdoutput = `$BASEPATH/tools/jmc/osx/jmc_cli 2>&1`; + } + elsif ( $OSNAME eq 'MSWin32' ) { + # Windows + $cmdoutput = `$BASEPATH\\tools\\jmc\\windows\\jmc_cli.exe 2>&1`; + } + elsif ( ( $OSNAME eq 'linux' ) || ( $OSNAME eq 'freebsd' ) || ( $OSNAME eq 'openbsd' ) ) { + # Linux, FreeBSD (ungetestet), OpenBSD (ungetestet) + $cmdoutput = `$BASEPATH/tools/jmc/linux/jmc_cli 2>&1`; + } + # Try to match + if ( $cmdoutput =~ /^(.*version.*)$/m ) { + printf "$1\n\n\n"; + } + else { + printf "PROBLEM: either tool not found or no match for version string.\n"; + printf " see detailed command output below:\n"; + printf "----------------------------\n"; + printf "$cmdoutput\n"; + printf "----------------------------\n\n\n"; + } + - # osmconvert (not triggered) - # -------------------------- - printf "osmconvert\n"; - printf "======================================\n"; - if ( $OSNAME eq 'darwin' ) { - # OS X - $cmdoutput = `$BASEPATH/tools/osmconvert/osx/osmconvert --help 2>&1`; - } - elsif ( $OSNAME eq 'MSWin32' ) { - # Windows - $cmdoutput = `$BASEPATH\\tools\\osmconvert\\windows\\osmconvert.exe --help 2>&1`; - } - elsif ( ( $OSNAME eq 'linux' ) || ( $OSNAME eq 'freebsd' ) || ( $OSNAME eq 'openbsd' ) ) { - # Linux, FreeBSD (ungetestet), OpenBSD (ungetestet) - if ( ( $OSNAME eq 'linux' ) && ( $os_archbit eq '64' ) ) { - $cmdoutput = `$BASEPATH/tools/osmconvert/linux/osmconvert64 --help 2>&1`; - } - else - { - $cmdoutput = `$BASEPATH/tools/osmconvert/linux/osmconvert32 --help 2>&1`; - } - } - # Try to match - if ( $cmdoutput =~ /^(osmconvert .*)$/m ) { - printf "$1\n\n\n"; + # osmconvert (not triggered) + # -------------------------- + printf "osmconvert\n"; + printf "======================================\n"; + if ( $OSNAME eq 'darwin' ) { + # OS X + $cmdoutput = `$BASEPATH/tools/osmconvert/osx/osmconvert --help 2>&1`; + } + elsif ( $OSNAME eq 'MSWin32' ) { + # Windows + $cmdoutput = `$BASEPATH\\tools\\osmconvert\\windows\\osmconvert.exe --help 2>&1`; + } + elsif ( ( $OSNAME eq 'linux' ) || ( $OSNAME eq 'freebsd' ) || ( $OSNAME eq 'openbsd' ) ) { + # Linux, FreeBSD (ungetestet), OpenBSD (ungetestet) + if ( ( $OSNAME eq 'linux' ) && ( $os_archbit eq '64' ) ) { + $cmdoutput = `$BASEPATH/tools/osmconvert/linux/osmconvert64 --help 2>&1`; } - else { - printf "PROBLEM: either tool not found or no match for version string.\n"; - printf " see detailed command output below:\n"; - printf "----------------------------\n"; - printf "$cmdoutput\n"; - printf "----------------------------\n\n\n"; + else + { + $cmdoutput = `$BASEPATH/tools/osmconvert/linux/osmconvert32 --help 2>&1`; } + } + # Try to match + if ( $cmdoutput =~ /^(osmconvert .*)$/m ) { + printf "$1\n\n\n"; + } + else { + printf "PROBLEM: either tool not found or no match for version string.\n"; + printf " see detailed command output below:\n"; + printf "----------------------------\n"; + printf "$cmdoutput\n"; + printf "----------------------------\n\n\n"; + } - - # osmfilter (not triggered) - # ------------------------- - printf "osmfilter - not used during build\n"; - printf "======================================\n"; - if ( $OSNAME eq 'darwin' ) { - # OS X - $cmdoutput = `$BASEPATH/tools/osmfilter/osx/osmfilter --help 2>&1`; - } - elsif ( $OSNAME eq 'MSWin32' ) { - # Windows - $cmdoutput = `$BASEPATH\\tools\\osmfilter\\windows\\osmfilter.exe --help 2>&1`; - } - elsif ( ( $OSNAME eq 'linux' ) || ( $OSNAME eq 'freebsd' ) || ( $OSNAME eq 'openbsd' ) ) { - # Linux, FreeBSD (ungetestet), OpenBSD (ungetestet) - $cmdoutput = `$BASEPATH/tools/osmfilter/linux/osmfilter32 --help 2>&1`; - } - # Try to match - if ( $cmdoutput =~ /^(osmfilter .*)$/m ) { - printf "$1\n\n\n"; - } - else { + + # osmfilter (not triggered) + # ------------------------- + printf "osmfilter - not used during build\n"; + printf "======================================\n"; + if ( $OSNAME eq 'darwin' ) { + # OS X + $cmdoutput = `$BASEPATH/tools/osmfilter/osx/osmfilter --help 2>&1`; + } + elsif ( $OSNAME eq 'MSWin32' ) { + # Windows + $cmdoutput = `$BASEPATH\\tools\\osmfilter\\windows\\osmfilter.exe --help 2>&1`; + } + elsif ( ( $OSNAME eq 'linux' ) || ( $OSNAME eq 'freebsd' ) || ( $OSNAME eq 'openbsd' ) ) { + # Linux, FreeBSD (ungetestet), OpenBSD (ungetestet) + $cmdoutput = `$BASEPATH/tools/osmfilter/linux/osmfilter32 --help 2>&1`; + } + # Try to match + if ( $cmdoutput =~ /^(osmfilter .*)$/m ) { + printf "$1\n\n\n"; + } + else { + printf "PROBLEM: either tool not found or no match for version string.\n"; + printf " see detailed command output below:\n"; + printf "----------------------------\n"; + printf "$cmdoutput\n"; + printf "----------------------------\n\n\n"; + } + + + # wget (windows directory) + # ------------------------ + printf "GNU Wget - Windows only\n"; + printf "======================================\n"; + # Windows + if ( $OSNAME eq 'MSWin32' ) { + $cmdoutput = `$BASEPATH\\tools\\wget\\windows\\wget.exe --version 2>&1`; + # Try to match + if ( $cmdoutput =~ /(GNU Wget .*)$/m ) { + printf "$1\n"; + } + else { printf "PROBLEM: either tool not found or no match for version string.\n"; printf " see detailed command output below:\n"; printf "----------------------------\n"; printf "$cmdoutput\n"; printf "----------------------------\n\n\n"; - } - - - # wget (windows directory) - # ------------------------ - printf "GNU Wget - Windows only\n"; - printf "======================================\n"; - # Windows - if ( $OSNAME eq 'MSWin32' ) { - $cmdoutput = `$BASEPATH\\tools\\wget\\windows\\wget.exe --version 2>&1`; - # Try to match - if ( $cmdoutput =~ /(GNU Wget .*)$/m ) { - printf "$1\n"; - } - else { - printf "PROBLEM: either tool not found or no match for version string.\n"; - printf " see detailed command output below:\n"; - printf "----------------------------\n"; - printf "$cmdoutput\n"; - printf "----------------------------\n\n\n"; - } - if ( $cmdoutput =~ /^(\+.*)$/m ) { - printf "$1\n"; - } - } - printf "\n\n"; - + } + if ( $cmdoutput =~ /^(\+.*)$/m ) { + printf "$1\n"; + } + } + printf "\n\n"; + - # NSIS (windows directory), has to be installed on Linux + # NSIS (windows directory), has to be installed on Linux # ------------------------------------------------------- - printf "NSIS: makensis - Windows and linux\n"; - printf "======================================\n"; - # Linux, FreeBSD, OpenBSD - if ( ( $OSNAME eq 'linux' ) || ( $OSNAME eq 'freebsd' ) || ( $OSNAME eq 'openbsd' ) ) { - $cmdoutput = `makensis -version 2>&1`; - printf "MakeNSIS $cmdoutput\n"; - } - # Windows - elsif ( $OSNAME eq 'MSWin32' ) { - $cmdoutput = `$BASEPATH\\tools\\NSIS\\windows\\makensis.exe /Version 2>&1`; - printf "MakeNSIS $cmdoutput\n"; - } - printf "\n\n"; + printf "NSIS: makensis - Windows and linux\n"; + printf "======================================\n"; + # Linux, FreeBSD, OpenBSD + if ( ( $OSNAME eq 'linux' ) || ( $OSNAME eq 'freebsd' ) || ( $OSNAME eq 'openbsd' ) ) { + $cmdoutput = `makensis -version 2>&1`; + printf "MakeNSIS $cmdoutput\n"; + } + # Windows + elsif ( $OSNAME eq 'MSWin32' ) { + $cmdoutput = `$BASEPATH\\tools\\NSIS\\windows\\makensis.exe /Version 2>&1`; + printf "MakeNSIS $cmdoutput\n"; + } + printf "\n\n"; - # bounds and sea + # bounds and sea # --------------- - printf "Bounderies (bounds)\n"; - printf "======================================\n"; - $inputfile = "$BASEPATH/bounds/version.txt"; - if (open( my $filehandle, "< $inputfile ") ) { - while ( $lineoffile = <$filehandle> ) { - chomp $lineoffile; - print "$lineoffile\n\n\n"; - } - close ( $filehandle ); + printf "Bounderies (bounds)\n"; + printf "======================================\n"; + $inputfile = "$BASEPATH/bounds/version.txt"; + if (open( my $filehandle, "< $inputfile ") ) { + while ( $lineoffile = <$filehandle> ) { + chomp $lineoffile; + print "$lineoffile\n\n\n"; + } + close ( $filehandle ); } else { - printf "PROBLEM: either boundaries not found at all or file\n"; - printf " $inputfile\n"; - printf " not existing.\n"; - printf " see detailed command output below:\n"; - printf "----------------------------\n"; - printf "$!\n"; - printf "----------------------------\n\n\n"; + printf "PROBLEM: either boundaries not found at all or file\n"; + printf " $inputfile\n"; + printf " not existing.\n"; + printf " see detailed command output below:\n"; + printf "----------------------------\n"; + printf "$!\n"; + printf "----------------------------\n\n\n"; } - printf "Sea Bounderies (sea)\n"; - printf "======================================\n"; - $inputfile = "$BASEPATH/sea/version.txt"; - if (open( my $filehandle, "< $inputfile ") ) { - while ( $lineoffile = <$filehandle> ) { - chomp $lineoffile; - print "$lineoffile\n\n\n"; - } - close ( $filehandle ); + printf "Sea Bounderies (sea)\n"; + printf "======================================\n"; + $inputfile = "$BASEPATH/sea/version.txt"; + if (open( my $filehandle, "< $inputfile ") ) { + while ( $lineoffile = <$filehandle> ) { + chomp $lineoffile; + print "$lineoffile\n\n\n"; + } + close ( $filehandle ); } else { printf "PROBLEM: either sea boundaries not found at all or file\n"; @@ -4618,14 +5073,15 @@ sub show_fingerprint { } - # TYPViewer (windows directory), GUI tool, not used, just there for convenience + # TYPViewer (windows directory), GUI tool, not used, just there for convenience - # IMGinfo (not triggered, GUI tool) - - # gmapi-builder.py + # IMGinfo (not triggered, GUI tool) + + # gmapi-builder.py - printf "\n\n"; + printf "\n\n"; + } @@ -4879,7 +5335,7 @@ sub check_environment { my $count = 0; # Print out what we're doing - printf { *STDOUT } ( "\nChecking the Development Environment...\n", $directory ); + printf { *STDOUT } ( "\nChecking the Development Environment...\n" ); # Check the existence of the 'install' directory and create it if necessary $directory = "$BASEPATH/install"; @@ -5116,7 +5572,7 @@ sub show_help { for my $mapdata ( @maps ) { if ( $optional ) { - # alle Länder und Regionen + # alle L�nder und Regionen if ( @$mapdata[ $MAPID ] == -1 ) { printf { *STDOUT } ( "\n%s:\n", @$mapdata[ $MAPNAME ] ); # Kommentar } diff --git a/Freizeitkarte-Entwicklung/style/fzk/lines-master b/Freizeitkarte-Entwicklung/style/fzk/lines-master index 69da295f..0f30ac5a 100644 --- a/Freizeitkarte-Entwicklung/style/fzk/lines-master +++ b/Freizeitkarte-Entwicklung/style/fzk/lines-master @@ -60,6 +60,7 @@ # - Excluded railway=abandoned from display # Version : 0.33 25.04.2016 - Showing aerialway = rope-tow also # Version : 0.34 11.11.2016 - Fixing issue with highway=path and foot=designated wrongly classified as radfussweg +# Version : 0.35 26.11.2016 - Fixing highway = path & area = yes @@ -1303,8 +1304,8 @@ highway = path & keinrouting = yes [0x010e12 resolution 23-23] # Allgemein oeffentlich # 0x010e0c = Bitmap 2 (breit, NoLabel) # 0x010e06 = Bitmap 2 (schmal, nur ein Pixel gefuellt, NoLabel) -highway = path [0x010e0c resolution 24 continue] -highway = path [0x010e06 resolution 23-23] +highway = path & (area != * | area = no) [0x010e0c resolution 24 continue] +highway = path & (area != * | area = no) [0x010e06 resolution 23-23] # Wirtschafts-, Feld- oder Waldweg: diff --git a/Freizeitkarte-Entwicklung/style/fzk/polygons-master b/Freizeitkarte-Entwicklung/style/fzk/polygons-master index 3a8d60ec..04e66043 100644 --- a/Freizeitkarte-Entwicklung/style/fzk/polygons-master +++ b/Freizeitkarte-Entwicklung/style/fzk/polygons-master @@ -27,6 +27,7 @@ # Version : 0.19 -02.05.2015: Spliting up caravan and picnic site: for moving camping_site to drawOrder 4 # Changes regarding amenity = place_of_worship and buildings # Changes regarding new tagging of forests: tag leaf_type implemented +# Version: 0.20 -26.11.2016 handling highway=path with area=yes # # Copyright (C) 2011, 2013 Projekt Freizeitkarte @@ -865,6 +866,9 @@ highway = pedestrian & area = yes [0x33 resolution 20] # Wird in "lines" derzeit nicht unterstützt. # highway = footway & area = yes [0x33 resolution 20] +# Small path with area=yes: to be shown as Fussgängerzone of Mischzone ? +highway = path & area = yes [0x33 resolution 20] + # Verkehrsberuhigter Bereich: Eine Strasse in der auf spielende Kinder aufgepaßt werden muß, # Fußgänger bevorzugt behandelt werden und nur Schrittgeschwindigkeit erlaubt ist. highway = living_street & area = yes [0x30 resolution 20] diff --git a/Freizeitkarte-Entwicklung/style/swisspopo/lines-master b/Freizeitkarte-Entwicklung/style/swisspopo/lines-master index 83798be5..1c4e94a1 100644 --- a/Freizeitkarte-Entwicklung/style/swisspopo/lines-master +++ b/Freizeitkarte-Entwicklung/style/swisspopo/lines-master @@ -60,6 +60,7 @@ # - Excluded railway=abandoned from display # Version : 0.33 25.04.2016 - Showing aerialway = rope-tow also # Version : 0.34 11.11.2016 - Fixing issue with highway=path and foot=designated wrongly classified as radfussweg +# Version : 0.35 26.11.2016 - Fixing highway = path & area = yes # @@ -1331,8 +1332,8 @@ highway = path & keinrouting = yes [0x010e12 resolution 23-23] # Allgemein oeffentlich # 0x010e0c = Bitmap 2 (breit, NoLabel) # 0x010e06 = Bitmap 2 (schmal, nur ein Pixel gefuellt, NoLabel) -highway = path [0x010e0c resolution 24 continue] -highway = path [0x010e06 resolution 23-23] +highway = path & (area != * | area = no) [0x010e0c resolution 24 continue] +highway = path & (area != * | area = no) [0x010e06 resolution 23-23] # Wirtschafts-, Feld- oder Waldweg: diff --git a/Freizeitkarte-Entwicklung/style/swisspopo/polygons-master b/Freizeitkarte-Entwicklung/style/swisspopo/polygons-master index 5bc89248..31f33935 100644 --- a/Freizeitkarte-Entwicklung/style/swisspopo/polygons-master +++ b/Freizeitkarte-Entwicklung/style/swisspopo/polygons-master @@ -27,6 +27,8 @@ # Version : 0.19 -02.05.2015: Spliting up caravan and picnic site: for moving camping_site to drawOrder 4 # Changes regarding amenity = place_of_worship and buildings # Changes regarding new tagging of forests: tag leaf_type implemented +# Version: 0.20 -26.11.2016 handling highway=path with area=yes + # # Copyright (C) 2011, 2013 Projekt Freizeitkarte @@ -864,6 +866,9 @@ highway = pedestrian & area = yes [0x33 resolution 20] # Wird in "lines" derzeit nicht unterstützt. # highway = footway & area = yes [0x33 resolution 20] +# Small path with area=yes: to be shown as Fussgängerzone of Mischzone ? +highway = path & area = yes [0x33 resolution 20] + # Verkehrsberuhigter Bereich: Eine Strasse in der auf spielende Kinder aufgepaßt werden muß, # Fußgänger bevorzugt behandelt werden und nur Schrittgeschwindigkeit erlaubt ist. highway = living_street & area = yes [0x30 resolution 20] diff --git a/Freizeitkarte-Entwicklung/tools/TYPViewer/windows/TYPViewer4.5.20.exe b/Freizeitkarte-Entwicklung/tools/TYPViewer/windows/TYPViewer4.5.20.exe deleted file mode 100644 index 9a419ff8..00000000 Binary files a/Freizeitkarte-Entwicklung/tools/TYPViewer/windows/TYPViewer4.5.20.exe and /dev/null differ diff --git a/Freizeitkarte-Entwicklung/tools/TYPViewer/windows/TYPViewer4.5.43.exe b/Freizeitkarte-Entwicklung/tools/TYPViewer/windows/TYPViewer4.5.43.exe new file mode 100644 index 00000000..a00bb5d3 Binary files /dev/null and b/Freizeitkarte-Entwicklung/tools/TYPViewer/windows/TYPViewer4.5.43.exe differ diff --git a/Freizeitkarte-Entwicklung/tools/fzkJavaLocale/fzkJavaLocale.class b/Freizeitkarte-Entwicklung/tools/fzkJavaLocale/fzkJavaLocale.class new file mode 100644 index 00000000..c51a6a31 Binary files /dev/null and b/Freizeitkarte-Entwicklung/tools/fzkJavaLocale/fzkJavaLocale.class differ diff --git a/Freizeitkarte-Entwicklung/tools/fzkJavaLocale/fzkJavaLocale.java b/Freizeitkarte-Entwicklung/tools/fzkJavaLocale/fzkJavaLocale.java new file mode 100644 index 00000000..7366bb8b --- /dev/null +++ b/Freizeitkarte-Entwicklung/tools/fzkJavaLocale/fzkJavaLocale.java @@ -0,0 +1,23 @@ +import java.nio.charset.Charset; +import java.util.Locale; + +public class fzkJavaLocale { + + public static void main(String[] args) { + + System.out.println("Default Charset = " + Charset.defaultCharset()); + System.out.println("file.encoding = " + System.getProperty("file.encoding")); + + Locale currentLocale = Locale.getDefault(); + + System.out.println("Language = " + currentLocale.getLanguage()); + System.out.println("Country = " + currentLocale.getCountry()); + + System.out.println("User Country = " + System.getProperty("user.language")); + System.out.println("User Language = " + System.getProperty("user.country")); + + System.out.println("Display Language = " + currentLocale.getDisplayLanguage()); + System.out.println("Display Country = " + currentLocale.getDisplayCountry()); + + } +} diff --git a/Freizeitkarte-Entwicklung/tools/mkgmap/doc/index.txt b/Freizeitkarte-Entwicklung/tools/mkgmap/doc/index.txt index fa0b5b84..e69de29b 100644 --- a/Freizeitkarte-Entwicklung/tools/mkgmap/doc/index.txt +++ b/Freizeitkarte-Entwicklung/tools/mkgmap/doc/index.txt @@ -1,22 +0,0 @@ - -Documentation -============= -The documentation that is currently available on this site is listed below. -Command line options[1] The possible command line options to mkgmap. This list is -also available using the command: --- -[1] /doc/options - -mkgmap --help=options -Style Manual[2] [pdf] This is the complete documentation of the style rules that -determine how the OSM taged features are converted into the Garmin features. --- -[2] /doc/pdf/style-manual.pdf -TYP compiler manual[3] This documents the language that is accepted by the TYP -compiler that is included within mkgmap. --- -[3] /doc/typ-compiler - -For other documentation go to the Open Street Map wiki for documentation here[4] --- -[4] http://wiki.openstreetmap.org/wiki/Mkgmap diff --git a/Freizeitkarte-Entwicklung/tools/mkgmap/doc/options.txt b/Freizeitkarte-Entwicklung/tools/mkgmap/doc/options.txt index 79d88c83..ce7346c8 100644 --- a/Freizeitkarte-Entwicklung/tools/mkgmap/doc/options.txt +++ b/Freizeitkarte-Entwicklung/tools/mkgmap/doc/options.txt @@ -1,669 +1,711 @@ - -List of options Note that option order is significant: An option only -===================================================================== -applies to subsequent input files. (So if you are using splitter, you probably +Note that option order is significant: An option only applies to +subsequent input files. (So if you are using splitter, you probably want to put most of your options before '-c template.args'.) -General options -~~~~~~~~~~~~~~~ +General options: --help=topic - Print help on the given topic. If the topic is omitted then a list of all the - help topics is printed instead. - ---version - Output program version to stderr. + Print help on the given topic. If the topic is omitted then a + list of all the help topics is printed instead. -File options -~~~~~~~~~~~~ +--version + Output program version to stderr. +filename --input-file=filename - Read input data from the give file. This option (or just a filename) may be - given more than once. + Read input data from the give file. This option (or just a + filename) may be given more than once. --gmapsupp - Create a gmapsupp.img file that can be uploaded to a Garmin or placed in - "/Garmin" in a microSD card (such as by mounting the device in USB mass - storage mode). It can be used on ready compiled img files, if the input files - are not already compiled then they are compiled first and then the gmapsupp - is created. + Create a gmapsupp.img file that can be uploaded to a Garmin or + placed in "/Garmin" in a microSD card (such as by mounting the + device in USB mass storage mode). It can be used on ready + compiled img files, if the input files are not already compiled + then they are compiled first and then the gmapsupp is created. + +--gmapi + Create a directory in the "gmapi" format required by Mac + applications. -c filename --read-config=filename - The given file is opened and each line is an option setting of the form - option=value, any option that could be used on the command line can be used, - however you omit the leading '--'. The short option names with a single '-' - cannot be used, simply use the long name instead. + The given file is opened and each line is an option setting of + the form option=value, any option that could be used on the command + line can be used, however you omit the leading '--'. The short + option names with a single '-' cannot be used, simply use the + long name instead. --output-dir=filename - The directory in which all output files are written. It defaults to the - current working directory, i.e. the directory the command is executed from. + The directory in which all output files are written. It defaults + to the current working directory, i.e. the directory the command is + executed from. -n name --mapname=name - Set the name of the map. Garmin maps are named by 8 digit numbersList. The - default is 63240001. It is best to use a different name if you are going to - be making a map for others to use so that it is unique and does not clash - with others. + Set the name of the map. Garmin maps are named by 8 digit + numbersList. The default is 63240001. It is best to use a different + name if you are going to be making a map for others to use so + that it is unique and does not clash with others. --description=text - Sets the descriptive text for the map. This may be displayed in QLandkarte, - MapSource or on a GPS, where it is normally shown below the family name. - Example: --description="Germany, Denmark" Please note: if you use - splitter.jar to build a template.args file and use -c template.args, then - that file may contain a "description" that will override this option. Use - "--description" in splitter.jar to change the description in the - template.args file. + Sets the descriptive text for the map. This may be displayed in + QLandkarte, MapSource or on a GPS, where it is normally shown + below the family name. Example: --description="Germany, Denmark" + Please note: if you use splitter.jar to build a template.args file + and use -c template.args, then that file may contain a + "description" that will override this option. Use "--description" in + splitter.jar to change the description in the template.args file. --country-name=name - Sets the map's country name. The default is "COUNTRY". + Sets the map's country name. The default is "COUNTRY". --country-abbr=abbreviation - Sets the map's abbreviated country name. The default is "ABC". + Sets the map's abbreviated country name. The default is "ABC". --region-name=name - Sets the map's region name. By default, the map has no region name. + Sets the map's region name. By default, the map has no region name. --region-abbr=abbreviation - Sets the map's abbreviated region name. By default, the map has no - abbreviated region name. - -Label options -~~~~~~~~~~~~~ + Sets the map's abbreviated region name. By default, the map has + no abbreviated region name. + +Label options: --latin1 - This is equivalent to --code-page=1252. + This is equivalent to --code-page=1252. --unicode - This is equivalent to --code-page=65001. Note that only newer devices support - Unicode. + This is equivalent to --code-page=65001. Note that only newer devices support Unicode. --code-page=number - This option enables the use of international characters. Only 8 bit character - sets are supported and so you have to specify which code page you want to - use. - It is entirely dependent on the device firmware which code pages are - supported. + This option enables the use of international characters. Only 8 bit + character sets are supported and so you have to specify which code page + you want to use. + It is entirely dependent on the device firmware which code pages are + supported. + --charset=name - This option is obsolete. Change the character set with the --code-page - option. + This option is obsolete. Change the character set with the --code-page + option. --lower-case - Allow labels to contain lower case letters. Note that most or all Garmin - devices are not able to display lower case letters at an angle so this option - is not generally useful. - -Address search options -~~~~~~~~~~~~~~~~~~~~~~ + Allow labels to contain lower case letters. Note that most or all + Garmin devices are not able to display lower case letters at an angle + so this option is not generally useful. +Address search options: --index - Generate a global address search index. If the --gmapsupp option is also - given, then the index is generated within the resulting gmapsupp.img file so - that address search will work on a GPS device. - If instead the --tdbfile option is given then the index consists of two files - named osmmap.mdx and osmmap_mdr.img which can be used with mapsource. (For - compatibility, you do not need the tdbfile option if gmapsupp is not given). - If both the --gmapsupp and --tdbfile options are given alongside the --index - option, then both indexes will be created. Note that this will require - roughly twice as much memory. - The --overview-mapname option can be used to change these names. If the - mapset is sent to the device from MapSource, it will enable find by name and - address search on the GPS. - - The address fields are assigned by special mkgmap address tags using the - style file: - mkgmap:country - mkgmap:region - mkgmap:city - mkgmap:postal_code - mkgmap:street - mkgmap:housenumber - mkgmap:phone - (mkgmap:is_in - used by location-autofill=is_in) - - If the index is created from previously compiled .img files, then the same - code page and sorting options (e.g. --code-page, --latin1) must be used as - were used to compile the individual map tiles. + Generate a global address search index. If the --gmapsupp option is + also given, then the index is generated within the resulting + gmapsupp.img file so that address search will work on a GPS + device. + + If instead the --tdbfile option is given then the index consists + of two files named osmmap.mdx and osmmap_mdr.img which can be used + with mapsource. (For compatibility, you do not need the tdbfile + option if gmapsupp is not given). + + If both the --gmapsupp and --tdbfile options are given alongside + the --index option, then both indexes will be created. Note that + this will require roughly twice as much memory. + + The --overview-mapname option can be used to change these names. If + the mapset is sent to the device from MapSource, it will enable + find by name and address search on the GPS. + + The address fields are assigned by special mkgmap address + tags using the style file: + mkgmap:country + mkgmap:region + mkgmap:city + mkgmap:postal_code + mkgmap:street + mkgmap:housenumber + mkgmap:phone + (mkgmap:is_in - used by location-autofill=is_in) + + If the index is created from previously compiled .img files, then the + same code page and sorting options (e.g. --code-page, --latin1) must + be used as were used to compile the individual map tiles. --x-split-name-index - A temporary option to enable indexing each part of a street name separately. - So for example if the street is "Aleksandra Gryglewskiego" then you will be - able to search for it as both "Aleksandra" and "Gryglewskiego". It will also - increase the size of the index. Useful in countries where searching for the - first word in name is not the right thing to do. - Note that this option is still experimental and there may be problems. If you - find any let us know! + A temporary option to enable indexing each part of a street name separately. + So for example if the street is "Aleksandra Gryglewskiego" then you will be able to + search for it as both "Aleksandra" and "Gryglewskiego". It will also increase the + size of the index. Useful in countries where searching for the first word in name + is not the right thing to do. ---bounds=directory|zipfile - A directory or a zip file containing the preprocessed bounds files. Bounds - files in a zip file must be located in the zip file's root directory. - The preprocessed boundaries are used to add special tags to all elements - (points, lines and polygons) containing the elements location information. - The style file can be used to assign the address tags mkgmap:country, - mkgmap:region etc. using these values. - The following special tags are added: - - mkgmap:admin_level2 : Name of the admin_level=2 boundary - mkgmap:admin_level3 : Name of the admin_level=3 boundary - .. - mkgmap:admin_level11 - mkgmap:postcode : the postal_code value + Note that this option is still experimental and there may be problems. If you find + any let us know! - Preprocessed bounds can be created with the following command: +--bounds=directory|zipfile + A directory or a zip file containing the preprocessed bounds files. + Bounds files in a zip file must be located in the zip file's root directory. + + The preprocessed boundaries are used to add special tags to all elements + (points, lines and polygons) containing the elements location information. + The style file can be used to assign the address tags mkgmap:country, + mkgmap:region etc. using these values. + + The following special tags are added: + mkgmap:admin_level2 : Name of the admin_level=2 boundary + mkgmap:admin_level3 : Name of the admin_level=3 boundary + .. + mkgmap:admin_level11 + mkgmap:postcode : the postal_code value + + Preprocessed bounds can be created with the following command: + java -cp mkgmap.jar + uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreprocessor + + + The input file must contain the boundaries that should be preprocessed. + It can have OSM, PBF or O5M file format. It is recommended that it + contains the boundary data only to avoid very high memory usage. + The boundsdir gives the directory where the processed files are stored. + This directory can be used as --bounds parameter with mkgmap. - java -cp mkgmap.jar - uk.me.parabola.mkgmap.reader.osm.boundary.BoundaryPreprocessor - - - The input file must contain the boundaries that should be preprocessed. It - can have OSM, PBF or O5M file format. It is recommended that it contains the - boundary data only to avoid very high memory usage. The boundsdir gives the - directory where the processed files are stored. This directory can be used as - --bounds parameter with mkgmap. - --location-autofill=[option1,[option2]] - Controls how the address fields for country, region, city and zip info are - gathered automatically if the fields are not set by using the special mkgmap - address tags (e.g. mkgmap:city - see option index). Warning: automatic - assignment of address fields is somehow a best guess. - - is_in - The is_in tag is analyzed for country and region information. - - nearest - The city/hamlet points that are closest to the element are used to assign - the missing address fields. Beware that cities located in the same tile - are used only. So the results close to a tile border have less quality. + Controls how the address fields for country, region, city and zip info + are gathered automatically if the fields are not set by using the special + mkgmap address tags (e.g. mkgmap:city - see option index). + Warning: automatic assignment of address fields is somehow a best guess. + + is_in The is_in tag is analyzed for country and region information. + + nearest The city/hamlet points that are closest to the element are used + to assign the missing address fields. Beware that cities located + in the same tile are used only. So the results close to a tile + border have less quality. --housenumbers - Enables house number search for OSM input files. All nodes and polygons - having addr:housenumber set are matched to streets. A match between a house - number element and a street is created if the street is located within a - radius of 150m and the addr:street tag value of the house number element - equals the mgkmap:street tag value of the street. The mkgmap:street tag must - be added to the street in the style file. For optimal results, the tags - mkgmap:city and mkgmap:postal_code should be set for the housenumber element. - If a street connects two or more cities this allows to find all addresses - along the road, even they have the same number. - - Example for given street name: - - Node - addr:street=Main Street addr:housenumber=2 - - Way 1 - name=Main Street - - Way 2 - name=Main Street, mkgmap:street=Main Street - - Way 3 - mkgmap:street=Mainstreet - - Way 4 - name=Main Street [A504] - - The node matches to Way 2. It has mkgmap:street set with a value equal to the - addr:street tag value of the house number node. - If the street is not given with addr:housenumber, mkgmap uses heuristics to - find the best match. - -Overview map options -~~~~~~~~~~~~~~~~~~~~ - + Enables house number search for OSM input files. + All nodes and polygons having addr:housenumber set are matched + to streets. A match between a house number element and a street is created if + the street is located within a radius of 150m and the addr:street tag value of + the house number element equals the mgkmap:street tag value of the street. + The mkgmap:street tag must be added to the street in the style file. + For optimal results, the tags mkgmap:city and mkgmap:postal_code should be + set for the housenumber element. If a street connects two or more cities + this allows to find all addresses along the road, even they have the same + number. + Example for given street name: + Node - addr:street=Main Street addr:housenumber=2 + Way 1 - name=Main Street + Way 2 - name=Main Street, mkgmap:street=Main Street + Way 3 - mkgmap:street=Mainstreet + Way 4 - name=Main Street [A504] + The node matches to Way 2. It has mkgmap:street set with a value equal to + the addr:street tag value of the house number node. + If the street is not given with addr:housenumber, mkgmap uses heuristics + to find the best match. + +Overview map options: --overview-mapname=name - If --tdbfile is enabled, this gives the name of the overview .img and .tdb - files. The default map name is osmmap. +If --tdbfile is enabled, this gives the name of the overview +.img and .tdb files. The default map name is osmmap. --overview-mapnumber=8 digit number - If --tdbfile is enabled, this gives the internal 8 digit number used in the - overview map and tdb file. The default number is 63240000. + If --tdbfile is enabled, this gives the internal 8 digit + number used in the overview map and tdb file. The default + number is 63240000. --overview-levels - like levels, specifies additional levels that are to be written to the - overview map. Counting of the levels should continue. Up to 8 additional - levels may be specified, but the lowest usable resolution with MapSource - seems to be 11. The hard coded default is empty. + like levels, specifies additional levels that are to be written to the + overview map. Counting of the levels should continue. Up to 8 additional + levels may be specified, but the lowest usable resolution with MapSource + seems to be 11. The hard coded default is empty. --remove-ovm-work-files - If overview-levels is used, mkgmap creates one additional file with the - prefix ovm_ for each map (*.img) file. These files are used to create the - overview map. With option --remove-ovm-work-files=true the files are removed - after the overview map was created. The default is to keep the files. - -Style options -~~~~~~~~~~~~~ + If overview-levels is used, mkgmap creates one additional file + with the prefix ovm_ for each map (*.img) file. + These files are used to create the overview map. + With option --remove-ovm-work-files=true the files are removed + after the overview map was created. The default is to keep the files. +Style options: --style-file=file - Specify an external file to obtain the style from. "file" can be a directory - containing files such as info, lines, options (see resources/styles/default - for an example). The directory path must be absolute or relative to the - current working directory when mkgmap is invoked. - The file can be a zip file containing the files instead of a directory. - The files can be at the top level or contained in a folder within the zip - file. If the zip file contains more than one top level folder then each - folder is the name of a style that can be selected with the --style option. - The argument can also be a URL that specifies the location of a style file. + Specify an external file to obtain the style from. "file" can + be a directory containing files such as info, lines, options + (see resources/styles/default for an example). The directory + path must be absolute or relative to the current working + directory when mkgmap is invoked. + + The file can be a zip file containing the files instead of a + directory. + + The files can be at the top level or contained in a folder within + the zip file. If the zip file contains more than one top level + folder then each folder is the name of a style that can be selected + with the --style option. + + The argument can also be a URL that specifies the location of a + style file. --style=name - Specify a style name. Must be used if --style-file points to a directory or - zip file containing multiple styles. If --style-file is not used, it selects - one of the built-in styles. + Specify a style name. Must be used if --style-file points to a + directory or zip file containing multiple styles. If --style-file + is not used, it selects one of the built-in styles. --list-styles - List the available styles. If this option is preceded by a style-file option - then it lists the styles available within that file. + List the available styles. If this option is preceded by a style-file + option then it lists the styles available within that file. --check-styles - Perform some checks on the available styles. If this option is preceded by a - style-file option then it checks the styles available within that file. If it - is also preceded by the style option it will only check that style. + Perform some checks on the available styles. If this option is + preceded by a style-file option then it checks the styles + available within that file. If it is also preceded by the style + option it will only check that style. --levels=levels code - Change the way that the levels on the map correspond to the zoom levels in - the device. See customisation help. The default is: "0:24, 1:22, 2:20, 3:18, - 4:16", although each style can have its own default. Up to 8 levels may be - specified. + Change the way that the levels on the map correspond to the zoom + levels in the device. See customisation help. The default is: + "0:24, 1:22, 2:20, 3:18, 4:16", although each style can have + its own default. Up to 8 levels may be specified. --name-tag-list - Get the tag that will be used to supply the name. Useful for language - variations. You can supply a list and the first one will be used. e.g. - --name-tag-list=name:en,int_name,name + Get the tag that will be used to supply the name. Useful for + language variations. You can supply a list and the first one + will be used. e.g. --name-tag-list=name:en,int_name,name --map-features=file - This option is ignored; use the --style-file option instead. + This option is ignored; use the --style-file option instead. -Product description options -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Product description options: --family-id - This is an integer that identifies a family of products. Range: [1..9999] - Mkgmap default: 6324 + This is an integer that identifies a family of products. + Range: [1..9999] + Mkgmap default: 6324 --family-name - If you build several maps, this option describes the family name of all of - your maps. Garmin will display this in the map selection screen. - Example: --family-name="OpenStreetmap mkgmap XL 2019" + If you build several maps, this option describes the + family name of all of your maps. Garmin will display this + in the map selection screen. + Example: --family-name="OpenStreetmap mkgmap XL 2019" --product-id - This is an integer that identifies a product within a family. It is often - just 1, which is the default. + This is an integer that identifies a product within a family. + It is often just 1, which is the default. --product-version - The version of the product. Default value is 1. + The version of the product. Default value is 1. --series-name - This name will be displayed in MapSource in the map selection drop-down. The - default is "OSM map". + This name will be displayed in MapSource in the map selection + drop-down. The default is "OSM map". --area-name - Area name is displayed on Garmin units (or at least on eTrex) as the second - part of the mapname in the list of the individual maps. + Area name is displayed on Garmin units (or at least on eTrex) as the second + part of the mapname in the list of the individual maps. --copyright-message=note - Specify a copyright message for files that do not contain one. + Specify a copyright message for files that do not contain one. --copyright-file=file - Specify copyright messages from a file. Note that the first copyright message - is not displayed on a device, but is shown in BaseCamp. The copyright file - must include at least two lines. + Specify copyright messages from a file. + Note that the first copyright message is not displayed on a device, but is + shown in BaseCamp. The copyright file must include at least two lines. --license-file=file - Specify a file which content will be added as license. All entries of all - maps will be merged in the overview map. + Specify a file which content will be added as license. + All entries of all maps will be merged in the overview map. -Optimization options -~~~~~~~~~~~~~~~~~~~~ +Optimization options: --reduce-point-density=NUM - Simplifies the ways with the Douglas Peucker algorithm. NUM is the maximal - allowed error distance, by which the resulting way may differ from the - original one. This distance gets shifted with lower zoom levels. Recommended - setting is 4, this should lead to only small differences (Default is 2.6, - which should lead to invisible changes) + Simplifies the ways with the Douglas Peucker algorithm. + NUM is the maximal allowed error distance, by which the resulting + way may differ from the original one. + This distance gets shifted with lower zoom levels. + Recommended setting is 4, this should lead to only small differences + (Default is 2.6, which should lead to invisible changes) --reduce-point-density-polygon=NUM - Allows to set the maximal allowed error distance for the DP algorithm to be - applied against polygons. Recommended setting is 8. + Allows to set the maximal allowed error distance for the DP algorithm + to be applied against polygons. Recommended setting is 8. --merge-lines - Try to merge lines. This helps the simplify filter to straighten out longer - chunks at lower zoom levels. Decreases file size more. Increases paint speed - at low zoom levels. Default is enabled, use --no-merge-lines to disable. - + Try to merge lines. This helps the simplify filter to straighten out + longer chunks at lower zoom levels. Decreases file size more. + Increases paint speed at low zoom levels. + Default is enabled, use --no-merge-lines to disable. + --min-size-polygon=NUM - Removes all polygons smaller than NUM from the map. This reduces map size and - speeds up redrawing of maps. Recommended value is 8 to 15, default is 8. See - also polygon-size-limits. + Removes all polygons smaller than NUM from the map. + This reduces map size and speeds up redrawing of maps. + Recommended value is 8 to 15, default is 8. + See also polygon-size-limits. --polygon-size-limits=limits code - Allows to specify different min-size-polygon values for each resolution. - Sample: --polygon-size-limits="24:12, 18:10, 16:8, 14:4, 12:2, 11:0" If a - resolution is not given, mkgmap uses the value for the next higher one. For - the given sample, resolutions 19 to 24 will use value 12, resolution 17 and - 18 will use 10, and so on. Value 0 means to skip the size filter. Note that - in resolution 24 the filter is not used. + Allows to specify different min-size-polygon values for each resolution. + Sample: + --polygon-size-limits="24:12, 18:10, 16:8, 14:4, 12:2, 11:0" + If a resolution is not given, mkgmap uses the value for the next higher + one. For the given sample, resolutions 19 to 24 will use value 12, + resolution 17 and 18 will use 10, and so on. + Value 0 means to skip the size filter. + Note that in resolution 24 the filter is not used. -Miscellaneous options -~~~~~~~~~~~~~~~~~~~~~ +Miscellaneous options: --max-jobs[=number] - When number is specified, allow that number of maps to be processed - concurrently. If number is not specified, the limit is set equal to the - number of CPU cores. If this option is not given at all, the limit is 1 - (i.e., the maps are processed sequentially). + When number is specified, allow that number of maps to be + processed concurrently. If number is not specified, the limit + is set equal to the number of CPU cores. If this option is not + given at all, the limit is 1 (i.e., the maps are processed + sequentially). --keep-going - Don't quit whole application if an exception occurs while processing a map - - continue to process the other maps. + Don't quit whole application if an exception occurs while + processing a map - continue to process the other maps. --block-size=number - Changes the block size that is used in the generated map. This option is not - usually needed, but sometimes an error message will ask you to try a value - for this option. + Changes the block size that is used in the generated map. This + option is not usually needed, but sometimes an error message + will ask you to try a value for this option. --net - Obsolete, use --route instead. + Obsolete, use --route instead. --route - Create maps that support routing. + Create maps that support routing. --drive-on=left|right|detect|detect,left|detect,right - Explicitly specify which side of the road vehicles are expected to drive on. - If the first option is detect, the program tries to find out the proper flag. - If that detection fails, the second value is used (or right if none is - given). With OSM data as input, the detection tries to find out the country - each road is in and compares the number of drive-on-left roads with the rest. - Use the --bounds option to make sure that the detection finds the correct - country. - + Explicitly specify which side of the road vehicles are + expected to drive on. + If the first option is detect, the program tries + to find out the proper flag. If that detection + fails, the second value is used (or right if none is given). + With OSM data as input, the detection tries to find out + the country each road is in and compares the number + of drive-on-left roads with the rest. + Use the --bounds option to make sure that the detection + finds the correct country. + --drive-on-left --drive-on-right - Deprecated: Use drive-on instead. The options are translated to - drive-on=left|right. + Deprecated: Use drive-on instead. + The options are translated to drive-on=left|right. --check-roundabouts - Check that roundabouts have the expected direction (clockwise when vehicles - drive on the left). Roundabouts that are complete loops and have the wrong - direction are reversed. Also checks that the roundabouts do not fork or - overlap other roundabouts. + Check that roundabouts have the expected direction (clockwise + when vehicles drive on the left). Roundabouts that are complete + loops and have the wrong direction are reversed. Also checks + that the roundabouts do not fork or overlap other roundabouts. --check-roundabout-flares - Sanity check roundabout flare roads - warn if they don't point in the correct - direction or if they are not one-way or if they extend too far. + Sanity check roundabout flare roads - warn if they don't point + in the correct direction or if they are not one-way or if they + extend too far. --max-flare-length-ratio=NUM - When checking flare roads, ignore roads whose length is greater than NUM (an - integer) times the distance between the nodes on the roundabout that the - flare roads connect to. Using this option with a value of at least 5 will cut - down the number of legitimate roads that are flagged as flare road problems. - Default value is 0 (disabled) because it's not a completely reliable - heuristic. + When checking flare roads, ignore roads whose length is + greater than NUM (an integer) times the distance between the + nodes on the roundabout that the flare roads connect to. Using + this option with a value of at least 5 will cut down the + number of legitimate roads that are flagged as flare road + problems. Default value is 0 (disabled) because it's not a + completely reliable heuristic. --ignore-maxspeeds - Now ignored, former usage: When reading OSM files, ignore any "maxspeed" - tags. + Now ignored, former usage: + When reading OSM files, ignore any "maxspeed" tags. --ignore-builtin-relations - Now ignored, former usage: When reading OSM files, skip the built-in - processing of relations. This speeds up the processing non-routable map - layers that do not contain multipolygons. This implies - --ignore-turn-restrictions. + Now ignored, former usage: + When reading OSM files, skip the built-in processing of + relations. This speeds up the processing non-routable map + layers that do not contain multipolygons. This implies + --ignore-turn-restrictions. --ignore-turn-restrictions - When reading OSM files, ignore any "restriction" relations. + When reading OSM files, ignore any "restriction" relations. --ignore-osm-bounds - When reading OSM files, ignore any "bounds" elements. With this option - selected generate-sea sometimes works better, but routing across tiles will - not work. + When reading OSM files, ignore any "bounds" elements. + With this option selected generate-sea sometimes works better, + but routing across tiles will not work. --preserve-element-order - Process the map elements (nodes, ways, relations) in the order in which they - appear in the OSM input. Without this option, the order in which the elements - are processed is not defined. + Process the map elements (nodes, ways, relations) in the order + in which they appear in the OSM input. Without this option, + the order in which the elements are processed is not defined. --remove-short-arcs[=MinLength] - Now ignored, former usage: Merge nodes to remove short arcs that can cause - routing problems. If MinLength is specified (in metres), arcs shorter than - that length will be removed. If a length is not specified, only zero-length - arcs will be removed. + Now ignored, former usage: + Merge nodes to remove short arcs that can cause routing + problems. If MinLength is specified (in metres), arcs shorter + than that length will be removed. If a length is not + specified, only zero-length arcs will be removed. --adjust-turn-headings[=BITMASK] - Now ignored, former usage: Where possible, ensure that turns off to side - roads change heading sufficiently so that the GPS believes that a turn is - required rather than a fork. This also avoids spurious instructions to "keep - right/left" when the road doesn't actually fork. - Optional BITMASK (default value 3) allows you to specify which adjustments - are to be made (where necessary): + Now ignored, former usage: + Where possible, ensure that turns off to side roads change + heading sufficiently so that the GPS believes that a turn is + required rather than a fork. This also avoids spurious + instructions to "keep right/left" when the road doesn't + actually fork. - * 1 = increase angle between side road and outgoing main road - * 2 = increase angle between side road and incoming main road + Optional BITMASK (default value 3) allows you to specify which + adjustments are to be made (where necessary): ---cycle-map - Tells mkgmap that the map is for cyclists. This assumes that different - vehicles are different kinds of bicycles, e.g. a way with mkgmap:car=yes and - mkgmap:bicycle=no may be a road that is good for racing bikes, but not for - other cyclists. This allows to optimise sharp angles at junctions of those - roads. Don't use with the default style as that is a general style! + 1 = increase angle between side road and outgoing main road + 2 = increase angle between side road and incoming main road +--cycle-map + Tells mkgmap that the map is for cyclists. This assumes that + different vehicles are different kinds of bicycles, e.g. a way + with mkgmap:car=yes and mkgmap:bicycle=no may be a road that is + good for racing bikes, but not for other cyclists. + This allows to optimise sharp angles at junctions of those roads. + Don't use with the default style as that is a general style! + --report-similar-arcs - Issue a warning when more than one arc connects two nodes and the ways that - the arcs are derived from contain identical points. It doesn't make sense to - use this option at the same time as using the cycleway creating options. + Issue a warning when more than one arc connects two nodes and + the ways that the arcs are derived from contain identical + points. It doesn't make sense to use this option at the same + time as using the cycleway creating options. --report-dead-ends=LEVEL - Set the dead end road warning level. The value of LEVEL (which defaults to 1 - if this option is not specified) determines those roads to report: 0 = none, - 1 = multiple one-way roads that join together but go nowhere, 2 = individual - one-way roads that go nowhere. + Set the dead end road warning level. The value of LEVEL (which + defaults to 1 if this option is not specified) determines + those roads to report: 0 = none, 1 = multiple one-way roads + that join together but go nowhere, 2 = individual one-way roads + that go nowhere. --road-name-pois[=GarminCode] - Now ignored, former usage: Generate a POI for each named road. By default, - the POIs' Garmin type code is 0x640a. If desired, a different type code can - be specified with this option. This is a workaround for not being able to - search for roads. 0x2f15: a blue dot in the middle of the road, and if you - select, or 'hover' over it, the street name appears. - + Now ignored, former usage: + Generate a POI for each named road. By default, the POIs' + Garmin type code is 0x640a. If desired, a different type code + can be specified with this option. This is a workaround for not + being able to search for roads. + 0x2f15: a blue dot in the middle of the road, and if you select, + or 'hover' over it, the street name appears. + --add-pois-to-lines - Generate POIs for lines. For each line (must not be closed) POIs are created - at several points of the line. Each POI is tagged with the same tags like the - line and additional tags added by mkgmap: mkgmap:line2poi=true and tag - mkgmap:line2poitype having the following values: - - * start - The first point of the line - * end - The last point of the line - * inner - Each point of the line except the first and the last - * mid - The middle point + Generate POIs for lines. For each line (must not be closed) POIs are + created at several points of the line. Each POI is tagged with the + same tags like the line and additional tags added by mkgmap: + mkgmap:line2poi=true and tag mkgmap:line2poitype having + the following values: + * start - The first point of the line + * end - The last point of the line + * inner - Each point of the line except the first and the last + * mid - The middle point --add-pois-to-areas - Generate a POI for each polygon and multipolygon. The POIs are created after - the relation style but before the other styles are applied. Each POI is - tagged with the same tags of the area/multipolygon. Additionally the tag - mkgmap:area2poi=true is set so that it is possible to use that information in - the points style file. Artifical polygons created by multipolyon processing - are not used. The POIs are created at the following positions (first rule - that applies): - - polygons: - First rule that applies of - - * the first node tagged with a tag defined by the pois-to-areas-placement - option - * the centre point - - multipolygons: - First rule that applies of - - * the node with role=label - * the centre point of the biggest area + Generate a POI for each polygon and multipolygon. The POIs are created + after the relation style but before the other styles are applied. Each + POI is tagged with the same tags of + the area/multipolygon. Additionally the tag mkgmap:area2poi=true is + set so that it is possible to use that information in the points style + file. Artifical polygons created by multipolyon processing are not used. + The POIs are created at the following positions (first rule that applies): + polygons: + * the first node tagged with a tag defined by the pois-to-areas-placement + option + * the centre point + multipolygons: + * the node with role=label + * the centre point of the biggest area --pois-to-areas-placement[=taglist] - A semicolon separated list of tag=value definitions. A POI is placed at the - first node of the polygon tagged with the first tag/value pair. If none of - the nodes are tagged with the first tag-value pair the first node tagged with - the second tag-value pair is used and so on. If none of the tag-value pairs - matches or the taglist is empty the centre of the polygon is used. It is - possible to define wildcards for tag values like entrance=*. - Default: entrance=main;entrance=yes;building=entrance + A semicolon separated list of tag=value definitions. A POI is placed at the first + node of the polygon tagged with the first tag/value pair. If none of the nodes are + tagged with the first tag-value pair the first node tagged with the second tag-value + pair is used and so on. If none of the tag-value pairs matches or the taglist is empty + the centre of the polygon is used. + It is possible to define wildcards for tag values like entrance=*. + Default: entrance=main;entrance=yes;building=entrance --precomp-sea=directory|zipfile - Defines the directory or a zip file that contains precompiled sea tiles. Sea - files in a zip file must be located in the zip file's root directory or in a - sub directory sea. When this option is defined all natural=coastline tags - from the input OSM tiles are removed and the precompiled data is used - instead. This option can be combined with the generate-sea options - multipolygon, polygons and land-tag. The coastlinefile option is ignored if - precomp-sea is set. + Defines the directory or a zip file that contains precompiled sea tiles. + Sea files in a zip file must be located in the zip file's root directory or in + a sub directory sea. When this option is defined all natural=coastline tags + from the input OSM tiles are removed and the precompiled data is used instead. + This option can be combined with the generate-sea options multipolygon, polygons + and land-tag. The coastlinefile option is ignored if precomp-sea is set. --coastlinefile=filename[,filename] - Defines a comma separated list of files that contain coastline data. The - coastline data from the input files is removed if this option is set. Files - must have OSM or PBF fileformat. + Defines a comma separated list of files that contain coastline + data. The coastline data from the input files is removed if + this option is set. Files must have OSM or PBF fileformat. --generate-sea[=ValueList] - Generate sea polygons. ValueList is an optional comma separated list of - values: - - multipolygon - generate the sea using a multipolygon (the default behaviour so this - really doesn't need to be specified). - - polygons | no-mp - don't generate the sea using a multipolygon - instead, generate a - background sea polygon plus individual land polygons with tag - natural=land. This requires a suitable land polygon type to be defined in - the style file (suggested type is 0x010100) and the polygon must be - defined in the TYP file as having a higher drawing level than the sea - polygon type. - - no-sea-sectors - disable the generation of "sea sectors" when the coastline fails to reach - the tile's boundary. - - extend-sea-sectors - same as no-sea-sectors. Additional adds a point so coastline reaches the - nearest tile boundary. - - land-tag=TAG=VAL - tag to use for land polygons (default natural=land). - - close-gaps=NUM - close gaps in coastline that are less than this distance (metres) - - floodblocker - enable the flood blocker that prevents a flooding of land by checking if - the sea polygons contain streets (works only with multipolygon - processing) - - fbgap=NUM - flood blocker gap in metre (default 40) points that are closer to the sea - polygon do not block - - fbthres=NUM - at least so many highway points must be contained in a sea polygon so - that it may be removed by the flood blocker (default 20) - - fbratio=NUM - only sea polygons with a higher ratio (highway points * 100000 / polygon - size) are removed (default 0.5) - - fbdebug - switches on the debugging of the flood blocker generates GPX files for - each polygon checked by the flood blocker + Generate sea polygons. ValueList is an optional comma + separated list of values: + + multipolygon + generate the sea using a multipolygon (the default + behaviour so this really doesn't need to be specified). + + polygons | no-mp + don't generate the sea using a multipolygon - instead, + generate a background sea polygon plus individual land + polygons with tag natural=land. This requires a + suitable land polygon type to be defined in the style + file (suggested type is 0x010100) and the polygon must + be defined in the TYP file as having a higher drawing + level than the sea polygon type. + + no-sea-sectors + disable the generation of "sea sectors" when the + coastline fails to reach the tile's boundary. + + extend-sea-sectors + same as no-sea-sectors. Additional adds a point so + coastline reaches the nearest tile boundary. + + land-tag=TAG=VAL + tag to use for land polygons (default natural=land). + + close-gaps=NUM + close gaps in coastline that are less than this + distance (metres) + + floodblocker + enable the flood blocker that prevents a flooding of + land by checking if the sea polygons contain streets + (works only with multipolygon processing) + + fbgap=NUM + flood blocker gap in metre (default 40) + points that are closer to the sea polygon do not block + + fbthres=NUM + at least so many highway points must be contained in + a sea polygon so that it may be removed by the flood + blocker (default 20) + + fbratio=NUM + only sea polygons with a higher ratio + (highway points * 100000 / polygon size) are removed + (default 0.5) + + fbdebug + switches on the debugging of the flood blocker + generates GPX files for each polygon checked by + the flood blocker --make-poi-index - Generate the POI index (not yet useful). + Generate the POI index (not yet useful). --nsis - Write a .nsi file that can be used with the Nullsoft Scriptable Install - System (NSIS) to create a Windows Mapsource Installer. + Write a .nsi file that can be used with the Nullsoft Scriptable Install System + (NSIS) to create a Windows Mapsource Installer. --make-all-cycleways - Deprecated, use --make-opposite-cycleways instead. Former meaning: + Deprecated, use --make-opposite-cycleways instead. Former meaning: + Turn on all of the options that make cycleways. -Turn on all of the options that make cycleways. --make-opposite-cycleways - Some one-way streets allow bicycle traffic in the reverse direction and this - option makes a way with the same points as the original that allows bicycle - traffic (in both directions). + Some one-way streets allow bicycle traffic in the reverse + direction and this option makes a way with the same points as + the original that allows bicycle traffic (in both directions). --make-cycleways - Now ignored, former meaning: + Now ignored, former meaning: + Some streets have a separate cycleway track/lane just for + bicycle traffic and this option makes a way with the same + points as the original that allows bicycle traffic. Also, + bicycle traffic is prohibited from using the original way + (unless that way's bicycle access has been defined). -Some streets have a separate cycleway track/lane just for bicycle traffic and -this option makes a way with the same points as the original that allows bicycle -traffic. Also, bicycle traffic is prohibited from using the original way (unless -that way's bicycle access has been defined). --link-pois-to-ways - This option may copy some specific attributes of a POI to a small part of the - way the POI is located on. This can be used to let barriers block a way or to - lower the calculated speed around traffic signals. POIs with the tags - highway=* (e.g. highway=traffic_signals) or barrier=* (e.g. - barrier=cycle_barrier) are supported. The style developer must add at least - one of the access tags (mkgmap:foot, mkgmap:car etc.), mkgmap:road-speed - and/or mkgmap:road-class to the POI. The access tags are ignored if they have - no effect for the way, else a route restriction is added at the POI so that - only allowed vehicles are routed through it. The tags mkgmap:road-speed - and/or mkgmap:road-class are applied to a small part of the way around the - POI, typically to the next junction or a length of ~25 m. The tags are - ignored for pedestrian-only ways. + This option may copy some specific attributes of a POI + to a small part of the way the POI is located on. This can be used + to let barriers block a way or to lower the calculated speed + around traffic signals. + POIs with the tags highway=* (e.g. highway=traffic_signals) + or barrier=* (e.g. barrier=cycle_barrier) are supported. + The style developer must add at least one of the access tags + (mkgmap:foot, mkgmap:car etc.), mkgmap:road-speed and/or + mkgmap:road-class to the POI. + The access tags are ignored if they have no effect for the way, + else a route restriction is added at the POI so that only + allowed vehicles are routed through it. + The tags mkgmap:road-speed and/or mkgmap:road-class are + applied to a small part of the way around the POI, typically + to the next junction or a length of ~25 m. The tags + are ignored for pedestrian-only ways. --process-destination - Splits all motorway_link, trunk_link, primary_link, secondary_link, and - tertiary_link ways tagged with destination into two or three parts where the - second part is additionally tagged with mkgmap:dest_hint=*. The code checks - for the tags destination, destination:lanes, destination:street and some - variants with :forward/:backward like destination:forward or - destination:lanes:backward. If a value for destination is found, the special - tag mkgmap:dest_hint is set to it and the way is split. This happens before - the style rules are processed. This allows to use any routable Garmin type - (except 0x08 and 0x09) for that part so that the Garmin device tells the name - of this part as hint which destination to follow. See also --process-exits. - + Splits all motorway_link, trunk_link, primary_link, secondary_link, + and tertiary_link ways tagged with destination into two or three parts where + the second part is additionally tagged with mkgmap:dest_hint=*. + The code checks for the tags destination, destination:lanes, + destination:street and some variants with :forward/:backward like + destination:forward or destination:lanes:backward. If a value for + destination is found, the special tag mkgmap:dest_hint is set to + it and the way is split. This happens before the style rules are processed. + This allows to use any routable Garmin type (except 0x08 and 0x09) + for that part so that the Garmin device tells the name of + this part as hint which destination to follow. + See also --process-exits. + --process-exits - Usual Garmin devices do not tell the name of the exit on motorways while - routing with mkgmap created maps. This option splits each motorway_link, - trunk_link, primary_link, secondary_link, and tertiary_link way into three - parts. All parts are tagged with the original tags of the link. Additionally - the middle part is tagged with the following tags: - - mkgmap:exit_hint=true - mkgmap:exit_hint_ref= - mkgmap:exit_hint_name= - mkgmap:exit_hint_exit_to= - - Adding a rule checking the mkgmap:exit_hint=true makes it possible to use any - routable Garmin type (except 0x08 and 0x09) for the middle part so that the - Garmin device tells the name of this middle part as hint where to leave the - motorway/trunk. The first part must have type 0x08 or 0x09 so that Garmin - uses the hint. - + Usual Garmin devices do not tell the name of the exit on motorways + while routing with mkgmap created maps. This option splits each + motorway_link, trunk_link, primary_link, secondary_link, and tertiary_link + way into three parts. + All parts are tagged with the original tags of the link. + Additionally the middle part is tagged with the following tags: + mkgmap:exit_hint=true + mkgmap:exit_hint_ref= + mkgmap:exit_hint_name= + mkgmap:exit_hint_exit_to= + Adding a rule checking the mkgmap:exit_hint=true makes it possible + to use any routable Garmin type (except 0x08 and 0x09) for the middle + part so that the Garmin device tells the name of this middle part as + hint where to leave the major road. + The first part must have type 0x08 or 0x09 so that Garmin uses the hint. + --delete-tags-file=FILENAME - Names a file that should contain one or more lines of the form TAG=VALUE or - TAG=*. Blank lines and lines that start with a # or ; are ignored. All - tag/value pairs in the OSM input are compared with these patterns and those - that match are deleted. + Names a file that should contain one or more lines of the form + TAG=VALUE or TAG=*. Blank lines and lines that start with + a # or ; are ignored. All tag/value pairs in the OSM input are + compared with these patterns and those that match are deleted. --tdbfile - Write files that are essential to running with MapSource, a .tdb file and an - overview map. + Write files that are essential to running with MapSource, a .tdb file and + an overview map. --show-profiles=1 - Sets a flag in tdb file which marks set mapset as having contour lines and - allows showing profile in MapSource. Default is 0 which means disabled. + Sets a flag in tdb file which marks set mapset as having contour + lines and allows showing profile in MapSource. Default is 0 + which means disabled. --draw-priority=25 - When two maps cover the same area, this option controls what order they are - drawn in and therefore which map is on top of which. Higher priorities are - drawn "on top" of lower priorities. + When two maps cover the same area, this option controls what + order they are drawn in and therefore which map is on top of + which. Higher priorities are drawn "on top" of lower + priorities. --transparent - Make the map transparent, so that if two maps are loaded that cover the same - area, you can see through this map and see the lower map too. Useful for - contour line maps among other things. + Make the map transparent, so that if two maps are loaded that + cover the same area, you can see through this map and see the + lower map too. Useful for contour line maps among other + things. + +--hide-gmapsupp-on-pc + Set a bit in the gmapsupp.img that tells PC software that the file is + already installed on the PC and therefore there is no need to read it + from the device. --poi-address - Enable address / phone information to POIs. Address info is read according to - the "Karlsruhe" tagging schema. Automatic filling of missing information - could be enabled using the "location-autofill" option. Default is enabled, - use --no-poi-address to disable. + Enable address / phone information to POIs. Address info is + read according to the "Karlsruhe" tagging schema. Automatic + filling of missing information could be enabled using the + "location-autofill" option. + Default is enabled, use --no-poi-address to disable. --verbose - Makes some operations more verbose. Mostly used with --list-styles. + Makes some operations more verbose. Mostly used with --list-styles. + +--order-by-decreasing-area + Puts polygons/areas into the mapfile in decreasing size so that + smaller features are rendered over larger ones (assuming _drawOrder + is equal). The tag mkgmap:drawLevel can be used to override the + natural area of a polygon, so forcing changes to the rendering order. diff --git a/Freizeitkarte-Entwicklung/tools/mkgmap/doc/style-manual.pdf b/Freizeitkarte-Entwicklung/tools/mkgmap/doc/style-manual.pdf index 7d492e8d..4e050c23 100644 Binary files a/Freizeitkarte-Entwicklung/tools/mkgmap/doc/style-manual.pdf and b/Freizeitkarte-Entwicklung/tools/mkgmap/doc/style-manual.pdf differ diff --git a/Freizeitkarte-Entwicklung/tools/mkgmap/doc/typ-compiler.txt b/Freizeitkarte-Entwicklung/tools/mkgmap/doc/typ-compiler.txt index 39f079f7..dcc1e31c 100644 --- a/Freizeitkarte-Entwicklung/tools/mkgmap/doc/typ-compiler.txt +++ b/Freizeitkarte-Entwicklung/tools/mkgmap/doc/typ-compiler.txt @@ -80,8 +80,8 @@ Element sections The main part of the file consists of descriptions of how elements are to be displayed so that you can change the colours and style of the displayed elements. -Each style definition starts with the name of the section in brackets and ends -with the line "[end]". For example: +Each style definition starts with the name of the section in square brackets and +ends with the line "[end]". For example: [_polygon] Type=0x02 @@ -254,181 +254,4 @@ UseOrientation=(Y|N) As with polygons there is an Xpm tag too and it can specify that solid colours should be used or that there is a bitmap. -If there is a bitmap then it is always has a width of 32, its height will be the -width of the line (yes that sound confusing the first time you read it, it just -means that the line is written horizontally in the pixmap). The colours work in -exactly the same way as they do for polygons, so see the examples there for the -different possibilities with day/night and transparent colours. An example with a -pixmap, which shows a line that will have a thickness of 3. - -Xpm="32 3 4 1" -"a c #550088" -". c #889988" -"3 c #889988" -"4 c #889955" -"aaaaaaaaaaaaaaaaaaaaaaaaa....aaa" -"aaaaaa................aaaaaaaaaa" -"aaaaaaaaaaaaaaaaaaaaaaaaa....aaa" - -When there is no pixmap then the LineWidth and BorderWidth options come into -play. The following combinations are recognised by mkgmap. - -* Solid line, no border. Same colour day and night. - LineWidth=2 - Xpm="0 0 1 0" - "a c #989898" - -* Solid line, no border. Different colour for day and night. - LineWidth=2 - Xpm="0 0 2 0" - "a c #989898" - "b c #228844" - -* Solid line, border width 1, same colour day/night. The second colour is the - border colour, the first the main line colour. - LineWidth=2 - BorderWidth=1 - Xpm="0 0 2 0" - "a c #989898" - "b c #345544" - -* Solid line, border of 1, different day/night colours - LineWidth=2 - BorderWidth=1 - Xpm="0 0 4 0" - "a c #989898" - "b c #345544" - "3 c #119811" - "4 c #3499ee" - -Points (POI) -============ -A point can have any of the common tags and in addition can have the following -two tags to specify the icon to be used in day and/or night modes. - -DayXpm - The XPM to be used as the only or when the display is showing day-time - colours. - -NightXpm - This is optional and if given is an alternative XPM to use when showing - night-time colours. It must have the same width and height as the DayXpm, but - everything else about it can be different. - -Only the DayXpm will be explained, the NightXpm is exactly the same, except that -it is constrained to have the same width and height as the DayXpm. - -Unlike lines and polygons which are simple two colour bitmaps, points can have -many colours and partial transparency. There are several colour modes, mkgmap -will automatically determine which you need without having to specify it -separately. Each POI can have different colours, transparency schemes and sizes. - -* Up to 255 solid pixel colours -* Up to 254 solid pixel colours with an additional transparent pixel. -* Up to 255 pixel colours which can each have a different transparency value. -* Up to 16 million different colours, no transparency -* Up to 16 million different colours, one transparent pixel. - -Here are example of the input and the effect that is achieved. - -* A 10x5 icon with 5 solid colours - DayXpm="10 5 5 1" - "a c #112211" - ". c #1e2291" - "/ c #1ef291" - "@ c #1eff91" - "? c #11ff11" - "aaaaaaaaaa" - "a...aa//??" - "aaaaa@@//a" - "aaa.....aa" - "aaaaaaaaaa" - -* A 10x5 icon with 4 solid colours and a transparent pixel - DayXpm="10 5 5 1" - ". c #1e2291" - "/ c #1ef291" - "@ c #1eff91" - "? c #11ff11" - "a c none" - "aaaaaaaaaa" - "a...aa//??" - "aaaaa@@//a" - "aaa.....aa" - "aaaaaaaaaa" - -* Icon 10x5 with variable transparency on each colour. This is represented in the - normal way by adding an extra alpha value to the end of the RGB colour value. - The value 00 is completely transparent and FF is completely opaque. Since the - TYP format only has 15 different levels of transparency, you should restrict to - using the values [11, 22, 33, ... EE, FF]. However you can use any value and it - will be rounded to the nearest supported value. - DayXpm="10 5 5 1" - ". c #1e2291" - "/ c #1ef291" - "@ c #1eff91dd" - "? c #11ff1188" - "a c #00000000" - "aaaaaaaaaa" - "a...aa//??" - "aaaaa@@//a" - "aaa.....aa" - "aaaaaaaaaa" - - the first two colours are completely solid (if the alpha value is omitted it - defaults to FF as usual), the third is slightly transparent, down to the last - which is completely transparent. - An alternate notation is supported where the transparency value is appended to - the line in the form "alpha=13", this is a transparency value that goes from 0 - to 15, with 15 being completely transparent. As such it works the opposite way - to the alpha value of the normal RGBa values in the previous example. The - required conversions are made by mkgmap which ever one you use. -* Image with up to 16 million different colours By setting the number of colours - in the XPM to zero you can specify a different kind of image, where the colour - for each pixel is specified separately. - -Example - -IconXpm="10 10 0 0" -"#990088" -"#990088" -"#990067" -" ... and so on for 100 different values ..." - - -If you prefer you can place several pixel values on the same line, as long as -there are the correct number altogether. - -IconXpm="10 10 0 0" -"#990088 #990088 #990067" -" ... and so on for 100 different values ..." - -The spaces can be omitted for the most compact representation. It is also -possible to have a transparent pixel with this format, but there is currently not -a way to represent this. - -Icons -===== -An [_icons] section holds a set of images at different resolutions. The images -are intended to be of the same logo or icon at a range of different sizes to suit -different resolution devices. - -Only a few tags are valid in this section. - -* The - -Type tag is required. It identifies the point type that this image set will be -used for. - -* The - -String tag is also allowed, but it does not take a language code at the -beginning. Therefore there can only be one of them. - -The other tag that can be present is IconXpm. There can be several of these tags, -each one is a different resolution/size. Each one can have a different size, -colour mode, and number of colours. The appropriate version is selected according -the capabilities of the device it is being displayed on. - -The format of the IconXpm tags has the same possibilities as in the _point -sections. +If there is a bitmap then it is always has a width of 32, its height w \ No newline at end of file diff --git a/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/landuse_polygons b/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/landuse_polygons index c46085a8..767c72ce 100644 --- a/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/landuse_polygons +++ b/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/landuse_polygons @@ -6,7 +6,7 @@ landuse=farm |landuse=farmland [0x4e resolution 20] landuse=farmyard [0x10 resolution 22] landuse=forest|landuse=wood [0x50 resolution 20] landuse=greenfield [0x17 resolution 20] -landuse=meadow [0x17 resolution 19] +landuse=meadow | landuse=grass [0x17 resolution 19] landuse=military [0x04 resolution 19] landuse=quarry [0x0c resolution 19] landuse=recreation_ground [0x19 resolution 19] diff --git a/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/water_lines b/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/water_lines index e93ab4eb..c89add33 100644 --- a/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/water_lines +++ b/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/water_lines @@ -8,7 +8,6 @@ route=ferry {add mkgmap:ferry=1} [0x1b road_class=3 road_speed=0 resolution 19] (waterway=stream | waterway=drain) & intermittent=yes [0x10A02 resolution 22] waterway=canal [0x1f resolution 21] -waterway=drain [0x1f resolution 22] waterway=river [0x1f resolution 18] waterway=rapids|waterway=waterfall [0x1f resolution 22] -waterway=stream [0x18 resolution 22] +waterway=stream | waterway=drain [0x18 resolution 22] diff --git a/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/water_polygons b/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/water_polygons index d59f0fd1..25d5c0f0 100644 --- a/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/water_polygons +++ b/Freizeitkarte-Entwicklung/tools/mkgmap/examples/styles/default/inc/water_polygons @@ -8,6 +8,6 @@ natural=mud [0x51 resolution 20] natural=wetland [0x51 resolution 20] natural=water [0x3c resolution 18] natural=waterfall | waterway=waterfall [0x47 resolution 21] -natural=sea { add mkgmap:skipSizeFilter=true } [0x32 resolution 10] +natural=sea { add mkgmap:skipSizeFilter=true; set mkgmap:drawLevel=2 } [0x32 resolution 10] waterway=riverbank [0x46 resolution 20] diff --git a/Freizeitkarte-Entwicklung/tools/mkgmap/mkgmap.jar b/Freizeitkarte-Entwicklung/tools/mkgmap/mkgmap.jar index 8a68996d..df470025 100644 Binary files a/Freizeitkarte-Entwicklung/tools/mkgmap/mkgmap.jar and b/Freizeitkarte-Entwicklung/tools/mkgmap/mkgmap.jar differ