geo.routeSteps
This function gives the steps of a route for a route on paper: a leg for each road, with its turn, and the arrival.
CLI- Package
- @procedures/geo · README
- Path
["geo","routeSteps"]- CLI
mark geo routeSteps --graph <object> --edges <number[]>- As data
{"$proc":["geo","routeSteps"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/geo/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["geo","routeSteps"], { graph: {}, edges: [] });
console.log(JSON.stringify(result));From the command line
$ mark geo routeSteps --graph <object> --edges <number[]>
As data, in a program
{
"$proc": ["geo", "routeSteps"],
"input": { "graph": {}, "edges": [] }
}Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
graph | object | yes | The road graph of the route. | |
edges | number[] | yes | The indices of the edges of the route in `graph.edges`. | |
options | object | no | The features of the graph, the tag reader, the name of a road and the shortest leg. |
Output
The schema does not list fields (object[]).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"graph": {
"type": "object",
"properties": {
"mode": {
"type": "string"
},
"nodes": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"point": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"description": "The latitude in degrees, from -90 to 90."
},
"lon": {
"type": "number",
"description": "The longitude in degrees. A normalized longitude is from -180 to less than 180."
}
},
"required": [
"lat",
"lon"
],
"additionalProperties": {}
}
},
"required": [
"id",
"point"
],
"additionalProperties": {}
}
],
"additionalItems": {},
"minItems": 2,
"maxItems": 2
},
"x-procedures-codec": "map"
},
"edges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"weight": {
"type": "number"
},
"meters": {
"type": "number",
"description": "The length of `line` on the sphere, from `distanceMeters`."
},
"line": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
},
"description": "The positions from the node `from` to the node `to`."
},
"feature": {
"type": "number",
"description": "The index of the feature of the way in the input."
},
"segment": {
"type": "number",
"description": "The number of the part of the way. The two directions of one part have the same number."
}
},
"required": [
"from",
"to",
"weight",
"meters",
"line",
"feature",
"segment"
],
"additionalProperties": {}
}
}
},
"required": [
"mode",
"nodes",
"edges"
],
"additionalProperties": {},
"description": "The road graph of the route."
},
"edges": {
"type": "array",
"items": {
"type": "number"
},
"description": "The indices of the edges of the route in `graph.edges`."
},
"options": {
"type": "object",
"properties": {
"features": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "FeatureCollection"
},
"features": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Feature"
},
"geometry": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/__schema0"
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiLineString"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiPoint"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Polygon"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "LineString"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Point"
},
"coordinates": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiPolygon"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
}
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
}
]
},
"properties": {
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {},
"additionalProperties": {}
}
]
},
"id": {
"type": [
"string",
"number"
]
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"geometry",
"properties"
],
"additionalProperties": {}
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"features"
],
"additionalProperties": {}
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Feature"
},
"geometry": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/__schema0"
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiLineString"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiPoint"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Polygon"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "LineString"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Point"
},
"coordinates": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiPolygon"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
}
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
}
]
},
"properties": {
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {},
"additionalProperties": {}
}
]
},
"id": {
"type": [
"string",
"number"
]
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"geometry",
"properties"
],
"additionalProperties": {}
}
}
],
"description": "The features that made the graph, as the input of `roadGraph`. The field `feature` of each edge is an index into this list. With no features, each road has an empty name."
},
"tags": {
"type": "object",
"properties": {
"$proc": {
"minItems": 1,
"type": "array",
"items": {
"type": "string"
}
},
"input": {},
"$when": {
"type": "string",
"const": "$never"
}
},
"required": [
"$proc"
],
"additionalProperties": {},
"x-procedures-program": {
"params": [
"feature"
],
"inputs": [
{
"$ref": "#/$defs/Feature_Geometry_null_GeoJsonProperties"
}
],
"output": {
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {},
"additionalProperties": {}
}
]
}
},
"description": "This function gives the tags of a feature. The default is the default of `roadGraph`."
},
"nameOf": {
"type": "object",
"properties": {
"$proc": {
"minItems": 1,
"type": "array",
"items": {
"type": "string"
}
},
"input": {},
"$when": {
"type": "string",
"const": "$never"
}
},
"required": [
"$proc"
],
"additionalProperties": {},
"x-procedures-program": {
"params": [
"feature",
"index"
],
"inputs": [
{
"$ref": "#/$defs/Feature_Geometry_null_GeoJsonProperties"
},
{
"type": "number"
}
],
"output": {
"type": "string"
}
},
"description": "This function gives the name of the road of a feature. The default is the tag `name`, then the tag `ref`, then an empty name."
},
"minLegMeters": {
"type": "number",
"description": "A leg shorter than this length joins the legs on its two sides when those two legs have the same name. The default is 0, so no leg joins."
}
},
"additionalProperties": {},
"description": "The features of the graph, the tag reader, the name of a road and the shortest leg."
}
},
"required": [
"graph",
"edges"
],
"additionalProperties": false,
"definitions": {
"__schema0": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "GeometryCollection"
},
"geometries": {
"type": "array",
"items": {
"anyOf": [
{
"allOf": [
{
"$ref": "#/definitions/__schema0"
}
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiLineString"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiPoint"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Polygon"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "LineString"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Point"
},
"coordinates": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiPolygon"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 2
}
}
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": {}
}
]
}
},
"bbox": {
"anyOf": [
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 4,
"maxItems": 4
},
{
"type": "array",
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"additionalItems": {},
"minItems": 6,
"maxItems": 6
}
],
"description": "The bounding box of the object (RFC 7946, section 5)."
}
},
"required": [
"type",
"geometries"
],
"additionalProperties": {}
}
}
},
"output": {
"type": "array",
"items": {
"type": "object",
"properties": {
"turn": {
"type": "string",
"enum": [
"arrive",
"depart",
"left",
"right",
"sharp-left",
"sharp-right",
"slight-left",
"slight-right",
"straight",
"u-turn"
],
"description": "The turn at the start of the step."
},
"bearingChange": {
"type": "number",
"description": "The change of the bearing at the start of the step, in degrees from -180 to less than 180. A negative value is a turn to the left. It is 0 for `depart`, for `arrive` and for a leg with no direction."
},
"name": {
"type": "string",
"description": "The name of the road. An empty name is an unnamed road."
},
"ref": {
"type": "string",
"description": "The value of the tag `ref` of the first edge of the leg, when it has one."
},
"meters": {
"type": "number",
"description": "The sum of the `meters` of the edges of the leg. It is 0 for `arrive`."
},
"startIndex": {
"type": "number",
"description": "The index of the first edge of the leg in the edge list. For `arrive`, it is the index of the last edge."
},
"endIndex": {
"type": "number",
"description": "The index of the last edge of the leg in the edge list. For `arrive`, it is the index of the last edge."
}
},
"required": [
"turn",
"bearingChange",
"name",
"meters",
"startIndex",
"endIndex"
],
"additionalProperties": {}
}
}
}