0.1.10 • Published 2 years ago
node-red-node-geohash v0.1.10
node-red-node-geohash
A Node-RED node to encode and decode lat,lon pairs to a geohash string.
Install
Run the following command in your Node-RED user directory - typically ~/.node-red
npm install node-red-node-geohash
Usage
This function encodes a lat,lon
string to and from a geohash.
If the msg.payload
is a string it tries to see if it's a geohash -
if so it tries to decode it and outputs a payload object containing
- latitude
- longitude
- errorlatitude
- error.longitude
If the msg.payload
is an object with properties lat
or latitude
and lon
or longitude
- it will add a geohash
property to the payload.
The precision can be set by msg.payload.precision
from 1 to 9.