Codebase list mkgmap / 047b07b
Update upstream source from tag 'upstream/0.0.0+svn4483' Update to upstream version '0.0.0+svn4483' with Debian dir 3d6e721f80b68ee00d8fa774035af77a3593aeb6 Bas Couwenberg 4 years ago
9 changed file(s) with 295 addition(s) and 213 deletion(s). Raw diff Collapse all Expand all
6060
6161 ;--gmapsupp
6262 : Create a gmapsupp.img file that can be uploaded to a Garmin or
63 placed in "/Garmin" in a microSD card (such as by mounting the
63 placed in the /Garmin folder of a microSD card (such as by mounting the
6464 device in USB mass storage mode). It can be used on already
6565 compiled img files, or if the input files are not already compiled
6666 then they are compiled first and then the gmapsupp is created.
6767
6868 ;--gmapi
69 : Create a directory in the "gmapi" format required by Mac applications. Can
70 also be used for Windows programs.
69 : Create a directory in the "gmapi" format required by Mac applications.
70 It can also be used for Windows programs; copy the complete directory tree into
71 {user}\AppData\Roaming\Garmin\Maps or \ProgramData\Garmin\Maps
72 and the map will be available in BaseCamp.
73 The directory name is --family-name with extension .gmap.
7174
7275 ;-c filename
7376 ;--read-config=filename
9598 that it is unique and does not clash with others.
9699
97100 ;--description=text
98 : Set the descriptive text for the map. This may be displayed in
99 QLandkarte, MapSource or on a GPS, where it is normally shown
100 below the family name. Example: --description="Germany, Denmark"
101 Please note: if you use splitter to build a template.args file
102 and pass it to mkgmap, then that file may contain a "description"
103 that will override this option. To prevent splitter from overriding
104 your description, place the --description option after "-c template.args".
101 : Set the descriptive text for individual tiles and gmapsupp.img.
102 Map tiles take the most recent --description before the --input-file
103 option that defines the tile. Because gmapsupp.img is created after all
104 the other tiles have been processed, gmapsupp.img takes the last --description
105 found in the command line, regardless of where the --gmapsupp option is placed
106 in the command line.
107 <p>
108 Note that if you use splitter with its --geonames-file option or its own --description
109 option, the generated template.args file includes --description values that will apply
110 to individual tiles. In this case it is not possible to override splitter's
111 description for individual tiles from the mkgmap command line.
112 Placing the mkgmap --description option after -c template.args ensures that the
113 value is applied to gmapsupp.img.
114 <p>
115 Different GPS devices, MapSource, Basecamp and QLandkarte handle descriptions
116 inconsistently. Some display the description when selecting maps or tiles,
117 others use the family name.
105118
106119 ;--country-name=name
107120 : Set the map's country name. The default is "COUNTRY".
337350
338351 === Style options ===
339352
340 ;--style-file=filename
341 : Specify an external file to obtain the style from. "file" can
342 be a directory containing files such as info, lines, options
343 (see resources/styles/default for an example). The directory
344 path must be absolute or relative to the current working
345 directory when mkgmap is invoked.
346 <p>
347 The file can be a zip file containing the files instead of a
348 directory.
349 <p>
350 The files can be at the top level or contained in a folder within
351 the zip file. If the zip file contains more than one top level
352 folder then each folder is the name of a style that can be selected
353 ;--style-file=directory|zip-filename|url
354 : Specify the path to a directory, zip file or url containing style information.
355 A style is composed of a group of files and typically contains the following files:
356 version, info, options, points, lines, polygons, relations - see the style manual
357 for further details.
358 <p>
359 The style files can be in the specified directory or contained in a sub-directory.
360 If styles are contained in sub-directories then the required style must be specified
353361 with the --style option.
354 <p>
355 The argument can also be a URL that specifies the location of a
356 style file.
357362
358363 ;--style=name
359364 : Specify a style name. Must be used if --style-file points to a
360 directory or zip file containing multiple styles. If --style-file
361 is not used, it selects one of the built-in styles.
365 location containing multiple styles. If used without also
366 specifying --style-file, it selects one of the built-in styles.
362367
363368 ;--style-option=tag[=value][;tag[=value]...]
364369 : Provide a semicolon separated list of tags which can be used in the style.
398403
399404 ;--family-id=integer
400405 : This is an integer that identifies a family of products.
401 Range: [1..9999]
406 Range: [1..65535]
402407 Default: 6324
403408
404409 ;--family-name=name
405410 : If you build several maps, this option describes the
406411 family name of all of your maps. Garmin will display this
407412 in the map selection screen.
408 <p>
409 Example: --family-name="OpenStreetmap mkgmap XL 2019"
413 The default is "OSM map".
414 : Example: --family-name="OpenStreetmap mkgmap XL 2019"
410415
411416 ;--product-id=integer
412417 : This is an integer that identifies a product within a family.
431436 Note that the first copyright message is not displayed on a device, but is
432437 shown in BaseCamp. The copyright file must include at least two lines and
433438 be UTF-8 encoded. The following symbols will be substituted by mkgmap:
434 $MKGMAP_VERSION$, $JAVA_VERSION$, $YEAR$, $LONG_DATE$, $SHORT_DATE$ and $TIME$.
439 $MKGMAP_VERSION$, $JAVA_VERSION$, $YEAR$, $LONGDATE$, $SHORTDATE$ and $TIME$.
435440 Time and date substitutions use the local date and time formats.
436441
437442 ;--license-file=filename
492497 called hgt files, which typically cover 1 degree latitude * 1 degree longitude
493498 and are named by the coordinates of their bottom left corner (e.g. N53E009). They
494499 contain height information in a grid of points. Typical hgt files contain either
495 1'' or 3'' data. 3'' files have 1201 * 1201 points, which gives
496 2 * 1201 * 1201 = 2.884.802 bytes. 1'' files have 3601 * 3601 points, which gives
497 2 * 3601 * 3601 = 25.934.402 bytes. Other files are supported as long as the
498 formula sqrt(size/2) gives an integer value.
500 1 arc second or 3 arc second data. 3 arc second files have 1201 x 1201 points, which means
501 files contain 2 x 1201 x 1201 = 2,884,802 bytes. 1 arc second files have 3601 x 3601 points,
502 with a file size of 25,934,402 bytes. Other files are supported as long as the
503 formula sqrt(filesize/2) gives an integer value.
499504
500505 ;--dem=path[,path...]
501506 : The option expects a comma separated list of paths to directories or zip
502507 files containing *.hgt files. Directories are searched for *.hgt files
503508 and also for *.hgt.zip and *.zip files.
504 : The list is searched in the given order, so if you want to use 1'' files
509 : The list is searched in the given order, so if you want to use 1 arc second files
505510 make sure that they are found first. There are different sources for *.hgt
506511 files, some have so called voids which are areas without data. Those should be
507512 avoided.
513518 Basecamp you only need one zoom level, for GPS devices you need one for each
514519 resolution given with the --levels option. The actual values are given as
515520 distance between two DEM points and should be a multiple or submultiple of the
516 distance between two points in the hgt file, that is 3314 for 1'' and 9942 for
517 3''. Higher distances mean lower resolution and thus fewer bytes in the map.
521 distance between two points in the hgt file, that is 3314 for 1 arc second and 9942 for
522 3 arc second. Higher distances mean lower resolution and thus fewer bytes in the map.
518523 Reasonable values for the highest resolution should not be much smaller than
519 50% hgt resolution, that is somewhere between 1648 and 5520 for 1'' hgt input
520 files (3312 is often used), and 5520 to 9942 for 3'' hgt input files.
524 50% hgt resolution, that is somewhere between 1648 and 5520 for 1 arc second hgt input
525 files (3312 is often used), and 5520 to 9942 for 3 arc second hgt input files.
521526 : Example which should work with levels="0:24, 1:22, 2:20, 3:18":
522527 : --dem-dists=3312,13248,26512,53024
523528 : This was found in a Garmin Demo map for transalpin data created 2009.
735740 this option is set. Files must have OSM or PBF file format.
736741
737742 ;--generate-sea[=ValueList]
738 : Generate sea polygons. ValueList is an optional comma
739 separated list of values:
740
743 : Generate sea polygons. ValueList is a comma separated list of values:
741744 :;multipolygon
742745 :: generate the sea using a multipolygon (the default behaviour so this really doesn't need to be specified).
743
744746 :;polygons | no-mp
745747 :: don't generate the sea using a multipolygon - instead,
746748 generate a background sea polygon plus individual land
747 polygons with tag natural=land. This requires a
748 suitable land polygon type to be defined in the style
749 file (suggested type is 0x010100) and the polygon must
750 be defined in the TYP file as having a higher drawing
751 level than the sea polygon type.
752
749 polygons with land-tag (see following).
753750 :;no-sea-sectors
754751 :: disable the generation of "sea sectors" when the
755752 coastline fails to reach the tile's boundary.
753 Under some conditions land sectors are generated instead and these use land-tag.
756754 :;extend-sea-sectors
757 :: same as no-sea-sectors. Additional adds a point so coastline reaches the nearest tile boundary.
758
755 :: Adds a point so coastline reaches the nearest tile boundary.
756 This implies no-sea-sectors.
759757 :;land-tag=TAG=VAL
760758 :: tag to use for land polygons (default natural=land).
759 If not using "multipolygon" or land sectors are being generated, then
760 a suitable land polygon type needs to be defined in the style
761 file (suggested type is 0x010100 or 0x54) and the polygon must
762 be defined in the TYP file as having a higher drawing
763 level than the sea polygon type.
761764 :;close-gaps=NUM
762765 :: close gaps in coastline that are less than this distance (metres)
763
764766 :;floodblocker
765767 :: enable the flood blocker that prevents a flooding of
766768 land by checking if the sea polygons contain streets
767769 (works only with multipolygon processing)
768
769770 :;fbgap=NUM
770771 :: flood blocker gap in metre (default 40)
771772 points that are closer to the sea polygon do not block
772
773773 :;fbthres=NUM
774774 :: at least so many highway points must be contained in
775775 a sea polygon so that it may be removed by the flood
776776 blocker (default 20)
777
778777 :;fbratio=NUM
779778 :: only sea polygons with a higher ratio
780779 (highway points * 100000 / polygon size) are removed
781780 (default 0.5)
782
783781 :;fbdebug
784782 :: switches on the debugging of the flood blocker
785783 generates GPX files for each polygon checked by
898896 ;--poi-address
899897 : Enable address / phone information to POIs. Address info is
900898 read according to the "Karlsruhe" tagging schema. Automatic
901 filling of missing information could be enabled using the
902 "location-autofill" option.
899 filling of missing information could be enabled using the --location-autofill option.
903900 Default is enabled, use --no-poi-address to disable.
904901
905902 ;--verbose
5858
5959 --gmapsupp
6060 Create a gmapsupp.img file that can be uploaded to a Garmin or placed in
61 "/Garmin" in a microSD card (such as by mounting the device in USB mass
62 storage mode). It can be used on already compiled img files, or if the
61 the /Garmin folder of a microSD card (such as by mounting the device in USB
62 mass storage mode). It can be used on already compiled img files, or if the
6363 input files are not already compiled then they are compiled first and then
6464 the gmapsupp is created.
6565
6666 --gmapi
67 Create a directory in the "gmapi" format required by Mac applications. Can
68 also be used for Windows programs.
67 Create a directory in the "gmapi" format required by Mac applications. It
68 can also be used for Windows programs; copy the complete directory tree
69 into {user}\AppData\Roaming\Garmin\Maps or \ProgramData\Garmin\Maps and the
70 map will be available in BaseCamp. The directory name is --family-name with
71 extension .gmap.
6972
7073 -c filename
7174 --read-config=filename
9396 not clash with others.
9497
9598 --description=text
96 Set the descriptive text for the map. This may be displayed in QLandkarte,
97 MapSource or on a GPS, where it is normally shown below the family name.
98 Example: --description="Germany, Denmark" Please note: if you use splitter
99 to build a template.args file and pass it to mkgmap, then that file may
100 contain a "description" that will override this option. To prevent splitter
101 from overriding your description, place the --description option after "-c
102 template.args".
99 Set the descriptive text for individual tiles and gmapsupp.img. Map tiles
100 take the most recent --description before the --input-file option that
101 defines the tile. Because gmapsupp.img is created after all the other tiles
102 have been processed, gmapsupp.img takes the last --description found in the
103 command line, regardless of where the --gmapsupp option is placed in the
104 command line.
105
106 Note that if you use splitter with its --geonames-file option or its own
107 --description option, the generated template.args file includes
108 --description values that will apply to individual tiles. In this case it
109 is not possible to override splitter's description for individual tiles
110 from the mkgmap command line. Placing the mkgmap --description option after
111 -c template.args ensures that the value is applied to gmapsupp.img.
112
113 Different GPS devices, MapSource, Basecamp and QLandkarte handle
114 descriptions inconsistently. Some display the description when selecting
115 maps or tiles, others use the family name.
103116
104117 --country-name=name
105118 Set the map's country name. The default is "COUNTRY".
329342
330343 === Style options ===
331344
332 --style-file=filename
333 Specify an external file to obtain the style from. "file" can be a
334 directory containing files such as info, lines, options (see
335 resources/styles/default for an example). The directory path must be
336 absolute or relative to the current working directory when mkgmap is
337 invoked.
338
339 The file can be a zip file containing the files instead of a directory.
340
341 The files can be at the top level or contained in a folder within the zip
342 file. If the zip file contains more than one top level folder then each
343 folder is the name of a style that can be selected with the --style option.
344
345 The argument can also be a URL that specifies the location of a style
346 file.
345 --style-file=directory|zip-filename|url
346 Specify the path to a directory, zip file or url containing style
347 information. A style is composed of a group of files and typically contains
348 the following files: version, info, options, points, lines, polygons,
349 relations - see the style manual for further details.
350
351 The style files can be in the specified directory or contained in a
352 sub-directory. If styles are contained in sub-directories then the required
353 style must be specified with the --style option.
347354
348355 --style=name
349 Specify a style name. Must be used if --style-file points to a directory or
350 zip file containing multiple styles. If --style-file is not used, it
351 selects one of the built-in styles.
356 Specify a style name. Must be used if --style-file points to a location
357 containing multiple styles. If used without also specifying --style-file,
358 it selects one of the built-in styles.
352359
353360 --style-option=tag[=value][;tag[=value]...]
354361 Provide a semicolon separated list of tags which can be used in the style.
385392 === Product description options ===
386393
387394 --family-id=integer
388 This is an integer that identifies a family of products. Range: [1..9999]
395 This is an integer that identifies a family of products. Range: [1..65535]
389396 Default: 6324
390397
391398 --family-name=name
392399 If you build several maps, this option describes the family name of all of
393 your maps. Garmin will display this in the map selection screen.
394
395 Example: --family-name="OpenStreetmap mkgmap XL 2019"
400 your maps. Garmin will display this in the map selection screen. The
401 default is "OSM map".
402 Example: --family-name="OpenStreetmap mkgmap XL 2019"
396403
397404 --product-id=integer
398405 This is an integer that identifies a product within a family. It is often
417424 message is not displayed on a device, but is shown in BaseCamp. The
418425 copyright file must include at least two lines and be UTF-8 encoded. The
419426 following symbols will be substituted by mkgmap: $MKGMAP_VERSION$,
420 $JAVA_VERSION$, $YEAR$, $LONG_DATE$, $SHORT_DATE$ and $TIME$. Time and date
427 $JAVA_VERSION$, $YEAR$, $LONGDATE$, $SHORTDATE$ and $TIME$. Time and date
421428 substitutions use the local date and time formats.
422429
423430 --license-file=filename
475482 covered by the map, the so called hgt files, which typically cover 1 degree
476483 latitude * 1 degree longitude and are named by the coordinates of their
477484 bottom left corner (e.g. N53E009). They contain height information in a
478 grid of points. Typical hgt files contain either 1'' or 3'' data. 3'' files
479 have 1201 * 1201 points, which gives 2 * 1201 * 1201 = 2.884.802 bytes. 1''
480 files have 3601 * 3601 points, which gives 2 * 3601 * 3601 = 25.934.402
481 bytes. Other files are supported as long as the formula sqrt(size/2) gives
482 an integer value.
485 grid of points. Typical hgt files contain either 1 arc second or 3 arc
486 second data. 3 arc second files have 1201 x 1201 points, which means files
487 contain 2 x 1201 x 1201 = 2,884,802 bytes. 1 arc second files have 3601 x
488 3601 points, with a file size of 25,934,402 bytes. Other files are
489 supported as long as the formula sqrt(filesize/2) gives an integer value.
483490
484491 --dem=path[,path...]
485492 The option expects a comma separated list of paths to directories or zip
486493 files containing *.hgt files. Directories are searched for *.hgt files and
487494 also for *.hgt.zip and *.zip files.
488 The list is searched in the given order, so if you want to use 1'' files
489 make sure that they are found first. There are different sources for *.hgt
490 files, some have so called voids which are areas without data. Those should
491 be avoided.
495 The list is searched in the given order, so if you want to use 1 arc second
496 files make sure that they are found first. There are different sources for
497 *.hgt files, some have so called voids which are areas without data. Those
498 should be avoided.
492499
493500 --dem-dists=number[,number...]
494501 If given, the option specifies the resolution(s) or zoom level for the DEM
498505 need one for each resolution given with the --levels option. The actual
499506 values are given as distance between two DEM points and should be a
500507 multiple or submultiple of the distance between two points in the hgt file,
501 that is 3314 for 1'' and 9942 for 3''. Higher distances mean lower
502 resolution and thus fewer bytes in the map. Reasonable values for the
503 highest resolution should not be much smaller than 50% hgt resolution, that
504 is somewhere between 1648 and 5520 for 1'' hgt input files (3312 is often
505 used), and 5520 to 9942 for 3'' hgt input files.
508 that is 3314 for 1 arc second and 9942 for 3 arc second. Higher distances
509 mean lower resolution and thus fewer bytes in the map. Reasonable values
510 for the highest resolution should not be much smaller than 50% hgt
511 resolution, that is somewhere between 1648 and 5520 for 1 arc second hgt
512 input files (3312 is often used), and 5520 to 9942 for 3 arc second hgt
513 input files.
506514 Example which should work with levels="0:24, 1:22, 2:20, 3:18":
507515 --dem-dists=3312,13248,26512,53024
508516 This was found in a Garmin Demo map for transalpin data created 2009.
716724 must have OSM or PBF file format.
717725
718726 --generate-sea[=ValueList]
719 Generate sea polygons. ValueList is an optional comma separated list of
720 values:
721
727 Generate sea polygons. ValueList is a comma separated list of values:
722728 multipolygon
723729 generate the sea using a multipolygon (the default behaviour so this
724730 really doesn't need to be specified).
725
726731 polygons | no-mp
727732 don't generate the sea using a multipolygon - instead, generate a
728 background sea polygon plus individual land polygons with tag
729 natural=land. This requires a suitable land polygon type to be defined
730 in the style file (suggested type is 0x010100) and the polygon must be
731 defined in the TYP file as having a higher drawing level than the sea
732 polygon type.
733
733 background sea polygon plus individual land polygons with land-tag (see
734 following).
734735 no-sea-sectors
735736 disable the generation of "sea sectors" when the coastline fails to
736 reach the tile's boundary.
737 reach the tile's boundary. Under some conditions land sectors are
738 generated instead and these use land-tag.
737739 extend-sea-sectors
738 same as no-sea-sectors. Additional adds a point so coastline reaches
739 the nearest tile boundary.
740
740 Adds a point so coastline reaches the nearest tile boundary. This
741 implies no-sea-sectors.
741742 land-tag=TAG=VAL
742 tag to use for land polygons (default natural=land).
743 tag to use for land polygons (default natural=land). If not using
744 "multipolygon" or land sectors are being generated, then a suitable
745 land polygon type needs to be defined in the style file (suggested type
746 is 0x010100 or 0x54) and the polygon must be defined in the TYP file as
747 having a higher drawing level than the sea polygon type.
743748 close-gaps=NUM
744749 close gaps in coastline that are less than this distance (metres)
745
746750 floodblocker
747751 enable the flood blocker that prevents a flooding of land by checking
748752 if the sea polygons contain streets (works only with multipolygon
749753 processing)
750
751754 fbgap=NUM
752755 flood blocker gap in metre (default 40) points that are closer to the
753756 sea polygon do not block
754
755757 fbthres=NUM
756758 at least so many highway points must be contained in a sea polygon so
757759 that it may be removed by the flood blocker (default 20)
758
759760 fbratio=NUM
760761 only sea polygons with a higher ratio (highway points * 100000 /
761762 polygon size) are removed (default 0.5)
762
763763 fbdebug
764764 switches on the debugging of the flood blocker generates GPX files for
765765 each polygon checked by the flood blocker
873873 --poi-address
874874 Enable address / phone information to POIs. Address info is read according
875875 to the "Karlsruhe" tagging schema. Automatic filling of missing information
876 could be enabled using the "location-autofill" option. Default is enabled,
876 could be enabled using the --location-autofill option. Default is enabled,
877877 use --no-poi-address to disable.
878878
879879 --verbose
0 svn.version: 4475
1 build.timestamp: 2020-03-26T06:28:05+0000
0 svn.version: 4483
1 build.timestamp: 2020-04-19T08:34:26+0100
99
1010 addr:housenumber=* {set mkgmap:execute_finalize_rules=true}
1111
12 # impose routing/speed restrictions due to access/barrier. See option --link-pois-to-ways
13
14 vehicle=* {
15 add bicycle='${vehicle}';
16 add motor_vehicle='${vehicle}';
17 }
18 motor_vehicle=* {
19 add motorcar='${motor_vehicle}';
20 add goods='${motor_vehicle}';
21 add hgv='${motor_vehicle}';
22 add psv='${motor_vehicle}';
23 add emergency='${motor_vehicle}';
24 }
25 psv=* {
26 add taxi='${psv}';
27 add bus='${psv}';
28 }
29
1230 barrier=* & bicycle=* {set mkgmap:bicycle = '${bicycle|subst:private=>no}'}
1331 barrier=* & foot=* {set mkgmap:foot = '${foot|subst:private=>no}'}
1432 barrier=* & hgv=* {set mkgmap:truck = '${hgv|subst:private=>no}'}
1533 barrier=* & motorcar=* {set mkgmap:car = '${motorcar|subst:private=>no}'}
16 barrier=* & psv=* {set mkgmap:bus = '${psv|subst:private=>no}'}
34 barrier=* & bus=* {set mkgmap:bus = '${bus|subst:private=>no}'}
1735 barrier=* & taxi=* {set mkgmap:taxi = '${taxi|subst:private=>no}'}
1836 barrier=* & emergency=* {set mkgmap:emergency='${emergency|subst:private=>no}'}
19 barrier=* & delivery=* {set mkgmap:delivery = '${delivery|subst:private=>no}'}
20 barrier=* & access=* {addaccess '${access|subst:private=>no}'}
21
22 barrier=bollard | barrier=cycle_barrier {
23 add mkgmap:bicycle=yes;
24 add mkgmap:foot=yes;
25 addaccess no;
26 set mkgmap:road-speed=1;
37 barrier=* & goods=* {set mkgmap:delivery = '${goods|subst:private=>no}'}
38
39 barrier=bollard | barrier=block {
40 add mkgmap:car=no;
41 add mkgmap:delivery=no;
42 add mkgmap:truck=no;
43 add mkgmap:bus=no;
44 add mkgmap:taxi=no;
45 add mkgmap:emergency=no;
46 }
47 barrier=cycle_barrier | barrier=kissing_gate | barrier=stile {
48 add mkgmap:bicycle=no;
49 add mkgmap:car=no;
50 add mkgmap:delivery=no;
51 add mkgmap:truck=no;
52 add mkgmap:bus=no;
53 add mkgmap:taxi=no;
54 add mkgmap:emergency=no;
55 set mkgmap:road-speed=0;
2756 }
2857 barrier=bus_trap {
29 add mkgmap:bus=yes;
30 add mkgmap:foot=yes;
31 add mkgmap:bicycle=yes;
32 addaccess no;
33 set mkgmap:road-speed=1;
34 }
35 barrier=gate {
36 add mkgmap:bicycle=yes;
37 add mkgmap:foot=yes;
38 addaccess no;
58 add mkgmap:car=no;
59 add mkgmap:delivery=no;
60 add mkgmap:truck=no;
61 add mkgmap:taxi=no;
62 }
63 barrier=gate | barrier=lift_gate | barrier=swing_gate {
3964 set mkgmap:road-speed=0;
4065 }
41 barrier=kissing_gate | barrier=stile | barrier=block {
42 add mkgmap:foot=yes;
43 addaccess no;
44 set mkgmap:road-speed=0;
45 }
66 barrier=* {add mkgmap:road-speed=1}
67 barrier=* & access=* {addaccess '${access|subst:private=>no}'}
4668
4769 internet_access=yes {name 'Internet ${name}' | 'Internet'} [0x2f12 resolution 24 continue]
4870 internet_access=* & internet_access!=no & internet_access!=yes
00 ; TYP file to give mapnik rendering
11 ; -*- coding: UTF-8 -*- NB: first 3 bytes/char in file is UTF-8 encoded ByteOrderMark (BOM)
2 ;
3 ;This program is free software; you can redistribute it and/or modify
4 ;it under the terms of the GNU General Public License version 3 or
5 ;version 2 as published by the Free Software Foundation.
6 ;
7 ;This program is distributed in the hope that it will be useful, but
8 ;WITHOUT ANY WARRANTY; without even the implied warranty of
9 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 ;General Public License for more details.
11 ;
12 ;Author: Jorisbo@hotmail.com
13 ;
14 ;Based on mkgmap default style version: r4293...4288
15 ;
2
3 [_comments]
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License version 3 or
6 version 2 as published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
12
13 Author: Jorisbo@hotmail.com and others
14
15 Based on mkgmap default style version: r4293
16 [End]
17
18
1619 [_id]
1720 ;ProductCode=1 set from --product-id
1821 ;FID=8094 set from --family-id
1922 ;CodePage=65001 set from --code-page
2023 [End]
21 ;
24
25
26 ;=========== POLYGONS : RENDERING PRIORITY ======
2227 [_drawOrder]
28 Type=0x03d,1
2329 Type=0x04b,1
24 Type=0x03d,1
2530 Type=0x002,2
2631 Type=0x003,2
2732 Type=0x007,2
7479 Type=0x06c,8
7580 Type=0x004,9
7681 [End]
77 ;
82
83
84 ;===================== POLYGONS ========================
85
86
7887 [_polygon]
7988 type=0x02
8089 ;GRMN_TYPE: Urban Areas/SMALL_CITY/Small urban area, less than 200 000 inhabitants/Non NT
767776 FontStyle=NoLabel (invisible)
768777 CustomColor=No
769778 Xpm="32 32 2 1"
770 ". c none"
771 "1 c #FFFFFF"
772 "................................"
773 "................................"
774 "................................"
775 "................................"
776 "................................"
777 "................................"
778 "................................"
779 "................................"
780 "................................"
781 "................................"
782 "................................"
783 "................................"
784 "................................"
785 "................................"
786 "................................"
787 "................................"
788 "................................"
789 "................................"
790 "................................"
791 "................................"
792 "................................"
793 "................................"
794 "................................"
795 "................................"
796 "................................"
797 "................................"
798 "................................"
799 "................................"
800 "................................"
801 "................................"
802 "................................"
803 "................................"
779 "! c #FFFFFF"
780 " c none"
781 " "
782 " "
783 " "
784 " "
785 " "
786 " "
787 " "
788 " "
789 " "
790 " "
791 " "
792 " "
793 " "
794 " "
795 " "
796 " "
797 " "
798 " "
799 " "
800 " "
801 " "
802 " "
803 " "
804 " "
805 " "
806 " "
807 " "
808 " "
809 " "
810 " "
811 " "
812 " "
804813 ;12345678901234567890123456789012
805814 [end]
806815 [_polygon]
11831192 Xpm="0 0 1 0"
11841193 "1 c #BBBBBB"
11851194 [end]
1186 ;
1195
1196
1197 ;====================== LINES ===========================
1198
1199
11871200 [_line]
11881201 type=0x01
11891202 ;GRMN_TYPE: Roads/INTERSTATE, MAJOR_HWY/Primary, divided, limited-access highway, akin to an interstate in the US/Non NT, NT
20142027 FontStyle=NoLabel (invisible)
20152028 CustomColor=No
20162029 [end]
2017 ;
2030
2031
2032 ;====================== POINTS ==========================
2033
2034
20182035 [_point]
20192036 type=0x001
20202037 subtype=0x00
175175 log.debug("adding option", option, value);
176176
177177 // Note if an explicit mapname is set
178 if (option.equals("mapname")) {
178 if ("mapname".equals(option)) {
179179 if (extractMapName(value) == null || "00000000".equals(extractMapName(value))) {
180180 throw new ExitException("invalid value for option: mapname="+value+" - mapname should be a 8 digit integer, default is 63240001");
181181 } else {
183183 }
184184 }
185185
186 if ("family-id".equals(option)) {
187 int fid = -1;
188 try {
189 fid = Integer.parseInt(value);
190 } catch (NumberFormatException e) {
191 fid = -1;
192 }
193 if (fid <= 0 || fid > 0xffff) {
194 throw new ExitException("invalid value for option: family-id=" + value
195 + " - family-id should be an integer between 1 and 65535, default is "
196 + CommandArgs.DEFAULT_FAMILYID);
197 }
198 }
199
186200 switch (option) {
187201 case "input-file":
188202 if (value != null){
9999 * should be discarded.
100100 */
101101 protected String keepTag(String key, String val) {
102 if (val.isEmpty())
103 return null;
102104 if(deletedTags != null) {
103105 Set<String> vals = deletedTags.get(key);
104106 if(vals != null && (vals.isEmpty() || vals.contains(val))) {
1212 package uk.me.parabola.mkgmap.typ;
1313
1414 import uk.me.parabola.imgfmt.app.typ.TypData;
15 import uk.me.parabola.log.Logger;
1516 import uk.me.parabola.mkgmap.scan.SyntaxException;
1617 import uk.me.parabola.mkgmap.scan.TokenScanner;
1718 import uk.me.parabola.mkgmap.srt.SrtTextReader;
2223 * @author Steve Ratcliffe
2324 */
2425 class IdSection implements ProcessSection {
26 private static final Logger log = Logger.getLogger(IdSection.class);
27
2528 private final TypData data;
2629
2730 public IdSection(TypData data) {
3336 try {
3437 ival = Integer.decode(value);
3538 } catch (NumberFormatException e) {
36 throw new SyntaxException(scanner, "Bad integer " + value);
39 /* throw new SyntaxException(scanner, "Bad integer " + value);
40 *
41 * TYPViewer can leave these as:
42 * FID=
43 * ProductCode=
44 * so just give a warning. Values will be supplied from mkgmap options.
45 */
46 log.warn("bad/missing integer in TYP [_id] statement: ", name, "=", value);
47 ival = -1;
3748 }
3849
3950 if (name.equalsIgnoreCase("FID")) {
40 data.setFamilyId(ival);
51 if (ival != -1)
52 data.setFamilyId(ival);
4153 } else if (name.equalsIgnoreCase("ProductCode")) {
42 data.setProductId(ival);
54 if (ival != -1)
55 data.setProductId(ival);
4356 } else if (name.equalsIgnoreCase("CodePage")) {
44 if (data.getSort() == null) // ignore if --code-page
57 if (ival != -1 && data.getSort() == null) // ignore if --code-page
4558 data.setSort(SrtTextReader.sortForCodepage(ival));
4659 } else {
4760 throw new SyntaxException(scanner, "Unrecognised keyword in id section: " + name);
115115 return new IconSection(data);
116116 } else if ("_id".equals(sectionName)) {
117117 return new IdSection(data);
118 } else if ("_comments".equals(sectionName)) {
119 // Need to really ignore everything (IgnoreSection tries to parse first bit of each line as name=...)
120 Token tstTok;
121 do {
122 scanner.skipLine(); // after _comments] or testing next line
123 tstTok = scanner.nextToken();
124 if (tstTok.getType() == TokType.SYMBOL && "[".equals(tstTok.getValue())) {
125 tstTok = scanner.nextRawToken();
126 if (tstTok.getType() == TokType.TEXT && "end".equalsIgnoreCase(tstTok.getValue())) {
127 tstTok = scanner.nextRawToken();
128 if (tstTok.getType() == TokType.SYMBOL && "]".equals(tstTok.getValue())) {
129 break;
130 }
131 }
132 }
133 } while (tstTok.getType() != TokType.EOF);
134 return null;
118135 } else {
119136 log.warn("Unrecognised section " + sectionName);
120137 return new IgnoreSection(data);