# Routing ## Calculate a route between two points `client.routing.route(RoutingRouteParamsbody, RequestOptionsoptions?): RouteResult` **post** `/api/v1/route` Calculate a route between two points ### Parameters - `body: RoutingRouteParams` - `destination: Destination` Geographic coordinate as a JSON object with `lat` and `lng` fields. - `lat: number` Latitude in decimal degrees (-90 to 90) - `lng: number` Longitude in decimal degrees (-180 to 180) - `origin: Origin` Geographic coordinate as a JSON object with `lat` and `lng` fields. - `lat: number` Latitude in decimal degrees (-90 to 90) - `lng: number` Longitude in decimal degrees (-180 to 180) - `alternatives?: number` Number of alternative routes to return (0-3, default 0). When > 0, response is a FeatureCollection of route Features. - `annotations?: boolean` Include per-edge annotations (speed, duration) on the route (default: false) - `depart_at?: string | null` Departure time for traffic-aware routing (ISO 8601) - `ev?: Ev | null` Electric vehicle parameters for EV-aware routing - `battery_capacity_wh: number` Total battery capacity in watt-hours (required for EV routing) - `connector_types?: Array | null` Acceptable connector types (e.g. `["ccs", "chademo"]`) - `initial_charge_pct?: number` Starting charge as a fraction 0-1 (default: 0.8) - `min_charge_pct?: number` Minimum acceptable charge at destination as a fraction 0-1 (default: 0.10) - `min_power_kw?: number | null` Minimum charger power in kilowatts - `exclude?: string | null` Comma-separated road types to exclude (e.g. `toll,motorway,ferry`) - `geometries?: "geojson" | "polyline" | "polyline6"` Geometry encoding format. Default: `geojson`. - `"geojson"` - `"polyline"` - `"polyline6"` - `mode?: "auto" | "foot" | "bicycle"` Travel mode (default: `auto`) - `"auto"` - `"foot"` - `"bicycle"` - `overview?: "full" | "simplified" | "false"` Level of geometry detail: `full` (all points), `simplified` (Douglas-Peucker), `false` (no geometry). Default: `full`. - `"full"` - `"simplified"` - `"false"` - `steps?: boolean` Include turn-by-turn navigation steps (default: false) - `traffic_model?: "best_guess" | "optimistic" | "pessimistic" | null` Traffic prediction model (only used when `depart_at` is set) - `"best_guess"` - `"optimistic"` - `"pessimistic"` - `waypoints?: Array | null` Intermediate waypoints to visit in order (maximum 25) - `lat: number` Latitude in decimal degrees (-90 to 90) - `lng: number` Longitude in decimal degrees (-180 to 180) ### Returns - `RouteResult` GeoJSON Feature representing a calculated route. The geometry is a LineString or MultiLineString of the route path. When `alternatives > 0`, the response is a FeatureCollection containing multiple route Features. - `geometry: GeoJsonGeometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: Array | Array> | Array>> | Array>>>` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Array` - `Array>` - `Array>>` - `Array>>>` - `type: "Point" | "LineString" | "Polygon" | 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: Properties` Route metadata - `distance_m: number` Total route distance in meters - `duration_s: number` Estimated travel duration in seconds - `annotations?: Record | null` Per-edge annotations (present when `annotations: true` in request) - `charge_profile?: Array> | null` Battery charge level at route waypoints as [distance_fraction, charge_pct] pairs (EV routes only) - `charging_stops?: Array> | null` Recommended charging stops along the route (EV routes only) - `edges?: Array> | null` Edge-level route details (present when `annotations: true`) - `energy_used_wh?: number | null` Total energy consumed in watt-hours (EV routes only) - `type: "Feature"` - `"Feature"` ### Example ```typescript import Plaza from '@plazafyi/sdk'; const client = new Plaza({ apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted }); const routeResult = await client.routing.route({ destination: { lat: 48.8584, lng: 2.2945 }, origin: { lat: 48.8566, lng: 2.3522 }, }); console.log(routeResult.geometry); ``` #### Response ```json { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "distance_m": 4523.7, "duration_s": 847.2, "annotations": { "foo": "bar" }, "charge_profile": [ [ 0 ] ], "charging_stops": [ { "foo": "bar" } ], "edges": [ { "foo": "bar" } ], "energy_used_wh": 0 }, "type": "Feature" } ``` ## Snap a coordinate to the nearest road `client.routing.nearest(RoutingNearestParamsquery, RequestOptionsoptions?): NearestResult` **get** `/api/v1/nearest` Snap a coordinate to the nearest road ### Parameters - `query: RoutingNearestParams` - `lat: number` Latitude - `lng: number` Longitude - `outputFields?: string` Comma-separated property fields to include - `outputInclude?: string` Extra computed fields: bbox, distance, center - `outputPrecision?: number` Coordinate decimal precision (1-15, default 7) - `radius?: number` Search radius in meters (default 500, max 5000) ### Returns - `NearestResult` GeoJSON Point Feature representing the nearest point on the road network to the input coordinate. Used for snapping GPS coordinates to roads. - `geometry: GeoJsonGeometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: Array | Array> | Array>> | Array>>>` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Array` - `Array>` - `Array>>` - `Array>>>` - `type: "Point" | "LineString" | "Polygon" | 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: Properties` Snap result metadata - `distance_m?: number` Distance from the input coordinate to the snapped point in meters - `edge_id?: number` ID of the road network edge that was snapped to - `edge_length_m?: number` Length of the matched road edge in meters - `highway?: string | null` OSM highway tag value (e.g. `residential`, `primary`, `motorway`) - `osm_way_id?: number` OSM way ID of the matched road segment - `surface?: string | null` OSM surface tag value (e.g. `asphalt`, `gravel`, `paved`) - `type: "Feature"` - `"Feature"` ### Example ```typescript import Plaza from '@plazafyi/sdk'; const client = new Plaza({ apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted }); const nearestResult = await client.routing.nearest({ lat: 0, lng: 0 }); console.log(nearestResult.geometry); ``` #### Response ```json { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "distance_m": 12.4, "edge_id": 0, "edge_length_m": 0, "highway": "highway", "osm_way_id": 0, "surface": "surface" }, "type": "Feature" } ``` ## Snap a coordinate to the nearest road `client.routing.nearestPost(RoutingNearestPostParamsparams, RequestOptionsoptions?): NearestResult` **post** `/api/v1/nearest` Snap a coordinate to the nearest road ### Parameters - `params: RoutingNearestPostParams` - `lat: number` Latitude - `lng: number` Longitude - `outputFields?: string` Comma-separated property fields to include - `outputInclude?: string` Extra computed fields: bbox, distance, center - `outputPrecision?: number` Coordinate decimal precision (1-15, default 7) - `radius?: number` Search radius in meters (default 500, max 5000) ### Returns - `NearestResult` GeoJSON Point Feature representing the nearest point on the road network to the input coordinate. Used for snapping GPS coordinates to roads. - `geometry: GeoJsonGeometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: Array | Array> | Array>> | Array>>>` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Array` - `Array>` - `Array>>` - `Array>>>` - `type: "Point" | "LineString" | "Polygon" | 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: Properties` Snap result metadata - `distance_m?: number` Distance from the input coordinate to the snapped point in meters - `edge_id?: number` ID of the road network edge that was snapped to - `edge_length_m?: number` Length of the matched road edge in meters - `highway?: string | null` OSM highway tag value (e.g. `residential`, `primary`, `motorway`) - `osm_way_id?: number` OSM way ID of the matched road segment - `surface?: string | null` OSM surface tag value (e.g. `asphalt`, `gravel`, `paved`) - `type: "Feature"` - `"Feature"` ### Example ```typescript import Plaza from '@plazafyi/sdk'; const client = new Plaza({ apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted }); const nearestResult = await client.routing.nearestPost({ lat: 0, lng: 0 }); console.log(nearestResult.geometry); ``` #### Response ```json { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "distance_m": 12.4, "edge_id": 0, "edge_length_m": 0, "highway": "highway", "osm_way_id": 0, "surface": "surface" }, "type": "Feature" } ``` ## Calculate an isochrone from a point `client.routing.isochrone(RoutingIsochroneParamsquery, RequestOptionsoptions?): RoutingIsochroneResponse` **get** `/api/v1/isochrone` Calculate an isochrone from a point ### Parameters - `query: RoutingIsochroneParams` - `lat: number` Latitude - `lng: number` Longitude - `time: number` Travel time in seconds (1-7200) - `mode?: string` Travel mode (auto, foot, bicycle) - `outputFields?: string` Comma-separated property fields to include - `outputGeometry?: boolean` Include geometry (default true) - `outputInclude?: string` Extra computed fields: bbox, center - `outputPrecision?: number` Coordinate decimal precision (1-15, default 7) - `outputSimplify?: number` Simplify geometry tolerance in meters ### Returns - `RoutingIsochroneResponse` GeoJSON Feature or FeatureCollection representing isochrone polygons — areas reachable within the specified travel time(s). Single time value returns a Feature; comma-separated times return a FeatureCollection with one polygon per contour. - `features?: Array | null` Array of isochrone polygon Features (multi-contour only) - `geometry: GeoJsonGeometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: Array | Array> | Array>> | Array>>>` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Array` - `Array>` - `Array>>` - `Array>>>` - `type: "Point" | "LineString" | "Polygon" | 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: Record` OSM tags flattened as key-value pairs, plus `@type` (node/way/relation) and `@id` (OSM ID) metadata fields. May include `distance_m` for proximity queries. - `type: "Feature"` Always `Feature` - `"Feature"` - `id?: string` Compound identifier in `type/osm_id` format - `geometry?: GeoJsonGeometry | null` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `properties?: Properties | null` Isochrone metadata - `area_m2?: number | null` Area of the isochrone polygon in square meters (multi-contour features only) - `max_cost_s?: number | null` Maximum actual travel cost in seconds to the isochrone boundary (single contour only) - `mode?: "auto" | "foot" | "bicycle"` Travel mode used for the isochrone calculation - `"auto"` - `"foot"` - `"bicycle"` - `time_seconds?: number` Travel time budget in seconds - `vertices_reached?: number` Number of road network vertices within the isochrone - `type?: "Feature" | "FeatureCollection"` `Feature` for single contour, `FeatureCollection` for multiple contours - `"Feature"` - `"FeatureCollection"` ### Example ```typescript import Plaza from '@plazafyi/sdk'; const client = new Plaza({ apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted }); const response = await client.routing.isochrone({ lat: 0, lng: 0, time: 0, }); console.log(response.features); ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "@id": "bar", "@type": "bar", "amenity": "bar", "cuisine": "bar", "name": "bar" }, "type": "Feature", "id": "node/21154906" } ], "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "area_m2": 0, "max_cost_s": 0, "mode": "auto", "time_seconds": 0, "vertices_reached": 0 }, "type": "Feature" } ``` ## Calculate an isochrone from a point `client.routing.isochronePost(RoutingIsochronePostParamsparams, RequestOptionsoptions?): RoutingIsochronePostResponse` **post** `/api/v1/isochrone` Calculate an isochrone from a point ### Parameters - `params: RoutingIsochronePostParams` - `lat: number` Latitude - `lng: number` Longitude - `time: number` Travel time in seconds (1-7200) - `mode?: string` Travel mode (auto, foot, bicycle) - `outputFields?: string` Comma-separated property fields to include - `outputGeometry?: boolean` Include geometry (default true) - `outputInclude?: string` Extra computed fields: bbox, center - `outputPrecision?: number` Coordinate decimal precision (1-15, default 7) - `outputSimplify?: number` Simplify geometry tolerance in meters ### Returns - `RoutingIsochronePostResponse` GeoJSON Feature or FeatureCollection representing isochrone polygons — areas reachable within the specified travel time(s). Single time value returns a Feature; comma-separated times return a FeatureCollection with one polygon per contour. - `features?: Array | null` Array of isochrone polygon Features (multi-contour only) - `geometry: GeoJsonGeometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: Array | Array> | Array>> | Array>>>` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Array` - `Array>` - `Array>>` - `Array>>>` - `type: "Point" | "LineString" | "Polygon" | 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: Record` OSM tags flattened as key-value pairs, plus `@type` (node/way/relation) and `@id` (OSM ID) metadata fields. May include `distance_m` for proximity queries. - `type: "Feature"` Always `Feature` - `"Feature"` - `id?: string` Compound identifier in `type/osm_id` format - `geometry?: GeoJsonGeometry | null` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `properties?: Properties | null` Isochrone metadata - `area_m2?: number | null` Area of the isochrone polygon in square meters (multi-contour features only) - `max_cost_s?: number | null` Maximum actual travel cost in seconds to the isochrone boundary (single contour only) - `mode?: "auto" | "foot" | "bicycle"` Travel mode used for the isochrone calculation - `"auto"` - `"foot"` - `"bicycle"` - `time_seconds?: number` Travel time budget in seconds - `vertices_reached?: number` Number of road network vertices within the isochrone - `type?: "Feature" | "FeatureCollection"` `Feature` for single contour, `FeatureCollection` for multiple contours - `"Feature"` - `"FeatureCollection"` ### Example ```typescript import Plaza from '@plazafyi/sdk'; const client = new Plaza({ apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted }); const response = await client.routing.isochronePost({ lat: 0, lng: 0, time: 0, }); console.log(response.features); ``` #### Response ```json { "features": [ { "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "@id": "bar", "@type": "bar", "amenity": "bar", "cuisine": "bar", "name": "bar" }, "type": "Feature", "id": "node/21154906" } ], "geometry": { "coordinates": [ 2.3522, 48.8566 ], "type": "Point" }, "properties": { "area_m2": 0, "max_cost_s": 0, "mode": "auto", "time_seconds": 0, "vertices_reached": 0 }, "type": "Feature" } ``` ## Calculate a distance matrix between points `client.routing.matrix(RoutingMatrixParamsbody, RequestOptionsoptions?): MatrixResult` **post** `/api/v1/matrix` Calculate a distance matrix between points ### Parameters - `body: RoutingMatrixParams` - `destinations: Array` Array of destination coordinates (max 50) - `lat: number` Latitude in decimal degrees (-90 to 90) - `lng: number` Longitude in decimal degrees (-180 to 180) - `origins: Array` Array of origin coordinates (max 50) - `lat: number` Latitude in decimal degrees (-90 to 90) - `lng: number` Longitude in decimal degrees (-180 to 180) - `annotations?: string` Comma-separated list of annotations to include: `duration` (always included), `distance`. Example: `duration,distance`. - `fallback_speed?: number | null` Fallback speed in km/h for pairs where no route exists. When set, unreachable pairs get estimated values instead of null. - `mode?: "auto" | "foot" | "bicycle"` Travel mode (default: `auto`) - `"auto"` - `"foot"` - `"bicycle"` ### Returns - `MatrixResult = Record` Distance matrix result. The exact response shape depends on the routing backend. Contains duration (and optionally distance) data for all origin-destination pairs. Null values indicate unreachable pairs. ### Example ```typescript import Plaza from '@plazafyi/sdk'; const client = new Plaza({ apiKey: process.env['PLAZA_API_KEY'], // This is the default and can be omitted }); const matrixResult = await client.routing.matrix({ destinations: [{ lat: 48.8584, lng: 2.2945 }], origins: [ { lat: 48.8566, lng: 2.3522 }, { lat: 48.8606, lng: 2.3376 }, ], }); console.log(matrixResult); ``` #### Response ```json { "foo": "bar" } ``` ## Domain Types ### Matrix Request - `MatrixRequest` Request body for distance matrix calculation. Computes travel durations (and optionally distances) between every origin-destination pair. Maximum 2,500 pairs (origins × destinations), each list capped at 50 coordinates. - `destinations: Array` Array of destination coordinates (max 50) - `lat: number` Latitude in decimal degrees (-90 to 90) - `lng: number` Longitude in decimal degrees (-180 to 180) - `origins: Array` Array of origin coordinates (max 50) - `lat: number` Latitude in decimal degrees (-90 to 90) - `lng: number` Longitude in decimal degrees (-180 to 180) - `annotations?: string` Comma-separated list of annotations to include: `duration` (always included), `distance`. Example: `duration,distance`. - `fallback_speed?: number | null` Fallback speed in km/h for pairs where no route exists. When set, unreachable pairs get estimated values instead of null. - `mode?: "auto" | "foot" | "bicycle"` Travel mode (default: `auto`) - `"auto"` - `"foot"` - `"bicycle"` ### Matrix Result - `MatrixResult = Record` Distance matrix result. The exact response shape depends on the routing backend. Contains duration (and optionally distance) data for all origin-destination pairs. Null values indicate unreachable pairs. ### Nearest Result - `NearestResult` GeoJSON Point Feature representing the nearest point on the road network to the input coordinate. Used for snapping GPS coordinates to roads. - `geometry: GeoJsonGeometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: Array | Array> | Array>> | Array>>>` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Array` - `Array>` - `Array>>` - `Array>>>` - `type: "Point" | "LineString" | "Polygon" | 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: Properties` Snap result metadata - `distance_m?: number` Distance from the input coordinate to the snapped point in meters - `edge_id?: number` ID of the road network edge that was snapped to - `edge_length_m?: number` Length of the matched road edge in meters - `highway?: string | null` OSM highway tag value (e.g. `residential`, `primary`, `motorway`) - `osm_way_id?: number` OSM way ID of the matched road segment - `surface?: string | null` OSM surface tag value (e.g. `asphalt`, `gravel`, `paved`) - `type: "Feature"` - `"Feature"` ### Route Request - `RouteRequest` Request body for route calculation. Origin and destination are lat/lng coordinate objects. Supports optional waypoints, alternative routes, turn-by-turn steps, and EV routing parameters. - `destination: Destination` Geographic coordinate as a JSON object with `lat` and `lng` fields. - `lat: number` Latitude in decimal degrees (-90 to 90) - `lng: number` Longitude in decimal degrees (-180 to 180) - `origin: Origin` Geographic coordinate as a JSON object with `lat` and `lng` fields. - `lat: number` Latitude in decimal degrees (-90 to 90) - `lng: number` Longitude in decimal degrees (-180 to 180) - `alternatives?: number` Number of alternative routes to return (0-3, default 0). When > 0, response is a FeatureCollection of route Features. - `annotations?: boolean` Include per-edge annotations (speed, duration) on the route (default: false) - `depart_at?: string | null` Departure time for traffic-aware routing (ISO 8601) - `ev?: Ev | null` Electric vehicle parameters for EV-aware routing - `battery_capacity_wh: number` Total battery capacity in watt-hours (required for EV routing) - `connector_types?: Array | null` Acceptable connector types (e.g. `["ccs", "chademo"]`) - `initial_charge_pct?: number` Starting charge as a fraction 0-1 (default: 0.8) - `min_charge_pct?: number` Minimum acceptable charge at destination as a fraction 0-1 (default: 0.10) - `min_power_kw?: number | null` Minimum charger power in kilowatts - `exclude?: string | null` Comma-separated road types to exclude (e.g. `toll,motorway,ferry`) - `geometries?: "geojson" | "polyline" | "polyline6"` Geometry encoding format. Default: `geojson`. - `"geojson"` - `"polyline"` - `"polyline6"` - `mode?: "auto" | "foot" | "bicycle"` Travel mode (default: `auto`) - `"auto"` - `"foot"` - `"bicycle"` - `overview?: "full" | "simplified" | "false"` Level of geometry detail: `full` (all points), `simplified` (Douglas-Peucker), `false` (no geometry). Default: `full`. - `"full"` - `"simplified"` - `"false"` - `steps?: boolean` Include turn-by-turn navigation steps (default: false) - `traffic_model?: "best_guess" | "optimistic" | "pessimistic" | null` Traffic prediction model (only used when `depart_at` is set) - `"best_guess"` - `"optimistic"` - `"pessimistic"` - `waypoints?: Array | null` Intermediate waypoints to visit in order (maximum 25) - `lat: number` Latitude in decimal degrees (-90 to 90) - `lng: number` Longitude in decimal degrees (-180 to 180) ### Route Result - `RouteResult` GeoJSON Feature representing a calculated route. The geometry is a LineString or MultiLineString of the route path. When `alternatives > 0`, the response is a FeatureCollection containing multiple route Features. - `geometry: GeoJsonGeometry` GeoJSON Geometry object per RFC 7946. Coordinates use [longitude, latitude] order. 3D coordinates [lng, lat, elevation] are used for elevation endpoints. - `coordinates: Array | Array> | Array>> | Array>>>` Coordinates array. Nesting depth varies by geometry type: Point = [lng, lat], LineString = [[lng, lat], ...], Polygon = [[[lng, lat], ...], ...], etc. - `Array` - `Array>` - `Array>>` - `Array>>>` - `type: "Point" | "LineString" | "Polygon" | 3 more` Geometry type - `"Point"` - `"LineString"` - `"Polygon"` - `"MultiPoint"` - `"MultiLineString"` - `"MultiPolygon"` - `properties: Properties` Route metadata - `distance_m: number` Total route distance in meters - `duration_s: number` Estimated travel duration in seconds - `annotations?: Record | null` Per-edge annotations (present when `annotations: true` in request) - `charge_profile?: Array> | null` Battery charge level at route waypoints as [distance_fraction, charge_pct] pairs (EV routes only) - `charging_stops?: Array> | null` Recommended charging stops along the route (EV routes only) - `edges?: Array> | null` Edge-level route details (present when `annotations: true`) - `energy_used_wh?: number | null` Total energy consumed in watt-hours (EV routes only) - `type: "Feature"` - `"Feature"`