.mp
extension and may be prepared using any text editor (in previous versions the .txt
extension was used which is still referred to in legacy documentation and other resources). The remaining part of this article describes the syntax and semantics of PFM at the basic level, which means that some advanced and obsolete statements and features are omitted. The full syntax is described in comments in the Test_img.txt
file (in the GPSMapper directory).
The cGPSmapper compiler is available in the following editions: Freeware, Shareware, Standard, Pro, and Routing. All editions except for Freeware are referred to as the "advanced" editions.
Monospace
font are to be inserted literally, except for metavariables. Metavariables are lowercase strings appearing to the right of the equal sign (=) in many statements: they should be replaced with appropriate values, as described in the explanation (or self-evident). Texts in normal font like here are explanations and should not be inserted into the source file.
The special metavariable # takes a numeric value, e.g. Data#
stands for Data0
, Data1
, etc.
The special iteration operator ...
in a statement line has its intuitive meaning. This operator in a separate line denotes that the preceding statement may be repeated zero or more times with various (typically consecutive) values of the metavariable # . If the iteration operator is preceded by a pair of statements with # metavariables, the whole pair should be repeated (see specific statements for examples).
Statements typed in orange color (e.g. Name=
) are mandatory in the given section. Statements typed in olive color (e.g. Label=
) are optional.
;
character. A comment line may appear at any place in the file and is ignored by the compiler. (However, GPSMapEdit uses special syntax of comments to specify attachments and such comments are interpreted by GPSMapEdit).
The following sections exist:
[IMG ID]
section -- referred to as the header section
[COUNTRIES]
, [REGIONS]
, and [CITIES]
sections -- used for city indexing
[RGN10]
, [RGN20]
, [RGN40]
, and [RGN80]
sections -- they define POI (point of interest), point, polyline, and polygon objects (respectively), with the object data provided directly in the section body
[PLT]
and [WPT]
sections -- they also define objects, but the object data are imported from OziExplorer's .plt and .wpt files
[RGN10]
statement) and ends with the [END]
statement. (In previous versions, there were different END statements for various sections, e.g. [END-RGN10]
. This syntax is still acceptable and may be seen in some legacy programs or source files.) The order of statements in the section body (i.e. between the section keyword statement and the [END]
statement) is insignificant.
[IMG ID]
ID=nnnnnnnn
-- 8 decimal digits, must be unique for each map Name=map_name
-- map name to be displayed in the GPS receiver's Map Info menu LBLcoding=x
-- (default: LBLcoding=6
)
LBLcoding=6
-- compressed label coding (smallest maps)
LBLcoding=9
-- full-byte coding (supports national characters, depending on the GPSr firmware)
LBLcoding=10
-- Unicode (depending on the GPSr firmware)
Codepage=xx
-- (default: Codepage=0
)
Datum=xxx
-- (default: Datum=W84
) specifies the datum of object data
Datum=W84
-- WGS-84
Datum_List.txt
file (in the GPSMapper directory) for the full list of supported datums
Elevation=x
-- (default: Elevation=f
)
Elevation=m
-- elevation in meters
Elevation=f
-- elevation in feet
TreSize=n
-- maximal allowed region size; a higher value increases the allowable region size, but may decrease the map performance; a lower value may increase the map size; suggested values for n:
RgnLimit=n
-- maximal number of elements in one region
Levels=n
-- number of levels (layers) in the map (at least 1, not more than 10)
Levels=3
means that two layers only are available for map objects
Level#=g
-- grid size for layer # (layer 0 is the most detailed one)
Level0
, Level1
, Level2
, etc.) should be defined for all existing layers.
Zoom#=#
...
Zoom#
statements are optional and required only for MapSource, GPSMapEdit interprets incorrectly a header with those statements omitted, so until this is fixed, it is suggested to provide the Zoom#
statements as in the Template.mp
file.
POIIndex=x
-- (default: POIIndex=N
)
POIIndex=Y
-- RGN10 objects will automatically be indexed (may be searched by the Find function in the GPS)
POIIndex=N
-- objects will be indexed only if POI index info is explicitly provided
DefaultCityCountry=country_name
DefaultRegionCountry=region_name
[END]
-- ends the header section
[COUNTRIES]
-- this section declares all countries used for city indexing Country#=country_name~[0x1d]abbreviation
...
-- the above statement may be repeated for Country2
, Country3
, etc. (see Conventions above) [END]
[REGIONS]
-- this section declares all regions used for city indexing Region#=region_name~[0x1d]abbreviation
CountryIdx#=country_index
-- the number in the corresponding Country#
statement ...
-- the above pair may be repeated (see Conventions above) [END]
[CITIES]
-- this section declares all cities used for city indexing City#=city_name
RegionIdx#=region_index
-- the number in the corresponding Region#
statement ...
[END]
[RGN10]
-- this section defines a POI (point of interest) object Type=object_type
RGNtype.txt
file (in the GPSMapper directory)
Label=object_name
Levels=n
-- the object will be replicated ("extended") onto higher layers, up to layer n inclusive Data#=(lat1,lon1)
-- the object data for layer # ...
Data0=(52.12345,21.98765)
Origin#=(lat1,lon1)
-- this is a legacy statement with the same meaning and usage as Data#
. However, GPSMapEdit uses Origin#
rather than Data#
. ...
[END]
[RGN20]
-- this section defines a point object, not being a POI. Statements are as for the [RGN10] section. Type=object_type
Label=object_name
Levels=n
Data#=(lat1,lon1)
...
Origin#=(lat1,lon1)
...
[END]
[RGN40]
-- this section defines a polyline (linear object, e.g. street, stream) Type=object_type
Label=object_name
Levels=n
Data#=(lat1,lon1),(lat2,lon2),...
-- as many coordinate pairs as there are vertices in the object (see Conventions above)...
[END]
[RGN80]
-- this section defines a polygon (area object, e.g. lake, forest) Type=object_type
Label=object_name
Levels=n
Data#=(lat1,lon1),(lat2,lon2),...
...
[END]
[PLT]
-- this section defines a polyline or polygon, with data imported from an OziExplorer's .plt file RgnType=object_category
RgnType=0x40
-- polyline
RgnType=0x80
-- polygon
Type=object_type
Label=object_name
Levels=n
File#=file_name
-- specifies a .plt file from which data will be imported to layer # ...
[END]
[WPT]
-- this section defines a POI or point, with data imported from an OziExplorer's .wpt file RgnType=object_category
RgnType=0x10
-- POI
RgnType=0x20
-- point
Type=object_type
Levels=n
File#=file_name
-- specifies a .wpt file from which data will be imported to layer #
...
[END]
.plt
file (including the extension) and the additional extension .txt
, e.g. Highways.plt.txt
). The file must be in the same directory as the .plt
file. Each line in this file specifies the name for the corresponding track segment.
Elevation=m
statement should be defined in the header section.
The elevation is defined not as a distinct parameter, but is appended to the object label after the ~[0x1f]
delimiter. The following section defines a summit with the defined elevation of 2499 meters (provided that Elevation=m
is declared in the header section): [RGN10]
Type=0x6616
Label=Mt. Rysy~[0x1f]2499
Levels=2
Data0=(49.17958,20.08800)
[END]
The elevation may be also provided with an empty label. The following section defines a land contour line of the elevation of 115 meters: [PLT]
RgnType=0x40
Type=0x20
Label=~[0x1f]115
Levels=1
File0=Contour115.plt
[END]
~[0x2a]
-- Interstate highway
~[0x2b]
-- Highway - shield
~[0x2c]
-- Highway - round symbol
~[0x2d]
-- Highway - small symbol - blue/red
~[0x2e]
-- Highway - big symbol
~[0x2f]
-- Highway - small symbol - white
Label=~[0x2d]619
defines a road with the number 619, displayed as a small symbol (blue/red).
Note: If full-byte coding is used, the delimiters are different, namely:
~[0x01]
- Interstate highway
~[0x02]
- Highway - shield
~[0x03]
- Highway - round symbol
~[0x04]
- Highway - small symbol - blue/red
~[0x05]
- Highway - big symbol
~[0x06]
- Highway - small symbol - white
Type=Dining(Asian)
RGNtype.txt
(in the GPSMapper directory).
Test_img.txt
file (in the GPSMapper directory) which provides also an example of usage. The list below gives you some idea of advanced features supported by those advanced editions.
[BACKGROUND] [DICTIONARY] [FILE] [HIGHWAYS] [POI] [SHP] [ZIPCODES] Cities CityField CityIdx CityRegionIdx Countries CountryField DefaultType DirField DirIndicator ExitDirectionField ExitFacilitiesField ExitN ExitNameField ExitServices ExitServicesEnd ExitServicesStart ExitTypeField HighwayField HighwayIdx HighwayN HighwayRegionIdx Highways HouseNumber LabelField LeftCity LeftEnd LeftStart LeftType LeftZip Level LevelsNumber Node OvernightParking PhoneNumber POINumberFirst POIOnly POIZipFirst PreProcess RegionCountryIdx RegionField RegionIdxN Regions RightCity RightEnd RightStart RightType RightZip StreetDesc StreetDesc StreetNumbers StreetNumbersEnd StreetNumbersStart Transparent TreMargin TypeField ZipCodeField ZipCodeN ZipCodes ZipIdx
AlignMethod BlockSize LevelFill LevelLimit WorldMap-- Janusz Snay
Topic PFMsyntaxDescr . { Edit | Załącz | Linkujące | Do druku | Wersje | r1.9 | > | r1.8 | > | r1.7 | Więcej } |
Revision r1.9 - 17 Nov 2003 - 15:55 GMT - Janusz Snay Parents: Web Home > English Stuff |
Copyright © 1999-2003 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback. |