@stadiamaps/api
Version:
Stadia Maps Geospatial APIs
106 lines • 4.11 kB
TypeScript
import { OsrmLane } from './OsrmLane';
/**
* Detailed information about intersections that the route traverses. For every step, the first intersection is at the location of the maneuver. Additional intersections will be provided for every road or path traversed until the next step.
* @export
* @interface OsrmIntersection
*/
export interface OsrmIntersection {
/**
* A (longitude, latitude) coordinate pair.
* @type {Array<number>}
* @memberof OsrmIntersection
*/
location: Array<number>;
/**
* A list of bearing values that are available for travel through the intersection.
* @type {Array<number>}
* @memberof OsrmIntersection
*/
bearings: Array<number>;
/**
*
* @type {Array<string>}
* @memberof OsrmIntersection
*/
classes?: Array<OsrmIntersectionClassesEnum>;
/**
* A list of entry flags, which map 1:1 to the bearings. A value of true indicates that the respective road could be entered on a valid route. False indicates that the turn onto the respective road would violate a restriction.
* @type {Array<boolean>}
* @memberof OsrmIntersection
*/
entry: Array<boolean>;
/**
* An index into bearings/entry array. Used to calculate the bearing just before the turn. Namely, the clockwise angle from true north to the direction of travel immediately before the maneuver/passing the intersection. Bearings are given relative to the intersection. To get the bearing in the direction of driving, the bearing has to be rotated by a value of 180. The value is not supplied for depart maneuvers.
* @type {number}
* @memberof OsrmIntersection
*/
_in?: number;
/**
* An index into bearings/entry array. Used to calculate the bearing just after the turn. Namely, the clockwise angle from true north to the direction of travel immediately after the maneuver/passing the intersection. This is not supplied for arrive maneuvers.
* @type {number}
* @memberof OsrmIntersection
*/
out?: number;
/**
* Available turn lanes at the intersection. May be omitted if no lane information is available for the intersection.
* @type {Array<OsrmLane>}
* @memberof OsrmIntersection
*/
lanes?: Array<OsrmLane>;
/**
* The index into the admin boundaries list on the route leg.
* @type {number}
* @memberof OsrmIntersection
*/
adminIndex?: number;
/**
* The estimated duration, in seconds, to traverse the intersection.
* @type {number}
* @memberof OsrmIntersection
*/
duration?: number;
/**
* The estimated duration, in seconds, to complete the turn.
* @type {number}
* @memberof OsrmIntersection
*/
turnDuration?: number;
/**
*
* @type {number}
* @memberof OsrmIntersection
*/
turnWeight?: number;
/**
* The index of the intersection in the leg geometry.
* @type {number}
* @memberof OsrmIntersection
*/
geometryIndex?: number;
/**
*
* @type {number}
* @memberof OsrmIntersection
*/
weight?: number;
}
/**
* @export
*/
export declare const OsrmIntersectionClassesEnum: {
readonly Toll: "toll";
readonly Ferry: "ferry";
readonly Restricted: "restricted";
readonly Motorway: "motorway";
readonly Tunnel: "tunnel";
};
export type OsrmIntersectionClassesEnum = (typeof OsrmIntersectionClassesEnum)[keyof typeof OsrmIntersectionClassesEnum];
/**
* Check if a given object implements the OsrmIntersection interface.
*/
export declare function instanceOfOsrmIntersection(value: object): value is OsrmIntersection;
export declare function OsrmIntersectionFromJSON(json: any): OsrmIntersection;
export declare function OsrmIntersectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): OsrmIntersection;
export declare function OsrmIntersectionToJSON(json: any): OsrmIntersection;
export declare function OsrmIntersectionToJSONTyped(value?: OsrmIntersection | null, ignoreDiscriminator?: boolean): any;
//# sourceMappingURL=OsrmIntersection.d.ts.map