https://github.com/alrico88/point-in-geohash
Check if a point is inside a geohash or generate a random point inside of it
https://github.com/alrico88/point-in-geohash
geohash inside javascript point
Last synced: 7 months ago
JSON representation
Check if a point is inside a geohash or generate a random point inside of it
- Host: GitHub
- URL: https://github.com/alrico88/point-in-geohash
- Owner: alrico88
- License: mit
- Created: 2021-09-17T15:45:04.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-17T21:16:35.000Z (about 4 years ago)
- Last Synced: 2025-03-24T04:34:03.400Z (7 months ago)
- Topics: geohash, inside, javascript, point
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/point-in-geohash
- Size: 77.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# point-in-geohash
Get a random coordinate or GeoJSON Point inside a geohash, or check if a coordinate is inside a geohash
## Installation
Using npm:
`npm i point-in-geohash`
Using yarn:
`yarn add point-in-geohash`
## Usage
Using CommonJS
```javascript
const { isCoordInGeohash } = require('point-in-geohash');isCoordInGeohash(40.41693093, -3.703500156922617, 'ezjmgtx'); // true
```Using imports
```javascript
import { randomCoordInGeohash } from 'point-in-geohash';randomCoordInGeohash('ezjmgtx'); // [-3.703500156922617, 40.41693093]
```## Documentation
See [DOCS](./docs/modules.md)