Descriptors

Descriptors appear nose-to-tail in the area of the file indicated by the oDescriptorOffset and oDescriptorLength fields of the file header.

Descriptors are variable length and use a C++ derived class structure. In other words, all descriptors of the same class start with the same fields but descriptors of more specialized sub-classes may add extra fields to the end.

From the terminology used it might be assumed that each descriptor describes a single object drawn on the map. This is not the case. Descriptors describe a collection of objects of the same class which are all completely contained within an area of the map. At display time, initial clipping is performed by selecting those descriptors which overlap the displayed area.

In principle, map descriptors do not necessarily describe objects to be drawn on the map. Other data, such as class hierarchy and rendering (display) information could be encoded in the descriptors but this is not yet done so currently the lowest two levels of the format are always used:-

Ignore the ClassInfo entries - these are used to define static (class) information used by the displayer.

All descriptors start with a MapDescriptor. The oId field in the MapDescriptor gives the class of the descriptor. This is a long integer but its value is set using a mnemonic form of the class name as a four character string - the first character in the string is stored in the low order byte, etc.

For example, the class MapTurnPoint is given the mnemonic "TURN" which is encoded as the hexadecimal byte values 0x54(T), 0x55(U), 0x52(R), 0x4E(N) which are stored as the long integer value 0x4E525554. This scheme has the nice consequence that the names of the descriptor classes are spelled out in file dumps.

Predefined Object Hierarchy
oId Class Name Description Parent Class
DESC MapDescriptor Generic descriptor None
OBJT MapObject Object to be displayed MapDescriptor
LINE MapLine Generic line segments MapObject
COST MapCoastLine Coastline MapLine
AIRS MapAirspaceBoundaryLine Airspace edge MapLine
GRND MapGroundFeatureLine Generic ground feature line MapLine
NAME MapNamedPoint Generic point with text name MapObject
TURN MapTurnPoint Turn point for task setting MapNamedPoint

The oLength field of the MapDescriptor structure contains the total length in bytes of the descriptor, including any members specific to subclasses. If further hierarchy information was available it would allow ignorant readers to skip unrecognised class extensions.

As mentioned above, in the current implementation all descriptors are MapObjects but future implementations might include other descriptors.

MapObject descriptors contain the bounding box in terms of latitude and longitude of the objects to be drawn. If this box overlaps the displayed window and the object type is selected for display then the items within the object must be examined individually for potential display.

Note that the bounding box is inclusive, that is, points in the data can have latitudes and longitudes equal to the minimum and maximum values concerned. Also, points are considered as taking up a single latitude and a single longitude - that is, the extent of any associated text is neglected. Therefore, if a point is just off the edge of the screen then the part of its name which is on the screen may or may not be displayed depending on its position within the bounding box of its descriptor.

In the MapObject the oDataOffset field indicates the position of the start of the data for the map objects within the file's map data. In other words, the data associated with the descriptor starts in the file at the offset specified by MapFileHeader::oDataOffset + MapObject::oDataOffset. The length of the data in bytes is given in the oDataLength member.

The meanings of the oNameLength and oExtraLength members of the MapNamedPoint structure are described under Data below.

The remaining classes (MapLine, etc) have no members not contained in the MapObject class and so require no further description here.


Contents, Next, Previous.