Socket
Socket
Sign inDemoInstall

geohash-poly

Package Overview
Dependencies
74
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.0 to 0.4.1

.npmignore

10

package.json
{
"name": "geohash-poly",
"version": "0.4.0",
"version": "0.4.1",
"description": "Transform a GeoJSON Polygon or MultiPolygon to a list of geohashes that form it.",
"main": "index.js",
"bin": "./bin/cli.js",
"repository": {

@@ -18,8 +19,9 @@ "type": "git",

"dependencies": {
"async": "~0.2.10",
"geojson-area": "^0.1.0",
"ngeohash": "~0.2.0",
"point-in-polygon": "0.0.0",
"turf": "0.0.119",
"async": "~0.2.10",
"rc": "^0.6.0",
"through2": "~0.4.0",
"geojson-area": "^0.1.0"
"turf": "0.0.119"
},

@@ -26,0 +28,0 @@ "devDependencies": {

30

README.md

@@ -22,4 +22,4 @@ # Geohash-poly

var stream = geohashpoly.stream({
coords: polygon,
precision: 7,
coords: polygon,
precision: 7,
rowMode: true

@@ -73,2 +73,26 @@ });

- `'extent'`: return all hashes which make up the bounding box of the shape.
- `'intersect'`: return all hashes that intersect with the shape. Use the `'threshold'` option to specify a percentage of least coverage. See `examples/streaming.js`.
- `'intersect'`: return all hashes that intersect with the shape. Use the `'threshold'` option to specify a percentage of least coverage. See `examples/streaming.js`.
# Command Line
You can also install as a command line util via
`npm install geohash-poly -g`
## command line usage
Here are some examples of running it:
```bash
geohash-poly --csv=true --precision=9 --geocode=true "[[[-122.350051, 47.702893 ], [-122.344774, 47.702877 ], [-122.344777, 47.70324 ], [-122.341982, 47.703234 ], [-122.341959, 47.701421 ], [-122.339749, 47.701416 ], [-122.339704, 47.69776 ], [-122.341913, 47.697797 ], [-122.341905, 47.697071 ], [-122.344576, 47.697084 ], [-122.344609, 47.697807 ], [-122.349999, 47.697822 ], [-122.350051, 47.702893 ]]]"
```
Where additional command line switches are
- --csv=true output csv. default output is ndjson
- --geocode=true to add the lat and lon to the output
All of the standard options are supported as well.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc