← All procedures

geo.joinLines

This function joins lines with a common end into longer lines, for example the ways of one street. Each input line goes into one result line, forward or reversed.

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

From the command line

$ mark geo joinLines --lines <any[][][]>

As data, in a program

{ "$proc": ["geo", "joinLines"], "input": { "lines": [] } }

Input

FieldTypeRequiredDefaultDescription
linesany[][][]yesThe lines. Each line has two or more positions.

Output

The schema does not list fields (any[][][]).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "lines": {
        "type": "array",
        "items": {
          "type": "array",
          "items": {
            "type": "array",
            "items": [
              {
                "type": "number"
              },
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "additionalItems": {},
            "minItems": 2
          }
        },
        "description": "The lines. Each line has two or more positions."
      }
    },
    "required": [
      "lines"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "array",
    "items": {
      "type": "array",
      "items": {
        "type": "array",
        "items": [
          {
            "type": "number"
          },
          {
            "type": "number"
          },
          {
            "type": "number"
          }
        ],
        "additionalItems": {},
        "minItems": 2
      }
    }
  }
}