[Git][debian-gis-team/mkgmap][master] 5 commits: Require at least libosmpbf-java 1.3.3-14 for protobuf 3.11.4 changes.

Bas Couwenberg gitlab at salsa.debian.org
Thu Apr 23 10:53:07 BST 2020



Bas Couwenberg pushed to branch master at Debian GIS Project / mkgmap


Commits:
f146387e by Bas Couwenberg at 2020-04-23T11:18:27+02:00
Require at least libosmpbf-java 1.3.3-14 for protobuf 3.11.4 changes.

- - - - -
ef94661a by Bas Couwenberg at 2020-04-23T11:44:40+02:00
New upstream version 0.0.0+svn4483
- - - - -
047b07bc by Bas Couwenberg at 2020-04-23T11:44:54+02:00
Update upstream source from tag 'upstream/0.0.0+svn4483'

Update to upstream version '0.0.0+svn4483'
with Debian dir 3d6e721f80b68ee00d8fa774035af77a3593aeb6
- - - - -
e2f20b39 by Bas Couwenberg at 2020-04-23T11:45:12+02:00
New upstream SVN snapshot.

- - - - -
1d2d0c19 by Bas Couwenberg at 2020-04-23T11:46:10+02:00
Set distribution to unstable.

- - - - -


11 changed files:

- debian/changelog
- debian/control
- doc/options.txt
- resources/help/en/options
- resources/mkgmap-version.properties
- resources/styles/default/points
- resources/typ-files/mapnik.txt
- src/uk/me/parabola/mkgmap/CommandArgsReader.java
- src/uk/me/parabola/mkgmap/reader/osm/OsmHandler.java
- src/uk/me/parabola/mkgmap/typ/IdSection.java
- src/uk/me/parabola/mkgmap/typ/TypTextReader.java


Changes:

=====================================
debian/changelog
=====================================
@@ -1,8 +1,10 @@
-mkgmap (0.0.0+svn4475-2) UNRELEASED; urgency=medium
+mkgmap (0.0.0+svn4483-1) unstable; urgency=medium
 
+  * New upstream SVN snapshot.
   * Simplify launcher script.
+  * Require at least libosmpbf-java 1.3.3-14 for protobuf 3.11.4 changes..
 
- -- Bas Couwenberg <sebastic at debian.org>  Thu, 09 Apr 2020 18:07:01 +0200
+ -- Bas Couwenberg <sebastic at debian.org>  Thu, 23 Apr 2020 11:45:57 +0200
 
 mkgmap (0.0.0+svn4475-1) unstable; urgency=medium
 


=====================================
debian/control
=====================================
@@ -12,7 +12,7 @@ Build-Depends: ant,
                javahelper,
                libfastutil-java,
                libprotobuf-java,
-               libosmpbf-java,
+               libosmpbf-java (>= 1.3.3-14),
                time
 Standards-Version: 4.5.0
 Vcs-Browser: https://salsa.debian.org/debian-gis-team/mkgmap


=====================================
doc/options.txt
=====================================
@@ -61,14 +61,17 @@ wanted options before this.
 
 ;--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
+placed in the /Garmin folder of a microSD card (such as by mounting the
 device in USB mass storage mode). It can be used on already
 compiled img files, or 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. Can
-also be used for Windows programs.
+: 	Create a directory in the "gmapi" format required by Mac applications..
+It can also be used for Windows programs; copy the complete directory tree into
+{user}\AppData\Roaming\Garmin\Maps or \ProgramData\Garmin\Maps
+and the map will be available in BaseCamp.
+The directory name is --family-name with extension .gmap.
 
 ;-c filename
 ;--read-config=filename
@@ -96,13 +99,23 @@ 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
-: 	Set 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 to build a template.args file
-and pass it to mkgmap, then that file may contain a "description"
-that will override this option. To prevent splitter from overriding
-your description, place the --description option after "-c template.args".
+: 	Set the descriptive text for individual tiles and gmapsupp.img.
+Map tiles take the most recent --description before the --input-file
+option that defines the tile. Because gmapsupp.img is created after all
+the other tiles have been processed, gmapsupp.img takes the last --description
+found in the command line, regardless of where the --gmapsupp option is placed
+in the command line.
+<p>
+Note that if you use splitter with its --geonames-file option or its own --description
+option, the generated template.args file includes --description values that will apply
+to individual tiles. In this case it is not possible to override splitter's
+description for individual tiles from the mkgmap command line.
+Placing the mkgmap --description option after -c template.args ensures that the
+value is applied to gmapsupp.img.
+<p>
+Different GPS devices, MapSource, Basecamp and QLandkarte handle descriptions
+inconsistently. Some display the description when selecting maps or tiles,
+others use the family name.
 
 ;--country-name=name
 : 	Set the map's country name. The default is "COUNTRY".
@@ -338,28 +351,20 @@ after the overview map was created. The default is to keep the files.
 
 === Style options ===
 
-;--style-file=filename
-: 	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.
-<p>
-The file can be a zip file containing the files instead of a
-directory.
+;--style-file=directory|zip-filename|url
+: 	Specify the path to a directory, zip file or url containing style information.
+A style is composed of a group of files and typically contains the following files:
+version, info, options, points, lines, polygons, relations - see the style manual
+for further details.
 <p>
-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
+The style files can be in the specified directory or contained in a sub-directory.
+If styles are contained in sub-directories then the required style must be specified
 with the --style option.
-<p>
-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.
+location containing multiple styles. If used without also
+specifying --style-file, it selects one of the built-in styles.
 
 ;--style-option=tag[=value][;tag[=value]...]
 : 	Provide a semicolon separated list of tags which can be used in the style.
@@ -399,15 +404,15 @@ found will be used.  e.g. --name-tag-list=name:en,int_name,name
 
 ;--family-id=integer
 : 	This is an integer that identifies a family of products.
-Range: [1..9999]
+Range: [1..65535]
 Default: 6324
 
 ;--family-name=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.
-<p>
-Example: --family-name="OpenStreetmap mkgmap XL 2019"
+The default is "OSM map".
+:	Example: --family-name="OpenStreetmap mkgmap XL 2019"
 
 ;--product-id=integer
 : 	This is an integer that identifies a product within a family.
@@ -432,7 +437,7 @@ part of the mapname in the list of the individual maps.
 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 and
 be UTF-8 encoded. The following symbols will be substituted by mkgmap:
-$MKGMAP_VERSION$, $JAVA_VERSION$, $YEAR$, $LONG_DATE$, $SHORT_DATE$ and $TIME$.
+$MKGMAP_VERSION$, $JAVA_VERSION$, $YEAR$, $LONGDATE$, $SHORTDATE$ and $TIME$.
 Time and date substitutions use the local date and time formats.
 
 ;--license-file=filename
@@ -493,16 +498,16 @@ files containing height information for the area covered by the map, the so
 called hgt files, which typically cover 1 degree latitude * 1 degree longitude
 and are named by the coordinates of their bottom left corner (e.g. N53E009). They
 contain height information in a grid of points. Typical hgt files contain either
-1'' or 3'' data. 3'' files have 1201 * 1201 points, which gives
-2 * 1201 * 1201 = 2.884.802 bytes. 1'' files have 3601 * 3601 points, which gives
-2 * 3601 * 3601 = 25.934.402 bytes. Other files are supported as long as the
-formula sqrt(size/2) gives an integer value.
+1 arc second or 3 arc second data. 3 arc second files have 1201 x 1201 points, which means
+files contain 2 x 1201 x 1201 = 2,884,802 bytes. 1 arc second files have 3601 x 3601 points,
+with a file size of 25,934,402 bytes. Other files are supported as long as the
+formula sqrt(filesize/2) gives an integer value.
 
 ;--dem=path[,path...]
 :   The option expects a comma separated list of paths to directories or zip
 files containing *.hgt files. Directories are searched for *.hgt files
 and also for *.hgt.zip and *.zip files.
-:   The list is searched in the given order, so if you want to use 1'' files
+:   The list is searched in the given order, so if you want to use 1 arc second files
 make sure that they are found first. There are different sources for *.hgt
 files, some have so called voids which are areas without data. Those should be
 avoided.
@@ -514,11 +519,11 @@ resolution found in the *.hgt files. For desktop programs like MapSource or
 Basecamp you only need one zoom level, for GPS devices you need one for each
 resolution given with the --levels option. The actual values are given as
 distance between two DEM points and should be a multiple or submultiple of the
-distance between two points in the hgt file, that is 3314 for 1'' and 9942 for
-3''. Higher distances mean lower resolution and thus fewer bytes in the map.
+distance between two points in the hgt file, that is 3314 for 1 arc second and 9942 for
+3 arc second. Higher distances mean lower resolution and thus fewer bytes in the map.
 Reasonable values for the highest resolution should not be much smaller than
-50% hgt resolution, that is somewhere between 1648 and 5520 for 1'' hgt input
-files (3312 is often used), and 5520 to 9942 for 3'' hgt input files.
+50% hgt resolution, that is somewhere between 1648 and 5520 for 1 arc second hgt input
+files (3312 is often used), and 5520 to 9942 for 3 arc second hgt input files.
 :	Example which should work with levels="0:24, 1:22, 2:20, 3:18":
 :	--dem-dists=3312,13248,26512,53024
 :	This was found in a Garmin Demo map for transalpin data created 2009.
@@ -736,51 +741,44 @@ data. The coastline data from the input files is removed if
 this option is set. Files must have OSM or PBF file format.	
 
 ;--generate-sea[=ValueList]
-: 	Generate sea polygons. ValueList is an optional comma
-separated list of values:
-
+:	Generate sea polygons. ValueList is a 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.
-
+polygons with land-tag (see following).
 :;no-sea-sectors
 :: disable the generation of "sea sectors" when the
 coastline fails to reach the tile's boundary.
+Under some conditions land sectors are generated instead and these use land-tag.
 :;extend-sea-sectors
-:: same as no-sea-sectors. Additional adds a point so coastline reaches the nearest tile boundary.
-
+:: Adds a point so coastline reaches the nearest tile boundary.
+This implies no-sea-sectors.
 :;land-tag=TAG=VAL
 :: tag to use for land polygons (default natural=land).
+If not using "multipolygon" or land sectors are being generated, then
+a suitable land polygon type needs to be defined in the style
+file (suggested type is 0x010100 or 0x54) and the polygon must
+be defined in the TYP file as having a higher drawing
+level than the sea polygon type.
 :;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
@@ -899,8 +897,7 @@ 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.
+filling of missing information could be enabled using the --location-autofill option.
 Default is enabled, use --no-poi-address to disable.
 
 ;--verbose


=====================================
resources/help/en/options
=====================================
@@ -59,14 +59,17 @@ filename
 
 --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 already compiled img files, or if the
+    the /Garmin folder of a microSD card (such as by mounting the device in USB
+    mass storage mode). It can be used on already compiled img files, or 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. Can
-    also be used for Windows programs.
+    Create a directory in the "gmapi" format required by Mac applications. It
+    can also be used for Windows programs; copy the complete directory tree
+    into {user}\AppData\Roaming\Garmin\Maps or \ProgramData\Garmin\Maps and the
+    map will be available in BaseCamp. The directory name is --family-name with
+    extension .gmap.
 
 -c filename
 --read-config=filename
@@ -94,13 +97,23 @@ filename
     not clash with others.
 
 --description=text
-    Set 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
-    to build a template.args file and pass it to mkgmap, then that file may
-    contain a "description" that will override this option. To prevent splitter
-    from overriding your description, place the --description option after "-c
-    template.args".
+    Set the descriptive text for individual tiles and gmapsupp.img. Map tiles
+    take the most recent --description before the --input-file option that
+    defines the tile. Because gmapsupp.img is created after all the other tiles
+    have been processed, gmapsupp.img takes the last --description found in the
+    command line, regardless of where the --gmapsupp option is placed in the
+    command line.
+
+     Note that if you use splitter with its --geonames-file option or its own
+    --description option, the generated template.args file includes
+    --description values that will apply to individual tiles. In this case it
+    is not possible to override splitter's description for individual tiles
+    from the mkgmap command line. Placing the mkgmap --description option after
+    -c template.args ensures that the value is applied to gmapsupp.img.
+
+     Different GPS devices, MapSource, Basecamp and QLandkarte handle
+    descriptions inconsistently. Some display the description when selecting
+    maps or tiles, others use the family name.
 
 --country-name=name
     Set the map's country name. The default is "COUNTRY".
@@ -330,26 +343,20 @@ filename
 
 === Style options ===
 
---style-file=filename
-    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.
+--style-file=directory|zip-filename|url
+    Specify the path to a directory, zip file or url containing style
+    information. A style is composed of a group of files and typically contains
+    the following files: version, info, options, points, lines, polygons,
+    relations - see the style manual for further details.
 
-     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.
+     The style files can be in the specified directory or contained in a
+    sub-directory. If styles are contained in sub-directories then the required
+    style must be specified with the --style option.
 
 --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 location
+    containing multiple styles. If used without also specifying --style-file,
+    it selects one of the built-in styles.
 
 --style-option=tag[=value][;tag[=value]...]
     Provide a semicolon separated list of tags which can be used in the style.
@@ -386,14 +393,14 @@ filename
 === Product description options ===
 
 --family-id=integer
-    This is an integer that identifies a family of products. Range: [1..9999]
+    This is an integer that identifies a family of products. Range: [1..65535]
     Default: 6324
 
 --family-name=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"
+    your maps. Garmin will display this in the map selection screen. The
+    default is "OSM map".
+    Example: --family-name="OpenStreetmap mkgmap XL 2019"
 
 --product-id=integer
     This is an integer that identifies a product within a family. It is often
@@ -418,7 +425,7 @@ filename
     message is not displayed on a device, but is shown in BaseCamp. The
     copyright file must include at least two lines and be UTF-8 encoded. The
     following symbols will be substituted by mkgmap: $MKGMAP_VERSION$,
-    $JAVA_VERSION$, $YEAR$, $LONG_DATE$, $SHORT_DATE$ and $TIME$. Time and date
+    $JAVA_VERSION$, $YEAR$, $LONGDATE$, $SHORTDATE$ and $TIME$. Time and date
     substitutions use the local date and time formats.
 
 --license-file=filename
@@ -476,20 +483,20 @@ filename
     covered by the map, the so called hgt files, which typically cover 1 degree
     latitude * 1 degree longitude and are named by the coordinates of their
     bottom left corner (e.g. N53E009). They contain height information in a
-    grid of points. Typical hgt files contain either 1'' or 3'' data. 3'' files
-    have 1201 * 1201 points, which gives 2 * 1201 * 1201 = 2.884.802 bytes. 1''
-    files have 3601 * 3601 points, which gives 2 * 3601 * 3601 = 25.934.402
-    bytes. Other files are supported as long as the formula sqrt(size/2) gives
-    an integer value.
+    grid of points. Typical hgt files contain either 1 arc second or 3 arc
+    second data. 3 arc second files have 1201 x 1201 points, which means files
+    contain 2 x 1201 x 1201 = 2,884,802 bytes. 1 arc second files have 3601 x
+    3601 points, with a file size of 25,934,402 bytes. Other files are
+    supported as long as the formula sqrt(filesize/2) gives an integer value.
 
 --dem=path[,path...]
     The option expects a comma separated list of paths to directories or zip
     files containing *.hgt files. Directories are searched for *.hgt files and
     also for *.hgt.zip and *.zip files.
-    The list is searched in the given order, so if you want to use 1'' files
-    make sure that they are found first. There are different sources for *.hgt
-    files, some have so called voids which are areas without data. Those should
-    be avoided.
+    The list is searched in the given order, so if you want to use 1 arc second
+    files make sure that they are found first. There are different sources for
+    *.hgt files, some have so called voids which are areas without data. Those
+    should be avoided.
 
 --dem-dists=number[,number...]
     If given, the option specifies the resolution(s) or zoom level for the DEM
@@ -499,11 +506,12 @@ filename
     need one for each resolution given with the --levels option. The actual
     values are given as distance between two DEM points and should be a
     multiple or submultiple of the distance between two points in the hgt file,
-    that is 3314 for 1'' and 9942 for 3''. Higher distances mean lower
-    resolution and thus fewer bytes in the map. Reasonable values for the
-    highest resolution should not be much smaller than 50% hgt resolution, that
-    is somewhere between 1648 and 5520 for 1'' hgt input files (3312 is often
-    used), and 5520 to 9942 for 3'' hgt input files.
+    that is 3314 for 1 arc second and 9942 for 3 arc second. Higher distances
+    mean lower resolution and thus fewer bytes in the map. Reasonable values
+    for the highest resolution should not be much smaller than 50% hgt
+    resolution, that is somewhere between 1648 and 5520 for 1 arc second hgt
+    input files (3312 is often used), and 5520 to 9942 for 3 arc second hgt
+    input files.
     Example which should work with levels="0:24, 1:22, 2:20, 3:18":
     --dem-dists=3312,13248,26512,53024
     This was found in a Garmin Demo map for transalpin data created 2009..
@@ -717,50 +725,42 @@ filename
     must have OSM or PBF file format.
 
 --generate-sea[=ValueList]
-    Generate sea polygons. ValueList is an optional comma separated list of
-    values:
-
+    Generate sea polygons. ValueList is a 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.
-
+        background sea polygon plus individual land polygons with land-tag (see
+        following).
     no-sea-sectors
         disable the generation of "sea sectors" when the coastline fails to
-        reach the tile's boundary.
+        reach the tile's boundary. Under some conditions land sectors are
+        generated instead and these use land-tag.
     extend-sea-sectors
-        same as no-sea-sectors. Additional adds a point so coastline reaches
-        the nearest tile boundary.
-
+        Adds a point so coastline reaches the nearest tile boundary. This
+        implies no-sea-sectors.
     land-tag=TAG=VAL
-        tag to use for land polygons (default natural=land).
+        tag to use for land polygons (default natural=land). If not using
+        "multipolygon" or land sectors are being generated, then a suitable
+        land polygon type needs to be defined in the style file (suggested type
+        is 0x010100 or 0x54) and the polygon must be defined in the TYP file as
+        having a higher drawing level than the sea polygon type.
     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
@@ -874,7 +874,7 @@ filename
 --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,
+    could be enabled using the --location-autofill option. Default is enabled,
     use --no-poi-address to disable.
 
 --verbose


=====================================
resources/mkgmap-version.properties
=====================================
@@ -1,2 +1,2 @@
-svn.version: 4475
-build.timestamp: 2020-03-26T06:28:05+0000
+svn.version: 4483
+build.timestamp: 2020-04-19T08:34:26+0100


=====================================
resources/styles/default/points
=====================================
@@ -10,40 +10,62 @@
 
 addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
 
+# impose routing/speed restrictions due to access/barrier. See option --link-pois-to-ways
+
+vehicle=* {
+    add bicycle='${vehicle}';
+    add motor_vehicle='${vehicle}';
+    }
+motor_vehicle=* {
+    add motorcar='${motor_vehicle}';
+    add goods='${motor_vehicle}';
+    add hgv='${motor_vehicle}';
+    add psv='${motor_vehicle}';
+    add emergency='${motor_vehicle}';
+    }
+psv=* {
+    add taxi='${psv}';
+    add bus='${psv}';
+    }
+
 barrier=* & bicycle=*   {set mkgmap:bicycle  =  '${bicycle|subst:private=>no}'}
 barrier=* & foot=*      {set mkgmap:foot     =     '${foot|subst:private=>no}'}
 barrier=* & hgv=*       {set mkgmap:truck    =      '${hgv|subst:private=>no}'}
 barrier=* & motorcar=*  {set mkgmap:car      = '${motorcar|subst:private=>no}'}
-barrier=* & psv=*       {set mkgmap:bus      =      '${psv|subst:private=>no}'}
+barrier=* & bus=*       {set mkgmap:bus      =      '${bus|subst:private=>no}'}
 barrier=* & taxi=*      {set mkgmap:taxi     =     '${taxi|subst:private=>no}'}
 barrier=* & emergency=* {set mkgmap:emergency='${emergency|subst:private=>no}'}
-barrier=* & delivery=*  {set mkgmap:delivery = '${delivery|subst:private=>no}'}
-barrier=* & access=*    {addaccess               '${access|subst:private=>no}'}
-
-barrier=bollard | barrier=cycle_barrier {
-    add mkgmap:bicycle=yes;
-    add mkgmap:foot=yes;
-    addaccess no;
-    set mkgmap:road-speed=1;
+barrier=* & goods=*     {set mkgmap:delivery =    '${goods|subst:private=>no}'}
+
+barrier=bollard | barrier=block {
+    add mkgmap:car=no;
+    add mkgmap:delivery=no;
+    add mkgmap:truck=no;
+    add mkgmap:bus=no;
+    add mkgmap:taxi=no;
+    add mkgmap:emergency=no;
     }
-barrier=bus_trap {
-    add mkgmap:bus=yes;
-    add mkgmap:foot=yes;
-    add mkgmap:bicycle=yes;
-    addaccess no;
-    set mkgmap:road-speed=1;
-    }
-barrier=gate {
-    add mkgmap:bicycle=yes;
-    add mkgmap:foot=yes;
-    addaccess no;
+barrier=cycle_barrier | barrier=kissing_gate | barrier=stile {
+    add mkgmap:bicycle=no;
+    add mkgmap:car=no;
+    add mkgmap:delivery=no;
+    add mkgmap:truck=no;
+    add mkgmap:bus=no;
+    add mkgmap:taxi=no;
+    add mkgmap:emergency=no;
     set mkgmap:road-speed=0;
     }
-barrier=kissing_gate | barrier=stile | barrier=block {
-    add mkgmap:foot=yes;
-    addaccess no;
+barrier=bus_trap {
+    add mkgmap:car=no;
+    add mkgmap:delivery=no;
+    add mkgmap:truck=no;
+    add mkgmap:taxi=no;
+    }
+barrier=gate | barrier=lift_gate | barrier=swing_gate {
     set mkgmap:road-speed=0;
     }
+barrier=* {add mkgmap:road-speed=1}
+barrier=* & access=* {addaccess '${access|subst:private=>no}'}
 
 internet_access=yes {name 'Internet ${name}' | 'Internet'} [0x2f12 resolution 24 continue]
 internet_access=* & internet_access!=no & internet_access!=yes


=====================================
resources/typ-files/mapnik.txt
=====================================
@@ -1,28 +1,33 @@
 ; TYP file to give mapnik rendering
 ; -*- coding: UTF-8 -*- NB: first 3 bytes/char in file is UTF-8 encoded ByteOrderMark (BOM)
-;
-;This program is free software; you can redistribute it and/or modify
-;it under the terms of the GNU General Public License version 3 or
-;version 2 as published by the Free Software Foundation.
-;
-;This program is distributed in the hope that it will be useful, but
-;WITHOUT ANY WARRANTY; without even the implied warranty of
-;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;General Public License for more details.
-;
-;Author: Jorisbo at hotmail.com
-;
-;Based on mkgmap default style version: r4293...4288
-;
+
+[_comments]
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 3 or
+version 2 as published by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+Author: Jorisbo at hotmail.com and others
+
+Based on mkgmap default style version: r4293
+[End]
+
+
 [_id]
 ;ProductCode=1   set from --product-id
 ;FID=8094        set from --family-id
 ;CodePage=65001  set from --code-page
 [End]
-;
+
+
+;=========== POLYGONS : RENDERING PRIORITY ======
 [_drawOrder]
-Type=0x04b,1
 Type=0x03d,1
+Type=0x04b,1
 Type=0x002,2
 Type=0x003,2
 Type=0x007,2
@@ -75,7 +80,11 @@ Type=0x06a,7
 Type=0x06c,8
 Type=0x004,9
 [End]
-;
+
+
+;===================== POLYGONS ========================
+
+
 [_polygon]
 type=0x02
 ;GRMN_TYPE: Urban Areas/SMALL_CITY/Small urban area, less than 200 000 inhabitants/Non NT
@@ -768,40 +777,40 @@ ExtendedLabels=Y
 FontStyle=NoLabel (invisible)
 CustomColor=No
 Xpm="32 32 2 1"
-". c none"
-"1 c #FFFFFF"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
-"................................"
+"! c #FFFFFF"
+"  c none"
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
+"                                "
 ;12345678901234567890123456789012
 [end]
 [_polygon]
@@ -1184,7 +1193,11 @@ CustomColor=No
 Xpm="0 0 1 0"
 "1 c #BBBBBB"
 [end]
-;
+
+
+;====================== LINES ===========================
+
+
 [_line]
 type=0x01
 ;GRMN_TYPE: Roads/INTERSTATE, MAJOR_HWY/Primary, divided, limited-access highway, akin to an interstate in the US/Non NT, NT
@@ -2015,7 +2028,11 @@ ExtendedLabels=Y
 FontStyle=NoLabel (invisible)
 CustomColor=No
 [end]
-;
+
+
+;====================== POINTS ==========================
+
+
 [_point]
 type=0x001
 subtype=0x00


=====================================
src/uk/me/parabola/mkgmap/CommandArgsReader.java
=====================================
@@ -176,7 +176,7 @@ public class CommandArgsReader {
 		log.debug("adding option", option, value);
 
 		// Note if an explicit mapname is set
-		if (option.equals("mapname")) {
+		if ("mapname".equals(option)) {
 			if (extractMapName(value) == null || "00000000".equals(extractMapName(value))) {
 				throw new ExitException("invalid value for option: mapname="+value+" - mapname should be a 8 digit integer, default is 63240001");
 			} else { 
@@ -184,6 +184,20 @@ public class CommandArgsReader {
 			}
 		}
 
+		if ("family-id".equals(option)) {
+			int fid = -1;
+			try {
+				fid = Integer.parseInt(value);
+			} catch (NumberFormatException e) {
+				fid = -1;
+			}
+			if (fid <= 0 || fid > 0xffff) {
+				throw new ExitException("invalid value for option: family-id=" + value
+						+ " - family-id should be an integer between 1 and 65535, default is "
+						+ CommandArgs.DEFAULT_FAMILYID);
+			}
+		}
+		
 		switch (option) {
 		case "input-file":
 			if (value != null){


=====================================
src/uk/me/parabola/mkgmap/reader/osm/OsmHandler.java
=====================================
@@ -100,6 +100,8 @@ public abstract class OsmHandler {
 	 * should be discarded.
 	 */
 	protected String keepTag(String key, String val) {
+		if (val.isEmpty())
+			return null;
 		if(deletedTags != null) {
 			Set<String> vals = deletedTags.get(key);
 			if(vals != null && (vals.isEmpty() || vals.contains(val))) {


=====================================
src/uk/me/parabola/mkgmap/typ/IdSection.java
=====================================
@@ -13,6 +13,7 @@
 package uk.me.parabola.mkgmap.typ;
 
 import uk.me.parabola.imgfmt.app.typ.TypData;
+import uk.me.parabola.log.Logger;
 import uk.me.parabola.mkgmap.scan.SyntaxException;
 import uk.me.parabola.mkgmap.scan.TokenScanner;
 import uk.me.parabola.mkgmap.srt.SrtTextReader;
@@ -23,6 +24,8 @@ import uk.me.parabola.mkgmap.srt.SrtTextReader;
  * @author Steve Ratcliffe
  */
 class IdSection implements ProcessSection {
+	private static final Logger log = Logger.getLogger(IdSection.class);
+
 	private final TypData data;
 
 	public IdSection(TypData data) {
@@ -34,15 +37,25 @@ class IdSection implements ProcessSection {
 		try {
 			ival = Integer.decode(value);
 		} catch (NumberFormatException e) {
-			throw new SyntaxException(scanner, "Bad integer " + value);
+			/* throw new SyntaxException(scanner, "Bad integer " + value);
+			 *
+			 * TYPViewer can leave these as:
+			 * FID=
+			 * ProductCode=
+			 * so just give a warning. Values will be supplied from mkgmap options.
+			 */
+			log.warn("bad/missing integer in TYP [_id] statement: ", name, "=", value);
+			ival = -1;
 		}
 
 		if (name.equalsIgnoreCase("FID")) {
-			data.setFamilyId(ival);
+			if (ival != -1)
+				data.setFamilyId(ival);
 		} else if (name.equalsIgnoreCase("ProductCode")) {
-			data.setProductId(ival);
+			if (ival != -1)
+				data.setProductId(ival);
 		} else if (name.equalsIgnoreCase("CodePage")) {
-			if (data.getSort() == null) // ignore if --code-page
+			if (ival != -1 && data.getSort() == null) // ignore if --code-page
 				data.setSort(SrtTextReader.sortForCodepage(ival));
 		} else {
 			throw new SyntaxException(scanner, "Unrecognised keyword in id section: " + name);


=====================================
src/uk/me/parabola/mkgmap/typ/TypTextReader.java
=====================================
@@ -116,6 +116,23 @@ public class TypTextReader {
 			return new IconSection(data);
 		} else if ("_id".equals(sectionName)) {
 			return new IdSection(data);
+		} else if ("_comments".equals(sectionName)) {
+			// Need to really ignore everything (IgnoreSection tries to parse first bit of each line as name=...)
+			Token tstTok;
+			do {
+				scanner.skipLine(); // after _comments] or testing next line
+				tstTok = scanner.nextToken();
+				if (tstTok.getType() == TokType.SYMBOL && "[".equals(tstTok.getValue())) {
+					tstTok = scanner.nextRawToken();
+					if (tstTok.getType() == TokType.TEXT && "end".equalsIgnoreCase(tstTok.getValue())) {
+						tstTok = scanner.nextRawToken();
+						if (tstTok.getType() == TokType.SYMBOL && "]".equals(tstTok.getValue())) {
+							break;
+						}
+					}
+				}
+			} while (tstTok.getType() != TokType.EOF);
+			return null;
 		} else {
 			log.warn("Unrecognised section " + sectionName);
 			return new IgnoreSection(data);



View it on GitLab: https://salsa.debian.org/debian-gis-team/mkgmap/-/compare/08be9b38ec0406adcd0fc1f68ce5c3a6f2734e29...1d2d0c199c222211ad7a3ecb52d947b9a5d03ed5

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/mkgmap/-/compare/08be9b38ec0406adcd0fc1f68ce5c3a6f2734e29...1d2d0c199c222211ad7a3ecb52d947b9a5d03ed5
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20200423/16b2b305/attachment-0001.html>


More information about the Pkg-grass-devel mailing list