← All procedures

geo.wayAccess

This function gives the directions of a way for a travel mode, from the tags of the way.

CLI
Package
@procedures/geo · README
Path
["geo","wayAccess"]
CLI
mark geo wayAccess --tags <null | object> --mode <string | string | object>
As data
{"$proc":["geo","wayAccess"],"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","wayAccess"], { tags: "<tags>", mode: "<mode>" });
console.log(JSON.stringify(result));

From the command line

$ mark geo wayAccess --tags <null | object> --mode <string | string | object>

As data, in a program

{
  "$proc": ["geo", "wayAccess"],
  "input": { "tags": "<tags>", "mode": "<mode>" }
}

Input

FieldTypeRequiredDefaultDescription
tagsnull | objectyes
modestring | string | objectyes

Output

The schema does not list fields ("backward" | "both" | "closed" | "forward").

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "tags": {
        "anyOf": [
          {
            "type": "null"
          },
          {
            "type": "object",
            "properties": {},
            "additionalProperties": {}
          }
        ]
      },
      "mode": {
        "anyOf": [
          {
            "type": "string",
            "const": "drive"
          },
          {
            "type": "string",
            "const": "walk"
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "highways": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "access": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "denied": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "oneway": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "impliedOneway": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "tag": {
                      "type": "string"
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "tag",
                    "values"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "name",
              "highways",
              "access",
              "denied",
              "oneway",
              "impliedOneway"
            ],
            "additionalProperties": {}
          }
        ]
      }
    },
    "required": [
      "tags",
      "mode"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "string",
    "enum": [
      "backward",
      "both",
      "closed",
      "forward"
    ]
  }
}