geo.toGeoJsonBBox
This function gives the GeoJSON form `[west, south, east, north]` of a box.
CLI- Package
- @procedures/geo · README
- Path
["geo","toGeoJsonBBox"]- CLI
mark geo toGeoJsonBBox --box <object>- As data
{"$proc":["geo","toGeoJsonBBox"],"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","toGeoJsonBBox"], { box: {} });
console.log(JSON.stringify(result));From the command line
$ mark geo toGeoJsonBBox --box <object>
As data, in a program
{ "$proc": ["geo", "toGeoJsonBBox"], "input": { "box": {} } }Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
box | object | yes |
Output
The schema does not list fields (any[] | any[]).
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": {}
}
},
"required": [
"box"
],
"additionalProperties": false
},
"output": {
"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
}
]
}
}