0.4.2 • Published 1 year ago

geodecode v0.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

GeoDecode

Fast offline city-scoped reverse geocoding

Usage

# install package
yarn add geodecode
import { nearest } from 'geodecode'

const coord = { latitude: -18.38446, longitude: -55.36554 };
const nearestCities = await nearest(coord, 2);
console.log(nearestCities);
/*
[
  [
    {
      name: "Rio Verde de Mato Grosso",
      latitude: -18.91806,
      longitude: -54.84417,
      countryCode: "BR"
    }, 0.5565556369000046
  ], [
    {
      name: "Coxim",
      latitude: -18.50667,
      longitude: -54.76,
      countryCode: "BR"
    }, 0.38161397570000566
  ]
]
*/

NOTE: First fetch will be slower due to k-d tree caching.

License

MIT

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago