<POI_DB_Creator>

POI DB specification

 

This document is an add-on to Specification_PA10 (S_PA10) , available at Mapsend_format group (this outstanding Specification_PA10 was written by members of the MapSend_Format group (every time I read the Specification I can not belive it was done from scratch! Such a smart people, many thanks to them, without the Specification none of the program here could be developed).

1. Structure of POI Database

POI database is composed of the following files:

Coordinates of the POIs (in terms of Cell# and X,Y offset) are located in 3 files in the MAP folder:

MAP\all_poi.lay
MAP\all_poi.drc (DR does not have this file)
MAP\all_poi.clt

Text information is located in the Raima database tables:

MAP\RaimaOUT\poi_data.dax
MAP\RaimaOUT\poi_data.dct
MAP\RaimaOUT\poi_data.dpo
MAP\RaimaOUT\poi_data.dsc
MAP\RaimaOUT\poi_data.dtx

There are also a few files (or sections in the files) that determine appearance of POIs on PC and GPSR screen:

DATA\catscat.dat (names of categories (and subcategories) that will be shown in MapSend and will be exported to GPSR). When user select categories to be shown (with F9 or "Options-POI" menu) this file changes.

MAP\poi.cfg (what icons will be used to show categories on PC screen and zoom properties)
MAP\map.ini (contains some information if POIs are presented n the map)
MAP\export.cfg ([POI] section determine category names that will be shown on GPSR and corresponding internal name in the receiver (determined in the firmware).

2. Database Files


2.1 all_poi.clt and all_poi.drc

Content is similar, some of newer MapSends (e.g. DirectRoute USA) do not have all_poi.drc et all.)
For format of the files see Specification_PA10 (refer later as S_PA10), section 4.10.3 and 4.13.3)

2.2. all_poi.lay

Structure of the header of the all_poi.lay is as in 4.10.6 section of S_PA10. If MapSend software have MAP\fast_lay.dta and MAP\fast_db.dta (almost all, except MMO), the headers are defined therein for the fast start. If all_poi.lay is created with custom header (coordinates, level, scale, etc), the files should be removed/renamed to force Mapsend use actual header from the all_poi.lay.

Format of the file is described in the 4.10.6 (4.10.6.4) section of S_PA10, with the following corrections:

STRUCT poi_object {
ubyte Category_Id;
ubyte Subcategory_Id;
ubyte Text_Offset;
uint Text_Slot;
}

Text_Slot:
uvsize Text_Slot

UNION vsize{
uint; //MTO byte order
3bytes; //MTO byte order
};

In the case of 3 bytes value for Text_Slot; it is useful to combine Text_Offset and Text_Slot in one
variable (Intel byte order):

ulong Text_reference= (Text_Offset << 24) | Text_slot or the same (Text_Offset<<24)+Text_Slot

 

2.3. poi_data.dpo

This file contains records of major information on every POI: cell#, number in cell, category, subcategory, references to text info (all_poi.dtx):

General structure of the file follows Raima DB rules, described in the 4.11 section of S_PA10 (see this section for more details):

STRUCT page{
time_t TimeStamp;
SEQUENCE slot[n1] Database_Records;
SEQUENCE zero[n2] Zero_Padding;
};

Page size is 0x200.

structure poiPoint_ {
uint 00 02 File_Identifier;
ulong 03 XX XX XX (03 00 00 00 + Slot_number);
3byte text_slot; Slot_number in poi_data.dtx
ubyte text_offset; Offset to text (relative to Slot_number);
ulong cell_number;
uint number_in_cell;
ubyte catg_id;
ubyte subcat_id;
}

Slot_number and Text_offset can be combined for convenience in one Text_Reference variable:

ulong Text_reference= (Text_Offset << 24) | Text_slot ((Text_Offset<<24)+Text_slot)

Number_in_Cell is a number of this POI's record in a map_object sequence defined in all_poi.lay (see 4.10.6 of S_PA10);

2.4. poi_data.dtx

This file contains POI's names and auxiliary information (values for aux fields):

STRUCT page{
time_t TimeStamp;
SEQUENCE slot[n1] Database_Records;
}


Page size is 0x200.

Note: In contrast to many others Raima tables, there is no zero_padding

structure auxText_ {
uint 00 03 File_Identifier;
ulong Slot_number;
char [248];
}

char [248] is a continuous sequence of chars, containing POI's name and auxiliary information, aux field separator is 0x09, end of POI record is 0x07. Next POI record starts immediately after 0x07. Names are sorted alphabetically.

Example (S&D Canada):

00000200: 12 2B 06 3C 03 00 01 00 │ 00 00 31 30 30 30 20 49 ↕+♠<♥ ☺ 1000 I
00000210: 73 6C 61 6E 64 73 20 47 │ 61 6E 61 6E 6F 71 75 65 slands Gananoque
00000220: 20 43 68 61 6D 62 65 72 | 20 4F 66 20 43 6F 6D 6D Chamber Of Comm
00000230: 65 72 63 09 32 20 4B 69 │ 6E 67 20 53 74 20 45 2C erc○2 King St E,
00000240: 20 47 61 6E 61 6E 6F 71 | 75 65 09 4F 4E 09 07 31 Gananoque○ON○•1
00000250: 30 32 32 31 36 39 20 4F │ 6E 74 61 72 69 6F 20 4C 022169 Ontario L
00000260: 69 6D 69 74 65 64 20 64 │ 2F 62 2F 61 20 53 6F 6F imited d/b/a Soo

 

3c 06 12 2b
00 03
00 00 00 01
'1000 Islands Gananoque Chamber of Commerce'
09
2 King St E, Gananoque 1st field
09
ON
09
07
'1022169 Ontario....

TimeStamp;
File_Identifier;
Slot_Number;
:POI name
Field separator
(Field names are defined in all_poi.dax )
Field separator
2nd field
Field separator
end
Next POI Name .....

2.5. poi_data.dct

Contains category names, references where character changed in all_poi.dtx (sorting) and references to slots where auxiliary field names are defined (in the all_poi.dax).

STRUCT page{
time_t TimeStamp;
SEQUENCE slot[n1] Database_Records;
SEQUENCE zero[n2] Zero_Padding;
};

Page size is 0x200.

record categ_info_ {
uint 00 00 File_Identifier;
ulong 01 XX XX XX ((01 00 00 00) | Slot_number);
ulong Number_of_ SubCatFields; (?)
ulong 02 XX XX XX slotFirst_SubCat;                           <need to be defined>
ulong 02 XX XX XX slotLast_SubCat;


ulong Number_of_ AuxFields;
ulong 04 XX XX XX slotFirst_AuxField; type A (see below)
ulong 04 XX XX XX slotLast_AuxField;
ulong POI_count;
ulong slotFirst_POI;
ulong slotLast_POI;
ulong firstChSlot[39];
ulong comm_slot;
char [25] Category_Name;
ubyte catg_id;
}

<need to be defined, not always correct>

Number_of_SubCutFields – number of slots containing SubCategory field names (?). Normally should be equal to slotLast_SubCat-slotFirst_SubCat. Not always, not clear if this correct or not

SlotFirst_SubCat: Slot number for the first entry in Sub category names chain in poi_data.dsc
SlotLast_SubCat : Slot number for the last entry in Sub category names chain in poi_data.dsc

Number_of_ AuxFields; number of Aux Fileld slots=Last_AuxField-First_AuxField
slotFirst_AuxField: Slot number for the first entry in the Auxiliary names chain in poi_data.dax
slotLast_AuxField : Slot number for the last entry in the Auxiliary names chain in poi_data.dax

POI_count: number of POIs in the category
slotFirst_POI: first slot in the poi_data.dpo
slotLast_POI: last slot in the poi_data.dpo

firstChSlot: indicates slot number in the poi_data.dtx, where the first character of POI's name changed; 39 bytes of ulong values stand for the following ascending characters (case insensitive):

[X,0,1,2,3,4,5,6,7,8,9,X,',a,b,c,d,......,z,X]

X denotes unidentified characters (did not find).

Comm_slot: Always zero;
Char name: Name for category;
Cat_id : Category number;

In some cases AUX fields are zeroes (For example Campground category in S&D USA):

00 00 00 00 ulong Number_of_ AuxFields;
00 00 00 00 ulong 04 XX XX XX slotFirst_AuxField; type B
00 00 00 00 ulong 04 XX XX XX slotLast_AuxField;

The two definitions can be mixed in one poi_data.dct, for some categories structure of the record is type A, for others is type B .

If AUX fields are zeroes (type B), they are defined in the poi_data.dsc (see below)

2.6. poi_data.dax

This file contains Auxiliary field names.

STRUCT page{
time_t TimeStamp;
SEQUENCE slot[n1] Database_Records;
SEQUENCE zero[n2] Zero_Padding;
};

Page size is 0x200;

record categ_info_ {
uint 00 04 File_Identifier;
ulong 04 XX XX XX ((04 00 00 00) | Slot_number);
ulong 01 XX XX XX ((01 00 00 00) | Slot_number in poi_data.dct=catg_id);
ulong 04 XX XX XX slotPrevious;
ulong 04 XX XX XX slotNext;

ulong 00 00 00 00;
ulong 00 00 00 00; always zeroes;
ulong 00 00 00 00;

char [25] AuxField_Name
ubyte AUXField_Type;
}

SlotPrevious: Slot Number of the previous record in the chain; if SlotPrevious=00 00 00 00 this is the very first record in the chain;
SlotNext: Slot Number of the next record in the chain; if SlotNext=00 00 00 00 this is the very last record in the chain;

AuxField_Name: Name of the auxiliary field
AUXField_Type, 01 for all fields, except captions (e.g @@CreditCards@@), for captions 02. Caption field has no values.

Field names can be:

POI_Name: field for POI's name, the POI_Name field name ("POI_name") is not shown;
NONAME: contains some text info, but AUX field name ("NONAME") is not shown;
Any name: name for the field that contain some text value (e.g. "Address" will contain some address information);
@@CaptionName@@: AUX field name ("Caption") will be shown, but this field contains no values;

2.7 poi_data.dsc

Contains subcategory names, references where character changed in all_poi.dtx (sorting)

STRUCT page{
time_t TimeStamp;
SEQUENCE slot[n1] Database_Records;
SEQUENCE zero[n2] Zero_Padding;
};

Page size is 0x200

record subcateg_info_ {
uint 00 01 File_Identifier;
ulong 02 XX XX XX ((02 00 00 00) | Slot_number);

00 00 00 00
00 00 00 00                                                     type A (if Aux names slots are in poi_data.dct)
00 00 00 00

or

ulong Number_of_ AuxFields;
ulong 04 XX XX XX slotFirst_AuxField;          type B (if poi_data.dct has zeroes for the
ulong 04 XX XX XX slotLast_AuxField;                                       slots)

01 XX XX XX 01 00 00 00 | Catg_id

ulong Number_of_ SubCatFields;
ulong 02 XX XX XX slotPrevious_SubCat;               <not always, to be defined>
ulong 02 XX XX XX slotNext_SubCat;

ulong POI_count_SubCat;
ulong firstChSlot_SubCat[39];
char name[25]; SubCat_Name
ubyte subcatg_id;
}

type A: if Aux names slots are defined in poi_data.dct
type B: if poi_data.dct contains zeroes for AUX slots (see section 2.5)

As was discussed in sec. 2.5 the two definitions can be mixed in one poi_data.dct file

Catg_id Number of category to which this subcategory belong.

<not always, to be defined>
Number_of_SubCatFields number of subcategory names for this category
SlotPrevious_SubCat: Slot Number of the previous record in the chain; if SlotPrevious_SubCat=00 00 00 00 this is the very first record in the chain;
SlotNext_SubCat: Slot Number of the next record in the chain; if SlotNext_SubCat=00 00 00 00 this is the very last record in the chain;

POI_count_SubCat number of POI for this subcategory

FirstChSlot_SubCat: indicates slot number in the poi_data.dtx, where the first character of POI's name changed; 39 bytes of ulong values stand for ascending characters (case insensitive) (same as in 2.5).

SubCat_Name : name for subcategory;

If there is no subcategories (e.g. Topo USA or Australia) the record looks like:

record subcateg_info_ {
uint 00 01 File_Identifier;
ulong 02 XX XX XX ((02 00 00 00) | Slot_number);
00 00 00 00
00 00 00 00
00 00 00 00
01 XX XX XX ( 01 00 00 00 | Catg_id )
00 00 00 00
00 00 00 00
00 00 00 00
ulong POI_count_SubCat;
ulong firstChSlot_SubCat[39]; the same array as for poi_data.dct
char [25]; SubCat_Name "NOSUB"+Number (formal name, will not be shown)
ubyte subcatg_id;
}

3. INI, DAT and CFG files

3.1. map.ini

There are 2 entries in the map.ini related to POIs.

1.

[LAYERS]
...................
POI_INDEX=0
...............................

if RaimaOut\ext_db.dbd contains description of POI's tables POI_Index=0, and POIs can be incorporated into DataBase, otherwise POI_Index=-1 and MapSend can not accept POI information (text for names and aux, but POIs will be shown with icons).

2.

[POI]
POI_CONFIG=poi.cfg

Reference to poi.cfg file

3.2. poi.cfg

Defines appearance on PC screen.

[LAYERS]
NUMBER=1
0=all_poi all_poi
SIZEQUEUES=20
LAYERSVISIBILITY=1 0
M_POIPOINT=1 0

[ACLV_INFO]
all_poi=1 1 1001.000000 0

[LOCALOPTIONS]
M_POIPOINT=(s 1 501.000000 40 1 !POI_Img\Arch.bmp! ..................................................40 1 !POI_SS_Img\Arch.bmp!......................)

[ACLV_INFO] see S_PA10, section 4.10.1.7 for details

[LOCALOPTIONS]
s – unknown
1 501.000 - switch to big icons at zoom > 1:500 000
40 Number of 13x13 icons (shown at high zoom)
N !path! number and path to 13x13 icons
....
40 Number of small icons (~7x7, but can be different)
N !path! path to small icons
If there is no icon (small or big) the POI will be shown with small square.

3.3 export.cfg

Defines how POIs look on GPSR screen

[POI]
UNIT_PARAMS=0 8 0 0 0 0 0 7 0 0 0 0 0 6 0 0 0 0 0 5 0 0 0 0 0 5 0 0 0 0 BLACK NO_FILL
POI_INDEX=4
CAT_NUMBER=40
0=Arch, Arch.bmp, ARCH
1=Area, Area.bmp, AREA

UNIT_PARAM define visibility at different zoom levels and map details settings. For more information see documents on zoom properties available at Mobilemapper and Magellan_Meridian yahoo groups.

POI_INDEX index to the poi group in the *.img file, must be the next number to the last used in the [GROUPS] section of the export.cfg.

CAT_NUMBER total number of categories

N=Name, Bmp, NAME_GPSR

N- category count number

Name: name for category how it will be shown on GPSR screen. Custom names allowed.

BMP- actually not used, some Mapsends has this name the same with defined in poi.cfg; recent MapSends (S&D USA, Canada, DR) use "a.bmp" for all categories.

NAME_GPSR, name for the category in GPSR firmware, can not be changed. To my knowledge all Magellan firmware (GPS, Gold, Platinum, Color... v4-v5) contain the same set of 87 names. GPSR looking for this name to show appropriate icon. If there is no match, icon will be shown with default "crossed square" icon.

Here is this complete set of names extracted from the firmware (in spite of some names are grammatically incorrect (RESTUARANTS), they must be used exactly how they are in the list)

AERIAL
AIRPORTS
AMUSEMENT
ARCH
AREA
ARROYO
ATM
AUTO_REPAIR
BAR
BASIN
BEACH
BENCH
BEND
BOATING
BOX
BRIDGE
BUS_STATION
CAMPS
CAPE
CLIFF
CRATER
CROSS
DEFAULT
EXIT
FALLS
FERRY_TERM
FIRST_AID
FIXED_NAV_AID
FLAT
FLOAT_BUOY
FOREST
FUEL
GAP
GARDENS
GEYSER
GLACIER
GOLF_COURSES
GUT
HARBOR
HOTEL
HOUSE
HUNT_FISH
ISTHMU
LARGE_CITIES
LAVA
LEVEE
LIGHT_HOUSE
LOCALE
MAJOR_CITIES
MARINA
MEDIUM_CITIES
MINE
MUSEUM
OBSTRUCTION
OILFIELD
PARKS
PILLAR
PLUS
RANGE
RAPIDS
RESERVE
RESORT
RESTUARANTS
RIDGE
ROCKS
RV_SERVICES
SCUBA
SHOOTING
SIGHT_SEEING
SLOPE
SMALL_CITIES
SOUNDINGS
SPORTS_ARENA
SPRING
SUMMIT
SWAMP
TOURIST
TOWER
TRAIN_STATION
TRUCK_SERVICES
TUNNEL
VALLEY
WELL
WINERIES
WOODS
WRECK
ZOOS

3.4 catscat.dat

This file defines what categories (and subcategories) will be shown on the PC and GPSR screens. Every time we change visibility of categories with "F9" ("Options-POI" menu), we change this file.

ulong CatSubCat_number
sequence
ubyte Size_of_Name
char [Size_of_Name] CatSubCat_Name

.........

CatSubCat_number total number of category and subcategory names that will be shown/exported
Size_of_Name size (number of characters in the name for category or subcategory)
CatSubCat_Name name of category or subcategory.

If there is no subcategories CatSubCat_number= total number of categories, in spite of formal NOSUBX used for subcategory names.