Documentation

Navigation Files Spec

Nodes and Links

The Micello navigation network consists of a set of nodes and links.

  • Node - An allowed location in the network
  • Link - A routable connection between the nodes.

The links form the traversable paths in the network and they are simple connections between nodes.

Navigation nodes lie on a single physical level, which forms a three dimensional coordinate for the nodes. However, a single node may appear on multiple map levels because different map drawings can represent the same physical space. For example, an airport may have a main drawing (parent drawing) of all the terminals at ground level. In addition there can be drawings of the individual terminals (child drawings), which show greater detail than the main airport map and include multiple indoor levels. The ground level of a terminal map shows the same physical level as the main airport map.

As with geometry where greater detail appears on the child drawings, the same is true with the navigation network. There are many navigation nodes appearing in a child drawing which are omitted from the parent drawing. The nodes in the navigation data files include a list of levels on which they should be displayed.

The Navigation Node Network is a single JSON file that gives the complete navigation network for the entire community.

File Formats

The file comes in  two formats, a JSON format and a binary format. The binary format is written with a JAVA DataOutputStream and includes data patterns used by it, such as an encoded UTF String

Nav Community Object

JSON

{
    "id": community id,
    "v": community map version,
    "ft": "navnet5",

    //list of community properties
    "p": {
        see property format
    },

    //list of drawings, also containing levels
    "d": [nav drawing list...],

    //list of navigation nodes
    "n": [nav node list...],

    //list of navigation links
    "l": [nav link list...],
}

BIN

  • File format (UTF String) - "v5"
  • Community ID (int)
  • Map version (int)
  • Community properties - see property list format
  • Drawings
    • Drawing count (int)
    • Drawings - see Nav Drawing Object
  • Nodes
    • Node count (int)
    • Nodes - see Nav Node Object
  • Links
    • Link count (int)
    • Links - see Nav Link Object

Notes

In the micello database the community object is broken into two parts, called commuity map and community entity. Only the community map properties are shown in the navigation files. The community entity properties are omitted.

Nav Drawing Object

JSON

{
    "id": drawing id,

    //transform from mercator coordinates to map coordinates
    "t": [txx, tyx, txy, tyy, tx0, ty0],

    //list of drawing properties
    "p": {
        see property format
    },

    //list of levels in this drawing
    "l": [nav level list...]
}

BIN

  • Drawing ID (int)
  • Transform (6 * double) - Mercator to natural (map) coordinate affine transformation.
  • Drawing properties - see property list format
  • Level count (int)
  • Level list - see Nav Level Object format

Notes

In addition to the standard drawing properties associated with the drawing object, there is an added derived property "display_name". This is the recommended title for the drawing.

Nav Level Object

JSON

{
    "id": level id,
    "z": zlevel value,

    //list of level properties
    "p": {
        see property format
    },
}

BIN

  • Level ID (int)
  • Zlevel (int)
  • Level properties - see property list format

Nav Node

JSON

{
    "id": node id,
    "mx": node x coordinate, //in mercator coordinates
    "my": node y coordinate //in mercator coordinates

    //list of node properties
        "p": {
        see property format
    },

    //levels for this node
    "l": [list of nav node - level objects...]
}

BIN

  • Node ID (int)
  • Mercator X coordinate (double)
  • Mercator Y coordinate (double)
  • Level count (byte)
  • Level list - See Nav Node-Level Object format.
  • Node properties - see property list format

Nav Node-Level Object

JSON

{
    "lid": level id,
    "gid": geom id //if geometry is not null
}

BIN

  • Level ID (int)
  • Geom ID (int) - The geometry containing this node on this level. A value of 0 is used if there is no geometry.

Nav Link Object

JSON

{
    "id": link id,
    "n1": node 1 id,
    "n2": node 2 id,
    "d": direction of travel,
    "dm": 2 d length in meters,
    "dz": delta z, //only if not 0    

    //list of link properties
    "p": {
        see property format
    },
}

BIN

  • Link ID (int)
  • Start Node ID (int)
  • End Node ID (int)
  • Direction (byte)
    • 1 = forward
    • 2 = reverse
    • 3 = both
  • Distance in meters (float)
  • Delta zlevel (int)
  • Link properties - see property list format

Property List Format

Properties are key-value pairs, however there is some additional information tied to each one.

  • Name - This is the key
  • Value - This is a single value
  • Order - In the case of an array valued property, this gives the order of the property.
  • Lang - In the case of a language specific value, this gives the language or locale, otherwise it is null.

JSON

"p": [
    [value, name, order, lang(if lang is not null)],
    [value, name, order(if lang is null)],
    ...
]

BIN

  • Property count (byte)
  • List of properties
    • Property Name (UTF)
    • Property Value (UTF)
    • Order (int)
    • Lang (UTF) - In the case lang is null, an empty string is placed here.