← All procedures

geo.bboxIntersects

This function gives `true` when the two closed boxes have a common point. Two boxes that touch on an edge have a common point. Two boxes that reach the same pole have the pole.

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

From the command line

$ mark geo bboxIntersects --a <object> --b <object>

As data, in a program

{ "$proc": ["geo", "bboxIntersects"], "input": { "a": {}, "b": {} } }

Input

FieldTypeRequiredDefaultDescription
aobjectyes
bobjectyes

Output

The schema does not list fields (boolean).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "a": {
        "type": "object",
        "properties": {
          "west": {
            "type": "number"
          },
          "south": {
            "type": "number"
          },
          "east": {
            "type": "number"
          },
          "north": {
            "type": "number"
          }
        },
        "required": [
          "west",
          "south",
          "east",
          "north"
        ],
        "additionalProperties": {}
      },
      "b": {
        "type": "object",
        "properties": {
          "west": {
            "type": "number"
          },
          "south": {
            "type": "number"
          },
          "east": {
            "type": "number"
          },
          "north": {
            "type": "number"
          }
        },
        "required": [
          "west",
          "south",
          "east",
          "north"
        ],
        "additionalProperties": {}
      }
    },
    "required": [
      "a",
      "b"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "boolean"
  }
}