https://github.com/ponlawat-w/geohash-compression
Simple geohash compressor (join cells in the same levels)
https://github.com/ponlawat-w/geohash-compression
geohash gis
Last synced: 4 months ago
JSON representation
Simple geohash compressor (join cells in the same levels)
- Host: GitHub
- URL: https://github.com/ponlawat-w/geohash-compression
- Owner: ponlawat-w
- Created: 2020-12-01T10:11:43.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-01T10:44:45.000Z (almost 5 years ago)
- Last Synced: 2025-05-03T14:19:29.490Z (5 months ago)
- Topics: geohash, gis
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/geohash-compression
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `geohash-compressor`
Compressing string array of geohash
## Example
```js
const fs = require('fs');
const compressor = require('geohash-compressor');const data = JSON.parse(fs.readFileSync('./data.json'));
const compressedData = compressor(data);
console.log(`Uncompressed length: ${data.length}`);
console.log(`Compressed length: ${compressedData.length}`);
```### Result
```
Uncompressed length: 26953
Compressed length: 2339
```### `data.json`
```json
["ezpgwfut","ezpgwfuv","ezpgwfvj","ezpgwfvm","ezpgwfvt","ezpgwfvv","ezpgwfyj","ezpgwfgh","ezpgwfgk","ezpgwfgs","ezpgwfgu","ezpgwfuh","ezpgwfuk","ezpgwfus","ezpgwfuu","ezpgwfvh","ezpgwfvk","ezpgwfvs","ezpgwfvu","ezpgwfyh","ezpgwfyk","ezpgwfys","ezpgwffg",...,"ezpgquns","ezpgqunu","ezpgquph","ezpgqupk","ezpgqups","ezpgqupu","ezpgqup7"]
```