Hi Gerd
Here are some documentation fixes & improvements + a change to
build.xml to use 4 chars for the unknown version number so that offsets
match the typical 4 digit svn version number. This minimises noise when
comparing the display of internal structures.
I can't tell if I've got the layout in typ-compiler.txt correct until
it appears on http://www.mkgmap.org.uk/doc/typ-compiler
If it looks bad I'll do another patch.
Ticker
Index: build.xml
===================================================================
--- build.xml (revision 4546)
+++ build.xml (working copy)
@@ -174,7 +174,7 @@
<replaceregex pattern="^exported$" replace="" />
</tokenfilter></outputfilterchain></redirector>
</exec>
- <condition property="svn.version.build" value="${svn.version.tmp}" else="unknown">
+ <condition property="svn.version.build" value="${svn.version.tmp}" else="none">
<and>
<isset property="svn.version.tmp" />
<equals arg1="${svnversion.result}" arg2="0" />
@@ -219,7 +219,7 @@
<target name="version-file" unless="have.version">
<property name="project.version" value="${build.timestamp}" />
- <property name="svn.version.build" value="unknown"/>
+ <property name="svn.version.build" value="none"/>
<propertyfile file="${build.classes}/mkgmap-version.properties">
<entry key="svn.version" value="${svn.version.build}" />
Index: doc/options.txt
===================================================================
--- doc/options.txt (revision 4546)
+++ doc/options.txt (working copy)
@@ -67,9 +67,9 @@
;--gmapi
: 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.
+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 and MapSource.
The directory name is --family-name with extension .gmap.
;-c filename
@@ -362,11 +362,11 @@
you may want to use a slightly different set of rules for a map of
a whole continent. The tags given will be prefixed with "mkgmap:option:".
If no value is provided the default "true" is used.
-This option allows to use rules like
-mkgmap:option:light=true & landuse=farmland {remove landuse}
-Example: -- style-option=light;routing=car
-will add the tags mkgmap:option:light=true and mkgmap:option:routing=car
+: Example: --style-option=light;routing=car
+: will add the tags mkgmap:option:light=true and mkgmap:option:routing=car
to each element before style processing happens.
+This can then be used in rules like:
+: landuse=farmland & mkgmap:option:light=true {delete landuse}
;--list-styles
: List the available styles. If this option is preceded by a style-file
@@ -923,7 +923,7 @@
processed POI must be within for it to be considered to be nearby and
hence trigger the action part of the rule.
-: The third part of the rule is the action part and provides three options:
+: The third part of the rule is the action part and provides two options:
:: delete-poi - the POIS are considered to be duplicates and the
duplicate is deleted. This is the default.
Index: doc/styles/rules.txt
===================================================================
--- doc/styles/rules.txt (revision 4546)
+++ doc/styles/rules.txt (working copy)
@@ -284,6 +284,7 @@
|is_in(*tag*,*value*,*method*) | x | x | |
+true+ if the element is in polygon(s) having the specified *tag*=*value* according to the *method*, +false+ otherwise.
+*value* can be \'\*' which matches any polgon having *tag*.
The methods available depend on the Style section:
polygons:
Index: doc/typ-compiler.txt
===================================================================
--- doc/typ-compiler.txt (revision 4546)
+++ doc/typ-compiler.txt (working copy)
@@ -4,8 +4,20 @@
It contains everything you need to write a TYP file description that can be compiled, showing exactly how
you can get the different colour effects that are available.
-Although you can edit these files by hand, it is very much more convenient to use one of the graphical editors that are available.
+The file can be in written in almost any character-set that allows basic ascii characters and can have Strings for any language that can be encoded in that character-set.
+The mkgmap .txt TYP processor looks at the start of the file for a unicode BOM or a header line of the form:
+; -*- coding: charset -*-
+to determine the encoding, and then will convert those Strings that can be represented in the target .IMG code-page and ignore the ones that can't.
+It is safest to edit multi-lingual TYP files (eg. resources/mapnik.txt) with a good text editor;
+if nessessary, using a graphical editor to manipulate the icons, then cutting the result back into the TYP .txt file.
+
+For your own TYP file it might be convenient to use one of the graphical editors that are available.
+However, beware that some of these editors don't preserve the full contents of the file
+and might change the character representations of the Strings to those in a different character
+set/encoding.
+Also they make assumptions about the chars used to represent colours in icons and might change them.
+
These produce file formats that differ from each other and have variations to the specification that is presented here. These variations will be supported as they are discovered as long as they do not conflict with each other, but are not listed here for clarity. In particular the files produced by [http://www.pinns.co.uk/osm/ostyp.html TYPWiz] and [http://opheliat.free.fr/michel40/ TYPViewer] are supported.
== The [_id] section ==
@@ -35,23 +47,22 @@
:The level is a number starting at 1.
Example:
-<pre>
-[_drawOrder]
-Type=0x032,1
-Type=0x10101,2
-Type=0x002,3
-Type=0x003,3
-Type=0x007,3
-Type=0x009,3
-Type=0x00c,3
-Type=0x00e,3
-Type=0x010,3
-Type=0x012,3
-Type=0x015,3
-Type=0x01b,3
-...
-[end]
-</pre>
+ [_drawOrder]
+ Type=0x032,1
+ Type=0x10101,2
+ Type=0x002,3
+ Type=0x003,3
+ Type=0x007,3
+ Type=0x009,3
+ Type=0x00c,3
+ Type=0x00e,3
+ Type=0x010,3
+ Type=0x012,3
+ Type=0x015,3
+ Type=0x01b,3
+ ...
+ [end]
+
If a polygon type is not listed in this section, then it will not be displayed at all. If it is then it will be styled according to a definition in a [_polygon] section later in this file, or in the default Garmin style if these is no such definition.
== Element sections ==
@@ -90,9 +101,17 @@
:The object type number - the kind of element that it is. If the number is greater than 0xff then it will be treated as a type and subtype combination. Eg 0x2305 is type 0x23 with subtype 0x5.
;String=#,xxx
-:Defines a label that will be attached to the element. The first part is a language number, the second the actual string. You can use String1, String2 for compatibility, but just String will do for the mkgmap compiler.
+;String=xxx
+:Defines a label that will be attached to the element.
+The (optional) first part is a language number, the next is the actual string.
+You can use String1, String2 for compatibility, but just String will do for the mkgmap compiler.
+ String=Parking Lot
String=0x04,Parking
String=0x03,Parkeerplaats
+:If the language number isn't specified it defaults to 0x00 which is the generic language.
+This string is used if there isn't a definition for the currently selected language;
+If there isn't a default the device shows the first string in the list.
+The language codes are defined in the [https://wiki.openstreetmap.org/wiki/Mkgmap/help/typ_compile#Appendix Appendix].
;FontStyle=xxx
: xxx can be one of NoLabel, SmallFont, NormalFont, LargeFont.
Index: resources/help/en/options
===================================================================
--- resources/help/en/options (revision 4546)
+++ resources/help/en/options (working copy)
@@ -68,8 +68,8 @@
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.
+ map will be available in BaseCamp and MapSource. The directory name is
+ --family-name with extension .gmap.
-c filename
--read-config=filename
@@ -355,11 +355,12 @@
The intended use is to make a single style more flexible, e.g. you may want
to use a slightly different set of rules for a map of a whole continent.
The tags given will be prefixed with "mkgmap:option:". If no value is
- provided the default "true" is used. This option allows to use rules like
- mkgmap:option:light=true & landuse=farmland {remove landuse} Example: --
- style-option=light;routing=car will add the tags mkgmap:option:light=true
- and mkgmap:option:routing=car to each element before style processing
- happens.
+ provided the default "true" is used.
+ Example: --style-option=light;routing=car
+ will add the tags mkgmap:option:light=true and mkgmap:option:routing=car to
+ each element before style processing happens. This can then be used in
+ rules like:
+ landuse=farmland & mkgmap:option:light=true {delete landuse}
--list-styles
List the available styles. If this option is preceded by a style-file
@@ -901,7 +902,7 @@
processed POI must be within for it to be considered to be nearby and hence
trigger the action part of the rule.
- The third part of the rule is the action part and provides three options:
+ The third part of the rule is the action part and provides two options:
delete-poi - the POIS are considered to be duplicates and the duplicate
is deleted. This is the default.
Index: resources/sample.cfg
===================================================================
--- resources/sample.cfg (revision 4546)
+++ resources/sample.cfg (working copy)
@@ -37,3 +37,5 @@
#make-opposite-cycleways
#order-by-decreasing-area
#name-tag-list=name:en,int_name,name,place_name,loc_name
+#nearby-poi-rules=0x4a00:30:delete-poi,0x6605:30:delete-poi
+# above deletes multiple POI that the default style might generate from picnic_table and bench
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev