MVFv3 API Documentation
    Preparing search index...

    Type Alias ConnectionsExtensionSchema

    The ConnectionsExtensionSchema adds a connections property to the MVF, which is an array of Connections

    mvf-connections

    type ConnectionsExtensionSchema = {
        connections: (
            {
                entrances: (
                    { floorId: `f_${string}`; geometryId: `g_${string}` } & {
                        flags: number[];
                    }
                )[];
                entryCost: number;
                exits: (
                    { floorId: `f_${string}`; geometryId: `g_${string}` } & {
                        flags: number[];
                    }
                )[];
                floorCostMultiplier: number;
                id: `c_${string}`;
                type: | "unknown"
                | "elevator"
                | "escalator"
                | "travelator"
                | "stairs"
                | "door"
                | "ramp"
                | "ladder";
            } & {
                details?: {
                    description?: string;
                    externalId?: string;
                    icon?: string;
                    name?: string;
                    shortName?: string;
                };
            } & { extra?: { [key: string]: unknown } }
        )[];
    }
    Index

    Properties

    Properties

    connections: (
        {
            entrances: (
                { floorId: `f_${string}`; geometryId: `g_${string}` } & {
                    flags: number[];
                }
            )[];
            entryCost: number;
            exits: (
                { floorId: `f_${string}`; geometryId: `g_${string}` } & {
                    flags: number[];
                }
            )[];
            floorCostMultiplier: number;
            id: `c_${string}`;
            type: | "unknown"
            | "elevator"
            | "escalator"
            | "travelator"
            | "stairs"
            | "door"
            | "ramp"
            | "ladder";
        } & {
            details?: {
                description?: string;
                externalId?: string;
                icon?: string;
                name?: string;
                shortName?: string;
            };
        } & { extra?: { [key: string]: unknown } }
    )[]

    Type declaration

    • entrances: ({ floorId: `f_${string}`; geometryId: `g_${string}` } & { flags: number[] })[]

      The entrances to the connection.

    • entryCost: number

      The cost to enter the connection. Equivalent to the number of meters a person should walk out of their way to avoid entering the connection. For example, an elevator may have a high cost of 10-20 meters to represent the wait time, but stairs and escalators may have a cost of 0 since a person can walk right on. See also floorCostMultiplier.

      The straight line distance between entrance and exit is NOT used as part of the overall cost to use a connection. This means that for a journey through a connection that enters and exits on the same floor, the cost is ONLY this entryCost.

      That means:

      a) the entryCost should be set to represent the number of walking meters it's worth it walk rather than using this connection. So for something faster than walking like a travelator, if it crosses a real distance of 100m and has a cost of 50, it is saying it's actually worth walking 49m backwards to get on the travelator rather than continuing straight on.

      b) You cannot really have a same-floor connection with more than a single set of entrances and exits, or the cost will probably not be correct.

      c) You cannot naively use A* with Connections, because the straight line distance heuristic will not be admissible.

      0

    • exits: ({ floorId: `f_${string}`; geometryId: `g_${string}` } & { flags: number[] })[]

      The exits from the connection.

    • floorCostMultiplier: number

      The cost multiplier for the floor. This is multiplied by absolute difference in elevation between the entrance and exit of the connection to produce a cost in meters added to the entry cost. For example, if a person is attempting to enter on the 1st floor and exit on the 10th floor, the cost will be 9 * floorCostMultiplier meters.

      This is used to represent the different costs of changing elevations. For example, an elevator may have a floor cost multiplier of 1, where stairs may have a floor cost multiplier of 10, meaning it's worth walking 10 meters further to get to an elevator instead of stairs for every floor change.

      Combined with entryCost, this allows for a more accurate representation of the cost of using a connection.

      Note: If a journey through a connection enters and exits on the same floor, the cost is ONLY the entryCost. The floor cost multiplier will be 0, and the straight line distance between entrance and exit is NOT used.

      1

    • id: `c_${string}`

      A unique identifier for the connection.

    • type:
          | "unknown"
          | "elevator"
          | "escalator"
          | "travelator"
          | "stairs"
          | "door"
          | "ramp"
          | "ladder"

      The type of connection. A SafeStringEnum, meaning 'unknown', meaning that a Connection parsed using this version of the MVF specification that includes a new connection type must be downgraded to 'unknown'. An application should handle 'unknown' as a case and not crash.

    • Optionaldetails?: {
          description?: string;
          externalId?: string;
          icon?: string;
          name?: string;
          shortName?: string;
      }

      {@inheritDoc utility-types/details!Details}

    • Optionalextra?: { [key: string]: unknown }

      {@inheritDoc utility-types/extra!Extra}

      Extra