← All procedures
geo.geohashNeighbors
This function gives the eight neighbors of a cell. A neighbor past a pole is `undefined`.
CLI- Package
- @procedures/geo · README
- Path
["geo","geohashNeighbors"]- CLI
mark geo geohashNeighbors --hash <string>- As data
{"$proc":["geo","geohashNeighbors"],"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","geohashNeighbors"], { hash: "<hash>" });
console.log(JSON.stringify(result));From the command line
$ mark geo geohashNeighbors --hash <string>
As data, in a program
{ "$proc": ["geo", "geohashNeighbors"], "input": { "hash": "<hash>" } }Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"hash": {
"type": "string"
}
},
"required": [
"hash"
],
"additionalProperties": false
},
"output": {
"type": "object",
"properties": {
"n": {
"type": "string"
},
"ne": {
"type": "string"
},
"e": {
"type": "string"
},
"se": {
"type": "string"
},
"s": {
"type": "string"
},
"sw": {
"type": "string"
},
"w": {
"type": "string"
},
"nw": {
"type": "string"
}
},
"additionalProperties": {}
}
}