1 Contents CONTENTS ... 2 INTRODUCTION ... 5 URPOSE OF THIS DOCUMENT ... 5 ASIC ONCEPTS 2.2.1 What is Polish Format (PFM)? ... 5 2.2.2 What is cGPSmapper?... 5 2.2.3 What is sendmap?... 5 OCUMENT ONVENTIONS 2.3.1 PFM Code ... 5 2.3.2 cGPSmapper versions ...
Page 3
4.5.2 Concepts and Terminology... 45 4.5.3 Using Dictionary ... 45 CREATING CUSTOM TYPE FILE ... 47 REATING THE SOURCE FILE USTOM EFINITION UTTING IT ALL TOGETHER MAPSOURCE ... 61 OURCE ATA STRUCTURE REATING PREVIEW MAP FILES AKING THE REGISTRY ENTRIES OADING THE MAPS INTO THE FAQS ...
Page 4
cGPSmapper Manual Contents http://cgpsmapper.com/ 4 of 100...
Feel free to e-mail your comments / contributions to the present document to manual@cgpsmapper.com. 2.1 Purpose of this document This manual explains how to create vector maps and then upload them to your Garmin GPS receiver (or see them in the MapSource software), utilizing the cGPSmapper / sendmap software.
preceded by a pair of statements with # metavariables, the whole pair should be repeated (see specific statements for examples). Text in orange colour (e.g. Name=) are mandatory statements in the given section. Text in olive colour (e.g. Label=) are optional statements. 2.3.2 cGPSmapper versions The table below contains the meaning of the different symbols used in this document to represent the cGPSmapper Version to which a certain concept applies.
Overview 3 Overview Creating a map to be uploaded to a GPS receiver may be compared to programming: you write a program (i.e. a map) in the programming language (i.e. in PFM) and then compile it. Alternatively - just as with programming - tools exist to generate the source code visually or semi-automatically or to assist in other ways in the code preparation.
4 Map Project 4.1 Map Creation You write the source file in the PFM format (the .mp file) using any text editor. All map- related information is provided in relevant statements. Then the map is compiled with the cGPSmapper compiler and the resulting .img file is uploaded using sendmap or MapSource.
Unique identifier (up to 8 decimal digits) for the map. May be only written in a decimal format 11000204 Map name to be displayed in the GPS receiver's Map Info menu. Refer to section 7.1 (on page 65) for details.
Page 10
Codepage=xx Datum=xxx Transparent=x MG=x π Numbering=x Routing=x http://cgpsmapper.com/ full-byte (8-bit) character coding with the specified codepage is used (depending on the GPS firmware) single-byte coding Note: All labels must be written in CAPITALS if a codepage is used Note: The delimiters for road numbers ( 4.2.6, on page 30, for details) are different if full-byte coding is used.
Page 11
Lock=x ProductCode=x τ CopyRight=xxxxxxx π Elevation=x POIOnly=x σ POIIndex=x τ π τ POINumberFirst=x π POIZipFirst=x τ π σ DefaultCityCountry =country_name τ π Same effect if switch -i is used. http://cgpsmapper.com/ Final IMG file will require unlock code specific for each GPS device.
Page 12
σ DefaultRegionCount τ ry=region_name π TreSize=n RgnLimit=n http://cgpsmapper.com/ Should be used in conjunction with DefaultCityCountry. Defines the default country name for automatic city indexing. If not defined, cities will be indexed only if city index info is explicitly provided. 80 characters maximum. Maximum allowed region size.
Page 13
PreProcess=x Levels=n Level#=g Zoom#=# http://cgpsmapper.com/ Kind of pre-processing: generalization only (faster method, but 'crossroad' nodes might be removed). Also the nodes from intersections may be removed. Data will be simplified using Douglas-Peucker polyline simplification algorithm which will ensure that the output is not jagged.
Preview=x AlignMethod BlockSize LevelFill LevelLimit WorldMap DrawPriority=# Marine=x [END] 4.2.2 Declarations The DECLARATION elements must be in the order shown herewith. 4.2.2.1 Countries Although this section is obsolete, it is still supported. [COUNTRIES] Country#=country_n ame~[0x1d]abbrevia tion [END] 4.2.2.2 Regions Although this section is obsolete, it is still supported. [REGIONS] Region#=region_nam e~[0x1d]abbreviati...
CountryIdx#=countr y_index [END] 4.2.2.3 Cities Although this section is obsolete, it is still supported. [CITIES] City#=ciy_name RegionIdx#=region_ index [END] 4.2.2.4 Chart Info [CHART INFO] Name=xxx Number=xxx Projection=xxx Published=xxx Scale=### Unlikely, since each region normally is located in a single country. Unlikely, since each city normally is located in a single region.
Page 16
DeltaSN=### DeltaWE=### IALA=x Print=mmyyyy Edition=mmyyyy Correction=ddmmyyy σ Text=xxx τ π σ TextFile=file_name τ π http://cgpsmapper.com/ Longitude Delta. Latitude Delta. IALA system. The areas that use the 'B' system are the Americas, Japan and the Philippines. The remainder of the world uses the 'A' system. Default = A Paper chart print date.
Level#RGNnn=bitmas [END] 4.2.3.3 Highways This section will be further documented in a future version of this manual. [HIGHWAYS] [END] 4.2.3.4 ZIP Codes Although this section is obsolete, it is still supported. This section will be further documented in a future version of this manual. [ZIPCODES] [END] 4.2.3.5 Definitions...
Page 19
Name of the Highway. This name will be added to the list of available highways, so it can be searched in some GPS devices. Garmin does not support this feature. 80 characters maximum. has the same meaning as Label. [RGN20] CityName...
σ CountryName=xxx τ π σ Zip=xxx τ π Exit#=(type_of_exi t_facility),(direc tion_to_facility), (facilities),(labe [END] 4.2.4.2 Polygon [POLYGON] Type=object_type SubType=object_typ Label=object_name EndLevel=# http://cgpsmapper.com/ Name of country to which the object belongs. Can be used only together with keys CityName. 80 characters maximum. Object Zip Code.
Page 21
Background=x Data#=(lat1,lon1), (lat2,lon2)... [END] Refer to section 4.2.1, on page 9, for further details. http://cgpsmapper.com/ Declare the custom shape of the map. The background object defines the area of the basemap which is covered by this map. It is recommended that background be only used with maps which have irregular boundaries.
4.2.4.3 Polyline [POLYLINE] Type=object_type SubType=object_typ Label=object_name Label2=object_name EndLevel=# Data#=(lat1,lon1), (lat2,lon2)... StreetDesc=xxx DirIndicator=x σ CityName=xxx τ π σ RegionName=xxx τ π σ CountryName=xxx τ π σ Zip=xxx τ π RoadID=xxx π Numbers#=xxx http://cgpsmapper.com/ Polyline section identifier. [RGN40]may also be used instead. It is used to define linear objects such as streets, streams, etc.
Routeparam=xxx NodID#=xxx [END] 4.2.4.4 Point of Interest from OziExplorer [WPT] RgnType=object_cat egory Type=object_type EndLevel=# File#=file_name [END] 4.2.4.5 Polyline or Polygon from OziExplorer [PLT] RgnType=object_cat egory Type=object_type Label=object_name DirIndicator=# EndLevel=# http://cgpsmapper.com/ Section terminator. Point of interest section identifier, with data imported from an OziExplorer .wpt file.
File#=file_name [END] 4.2.4.6 Shapes σ [SHP] τ π name=file_name Type=xxx LabelField=field_n Label2Field=field_ name TypeField=field_na SubTypeField=field _name http://cgpsmapper.com/ .plt file from which data will be imported to layer #. The path could be either absolute or relative to the current directory. For platform portability, it is recommended to use slashes "/"...
Page 25
DirField=field_nam Level=# EndLevel=# DefaultType=object _type σ CityName=field_nam τ π σ RegionName=field_n τ π σ CountryName=field_ name τ π τ HouseNumber=field_ name π τ StreetDesc=field_n π τ PhoneNumber=field_ name π http://cgpsmapper.com/ N or 0 Hide street direction on crossroads Y or 1 Show street direction on crossroads Default = N Level into which objects will be imported.
Page 26
- Can be adjusted in MapSource 40 km/h - Can be adjusted in MapSource 20 km/h 8 km/h (ferry) Used for routing. This attribute defines the importance of the road for routing. It is one of the most important attributes for routing.
Page 27
VehicleI=field_nam VehicleR=field_nam TextFileLines=fiel d_name TextStart=line_num TextEnd=line_numbe TextFile=file_name Color=field_name Style=field_name Height=field_name Depth=field_name DepthUnit=field_na HeightUnit=field_n Position=field_nam DepthFlag=field_na FoundationColor=fi eld_name Light=field_name LightType=field_na σ Note=field_name τ π σ LocalDesignator=fi eld_name τ π σ InternationalDesig nator=field_name τ π σ Period=field_name τ π http://cgpsmapper.com/ no bicycles allowed on the road. no trucks allowed on the road.
4.2.4.8 File [FILE] name=file_name [END] 4.2.5 Object elevation By default, the elevation is defined in feet in PFM. To define the elevation in metres, the Elevation=m statement should be defined in the header section ( 4.2.1 on page 9). Since this is a global definition, all elevations on a map must be in the same units (either all in feet or all in metres).
[RGN10] Type=0x6616 Label=Table Mountain~[0x1f]1084 Origin0=(-33.96664,18.42569) [END-RGN10] 4.2.6 Road numbers Road numbers can be defined using NUMBERS# key within [RGN40] declaration. There could be up to 60 definitions of numbers for a single road. Each definition consist from the NumbersX definition where X is increasing value from 1 up to 60 [RGN40] Type=6...
Numbering style can be: N,E,O,B – which suits to: None, Even, Odd, Both. 4.3 Marine Charts Marine charts are a special kind of cartography - similar to Garmin's BlueChart - that is used as navigational aid and contains its own set of marine elements.
Page 32
Label=object_name Data#=(lat,lon) EndLevel=# Marine objects may also have the following keys, depending on the object_type: σ Text=xxx τ π σ TextFile=file_name τ π Refer to section 4.2.1, on page 9, for further details. http://cgpsmapper.com/ Optional name of the object to be shown on the map. 80 characters maximum.
Page 33
Color=## Style=## Height=##.# http://cgpsmapper.com/ Object colour. Applies only to following marine types: polylines of types 0x04XX to 0x06XX points of types 0x0500 (coloured text) Valid values - sum of: 0x00 to 0x03 (basic styles) 0x10 to 0x30 (extended styles) 0x00 0x01 0x02 0x03...
Page 34
Warning: This value is not displayed if the “Spot Soundings” setting in the GPS receiver is set to “Off”. Please note also that this setting affects also some of the objects (mainly soundings): they will not be displayed at all (because they have no visual representation except the depth/height value).
Page 36
These are bearings of the light as seen from a vessel crossing the sector lines. Please note that you can change the “Light sectors” setting both in MapSource and in your GPS receiver to suit your needs. Applies only to following marine types:...
Page 37
LightType=xxx σ Note=xxx τ π http://cgpsmapper.com/ Definition of the light type. Can be a number (as decimal or hex) or a letter. If the value is a letter, then the light type is set to 0x0b (Morse code) and letter is used as a Morse code letter. Hex values: 0x00 unlit...
Page 38
σ LocalDesignator=xx τ π σ InternationalDesig nator=xxx τ π Period=xxx σ HeightAboveFoundat ion=## τ π σ HeightAboveDatum=# τ π σ HeightAboveFoundat ionUnit=## τ π σ HeightAboveDatumUn it=## τ π σ LeadingAngle=##.# τ π σ Racon=x τ π http://cgpsmapper.com/ Text visible in the properties window of the object. Applies only to following marine types: points of types 0x01XX and 0x02XX Text visible in the properties window of the object.
4.4 Levels 4.4.1 Introduction ® Every Garmin GPS with mapping capability gives you the option to zoom in or out on the map page, either displaying a small area in great detail, or a larger area in less detail. The selection of map objects which it is appropriate for the unit to display is dependent on the zoom level.
The approximate mapping of hardware zoom levels onto actual device zoom settings is shown in the table below. Note that this is only approximate. The matching of levels to ® Garmin display zoom levels is, unfortunately, not an exact science. Level no.
Page 41
EndLevel=n. The relationship between your chosen map zoom levels and the hardware zoom levels using a set of Levelm=h lines, where m is the map zoom level and h is the corresponding hardware zoom level.
cGPSmapper Manual Map Project defining map objects. Map zoom level 3 is only used to dictate when our map replaces the base map. This means that you must always define one more map zoom level than you actually need for your map objects, and every map definition must therefore include at least two map zoom levels.
cGPSmapper Manual Map Project [RGN10] Type=3328 Label=Remenham EndLevel=3 Data0=(51.551744,-0.889936) [END] What the EndLevel=n line says is that the coordinates in the highest numbered Datan= line apply up to the specified EndLevel=n, starting with the level number in the Datan= line. In our example, EndLevel=3, combined with Data0= means that the coordinates apply for three consecutive levels commending with level 0 (i.e.
level. cGPSmapper automatically averages out consecutive points which are too close to be distinguishable on the GPS screen and discards unnecessary points. Nevertheless it is useful for the map author to understand how it is possible to take explicit control over the shape of map objects at different levels if and when necessary. 4.4.4 Idiosyncrasies of GPS hardware The foregoing sections have explained how the map author can control the levels at which map objects are displayed.
cGPSmapper Manual Map Project Fortunately the Polish file format has a solution called 'Dictionary' which allows you to switch map objects of the same type on or off for each level. [DICTIONARY] is an optional section and follows after the [IMG ID] section. 4.5.2 Concepts and Terminology [Dictionary] uses strings of 0's and 1's where the position of each digit in the string corresponds to a specific map object type and thus controls the display of that object type.
Page 46
The first two lines start with ';' indicating that these are comment lines and are ignored by cGPSmapper. They are there so that you do not need to actually count the digits to determine which one refers to which object code. [DICTIONARY] 1234567890123456789012345678901234567890123 Level1RGN40=1111110000000000000000000000000000000000000...
MyCustomTypes.txt Your custom .TYP file may be combined with .IMG files into GMAPSUPP.IMG for uploading into a compatible Garmin GPSr using SendMap 2.0 v3.3 or later, available at http://cgpsmapper.com/en/buy.htm. We believe that any Garmin receiver which works with Garmin’s POILoader may have custom type definitions installed with your .IMG file.
Page 48
cGPSmapper Manual Creating custom type file [_id] ProductCode=1 FID=888 [End] [_drawOrder] Section At a minimum, your input file must define the draw order for ALL polygon types – not just your custom ones. Even if you don’t define any custom polygon types in your source file, this section is mandatory.
Type=0x4e,5 Type=0x4f,5 Type=0x50,3 Type=0x51,6 Type=0x52,4 Type=0x53,5 [end] 5.2 Custom Type Definition Your custom type definitions will replace the default imagery on your GPSr or Mapsource. All other objects will be rendered with their default imagery. [_point] Definitions Points (POIs) define your replacement bitmap for the associated POI type using the XPM format.
Page 51
string1=0x04,Large city string2=0x08,Ciudad grande defines the string ‘Large city’ when the GPSr is set for English, and ‘Ciudad grande’ when the GPSr is set for Spanish. Refer to page 92 for more information about supported language types. Point bitmap definitions may be up to 24 x 24 pixels and 254 colors. There may be different definitions for the daytime bitmap and the nighttime bitmap.
Page 52
"X X" "X X" "XXXX" This definition describes a 4x4 rectangle with a black 1-pixel border and a transparent center. Refer to section 9.3.5 (How do I create XPM definitions?), on page 93 for a discussion of how to create XPM descriptions using a graphics editor and conversion tools. http://cgpsmapper.com/ 52 of 100...
Page 53
[_line] Definitions Line definitions are used to replace the standard polyline types, including roads. There are two ways to define a line. You may either declare the line’s color and thickness attributes for its interior and border, or you may provide a custom bitmap. Both methods allow transparency in the definitions.
Page 54
Line declaration method 2: Describe a bitmap using XPM. [_line] Type=0x0a Xpm="32 5 4 1" "= c #b0b0b0" " c none" "3 c #585858" "4 c none" "================================" " ======= " ======= " ======= "================================" ;12345678901234567890123456789012 string1=0x04,Unpaved string2=0x08,Camino revistida [end] The first line of the xpm declaration indicates a definition 32 pixels wide, 5 pixels tall, with 4 colors, using 1 character for the pixel representations in the bitmap.
Page 55
Manual Creating custom type file In this screen capture from a Garmin nüvi, four polygon types are shown. The one on the left is a custom definition (described below), and the following three are standard type 0x4F, 0x50 and 0x51. The black boxes show 32x32 tiles. Notice that the leftmost tile uses two colors, while the next three tiles use transparency.
5.3 Putting it all together If you are serious about creating custom types, I recommend that you prepare a small Polish format test file so that you can quickly check your work. Once you have things the way you want them, then you should apply your TYP file to your larger maps. I use MapSource to test my work in progress, as it is much quicker than making a GMAPSUPP.IMG file and downloading it to the unit.
Page 58
cGPSmapper Manual Creating custom type file Sample screens from MapEdit of CustomDemo.mp: http://cgpsmapper.com/ 58 of 100...
Page 59
cGPSmapper Manual Creating custom type file Sample screen from MapSource of CustomDemo.img: http://cgpsmapper.com/ 59 of 100...
Page 60
cGPSmapper Manual Sample screens from nüvi: Standard roads and cities Standard Scrub, camping, mountain range http://cgpsmapper.com/ Creating custom type file Custom roads and cities Custom scrub, camping, mountain range 60 of 100...
PC, and also uploading the map data to mapping-capable GPS units. The MapSource program is included with maps bought from Garmin. The same program is shared between the various map sets that Garmin supplies. Recently, Garmin have been supplying MapSource 'Trip and Waypoint manager' free with their mapping GPS units.
Page 62
If you plan on distributing your maps, it is NOT a good idea to use the default value - i.e. 66 for the product ID. Rob Mech runs an 'Unofficial Garmin Product ID Database - UGPID' on keenpeople.com - where you can register an ID that hopefully only you will use.
6.4 Loading the maps into the GPS 1. Choose the map(s) Once in MapSource, the map(s) to be loaded in the GPS must be chosen first. This is done via any of the following methods: Under Switch to Product, in the View menu. Via the corresponding combo located in the View Toolbar.
Page 64
2. Select the map(s) The map(s) to be loaded in the GPS must be selected. This is done via any of the following methods: Under Map, in the Tools menu. Via the respective button located in the Tools Toolbar. Once this is done, the map to be selected must be clicked (in order to select it). The maps to be transferred to the GPS (and the bytes they occupy) will be shown to the left of the screen.
• sendmap options. There are various locations where the name data is displayed both on the GPS unit and in the Garmin MapSource software. Figure 4 shows the relationship between where the name data is specified and where it is displayed.
MapVersion=nnn Copy1=xxxxxxx Copy2=xxxxxxx Copy3=xxxxxxx 11.2.3 Sendmap The name data specified when using Sendmap is used to describe a collection of PFM files. The name data is specified as command line options. Sendmap –M "MapSetName" filename1.img [filename2.img] […] http://cgpsmapper.com/ The software version of the CDSetName. This field is not displayed on the GPS unit.
Page 67
cGPSmapper Manual FAQs Figure 4: How name variables are shown http://cgpsmapper.com/ 67 of 100...
7.2 Activation of maps in the GPS 1. Activation of the map(s) in the GPS If the map image is not shown in the GPS, check that the map is selected to be shown. The method for doing this depends on the GPS model. For example you may find it on the MapSource Info screen, accessed from the unit's main menu or on the information page of the Setup Map screen.
7.3 Saving Objects as [RGNx0] vs. [POI], [POLYGON], [POLYLINE] 7.3.1 Equivalences Notation 1 Notation 2 [POLYLINE] [RGN40] [POLYGON] [RGN80] [POI] City=Y [RGN20] [END] [POI] City=N (or no city key) [RGN10] [END] [POI] covers both [RGN10] and [RGN20]. The difference is made with the 'City=y' key. 7.3.2 Impact of saving objects in one format or the other There is no impact.
cGPSmapper Manual FAQs Level0=18 Level1=17 Zoom0=5 Zoom1=6 (Does not overlap with detail IMG file) 7.5 Filling (Gas) Stations not showing in the find function of the GPS Use 0x2F01 (instead of 0x4400) if you want to show it in the find function of your GPS receiver.
Polish format map files cannot be sent directly to a GPS unit. First they must be converted into a format which is understandable to your GPS receiver. A program that performs this conversion is called a "map compiler".
When the TreSize value in [IMG ID] is too big - the resulting map IMG file renders more and more slowly on a GPS receiver. This value should never be higher than 5000. If the value is larger than 5000, it is internally changed to 5000 and the warning is shown.
Page 73
V Code Warning / Error Text W018 ID of map should be larger than 0x10000 (65536) or may not work in MapSource. W019 More than ONE background object defined - switching to full manual background creation mode. E001 Could not open file with country name definitions.
Page 74
V Code Warning / Error Text E018 Type of element for RGN40/RGN80 cannot be higher than 128. E019 Street cannot intersect with itself! Split this element! E020 No more than 8 active layers allowed. E021 Grid definition for layers must be descending (check Level# keys in [IMG ID]).
Page 75
V Code Warning / Error Text E025 Zoom definition for layers must be ascending (check Zoom# keys in [IMG ID]). E026 More than 65535 Tre regions were created in a single layer - use bigger TRESIZE and RGNLIMIT or split your map.
V Code Warning / Error Text R007 Node reduction. R008 Too short road to be routable - coordinates were aligned to same place R010 No data for routing - remove 'ROUTING=Y' from [IMG for non routable maps! R011 NODID points cannot be closer than 5.4 meter! R012 NODID point defined for non...
9.2.3 Facilities Facilities can be combined - i.e. facility with Car Wash + Open 24 Hours is 0x48 Mnemonic Description 0x01 HGV/RV Parking 0x02 Convenience Store 0x04 Diesel Fuel 0x08 Car Wash 0x10 Liquid Propane 0x20 HGV Scales 0x40 Open 24 Hours 0x80 not used 9.3 cGPSmapper object types list...
Page 79
Car Repair Airport Post Office Bank Car Dealer (point) Bus Station Marina Wrecker Service Parking Restroom Automobile Club Car Wash Garmin Dealer Personal Service Business Service Communication Repair Service Social Service Utility Truck/Lorry Stop Generic Emergency/Government Police Station 79 of 100...
String3=0x04,Highway String4=0x08,Carretera LineWidth=5 BorderWidth=1 xpm="0 0 4 0" colors (4) "1 c #20c818" "2 c #309838" "3 c #20c818" "4 c #086808" [end] Code Language 0x00 Unspecified 0x01 French 0x02 German 0x03 Dutch 0x04 English 0x05 Italian 0x06 Finnish 0x07 Swedish 0x08 Spanish...
Resize as needed to your target dimensions. • Save in PNG-24 format with transparency. • IconXP steps: Go to http://www.aha-soft.com/iconxp/index.htm • of IconXP. (The registered version is $20US) Open your .PNG file from Photoshop. • Export As .XPM • Microsoft Word steps: Open the .xpm file.
Page 95
• Direct support for ESRI shape format • City and POI indexing is limited to 100 cities and POIs in standard maps. Indexing means that cities and POIs may be searched using the GPS receiver's "Find by name" function (subject to the receiver limitations).
Version Routable Marine 9.5 cGPSmapper files This section will be further documented in a future version of this manual. The table below lists the contents of the main files that are distributed with the compiler. File cGPSmapper-Help .txt cgpsmapper.exe Datum_List.txt Readme.first Readme0080.txt RGNtype.txt...
10 Index and Tables 10.1 Table of Figures IGURE LESS DETAIL MAP EXAMPLE IGURE MORE DETAIL MAP EXAMPLE 3: M IGURE ETAIL ETUP 4: H IGURE OW NAME VARIABLES ARE SHOWN 10.2 Version Control Log Ver# Date Edited by 2005-04-01 M. Zalba 2005-04-04 H.Scheffler...