# geozip

> GeoZip implementation for node and the browser

Latest version **1.0.1** (published 2015-06-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install geozip
pnpm add geozip
yarn add geozip
bun add geozip
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-06-28 |
| First published | 2015-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Koen Schmeets |
| Maintainers | vespakoen |

## Links

- npm: https://www.npmjs.com/package/geozip
- npm.io page: https://npm.io/package/geozip

## Recent versions

- 1.0.1 (latest) — 2015-06-28
- 1.0.0 — 2015-06-28

## README

# geozip

A geozip implementation for node and the browser.

As described here: http://geozipcode.blogspot.nl/2015/02/geozip.html

## Installation

```shell
npm install --save geozip
```


## Usage

```js
var GeoZip = require('geozip');
var zipper = new GeoZip();

// standard usage
var encoded = zipper.encode(-34.783467, 128.294109);
var decoded = zipper.decode(encoded);
console.log(encoded);
console.log(decoded);

// validate input
var encoded = zipper.encode(-34.783467, 128.294, true); // throws error, coordinates do not have the same precision

// auto-fix precision
var encoded = zipper.encode(-34.783467, 128.294, true, 18); // no more errors
```

## Api

#### encode(lat, lng, validate = false, precision = 18)
returns a geohash

#### decode(geozip)
returns an object containing a "lat" and "lng" property

## License

MIT

---
_Source: https://npm.io/package/geozip · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
