geocoordinate-to-geohash
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

geocoordinate-to-geohash

Converts a geocoordinate to a geohash

Support TypeScript!

Usage

$ yarn add geocoordinate-to-geohash
import { geocoordinateToGeohash } from "geocoordinate-to-geohash";
const latitude = 37.56616;
const longitude = 126.978356;
const precision = 5;
const geohash = geocoordinateToGeohash({
  latitude,
  longitude,
  precision, // default is 6
});

console.log(geohash);

Precision

the maximum level of geohash precision is 12 and it represents a tile of 3.7 cm * 1.9 cm. finding your location can be very efficient and some what precise with Geohash.

In depth understanding of this algorithm, please check geohash-algorithm

/geocoordinate-to-geohash/

    Package Sidebar

    Install

    npm i geocoordinate-to-geohash

    Weekly Downloads

    10

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    7.21 kB

    Total Files

    10

    Last publish

    Collaborators

    • dongkyuuuu
    • ausinp0wers