← All procedures

geo.bboxContains

This function gives `true` when the closed box has the point. A box that reaches a pole has the pole for each longitude.

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

From the command line

$ mark geo bboxContains --box <object> --point <object>

As data, in a program

{
  "$proc": ["geo", "bboxContains"],
  "input": { "box": {}, "point": {} }
}

Input

FieldTypeRequiredDefaultDescription
boxobjectyes
pointobjectyes

Output

The schema does not list fields (boolean).

JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "box": {
        "type": "object",
        "properties": {
          "west": {
            "type": "number"
          },
          "south": {
            "type": "number"
          },
          "east": {
            "type": "number"
          },
          "north": {
            "type": "number"
          }
        },
        "required": [
          "west",
          "south",
          "east",
          "north"
        ],
        "additionalProperties": {}
      },
      "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": [
      "box",
      "point"
    ],
    "additionalProperties": false
  },
  "output": {
    "type": "boolean"
  }
}