Giter Site home page Giter Site logo

geohash-poly's Introduction

๐Ÿ‘ป

geohash-poly's People

Contributors

derrickpelletier avatar ikkala avatar jakeorr avatar ryanramage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

geohash-poly's Issues

npm audit show vulnerable package

I installed the package and now npm show me this warning about a vulnerable package included in the dependencies.
screenshot from 2019-01-28 17-18-31

Probably it just to upgrade a package. I think I can make a PR for this.

Performance increase idea

when the current row intersection is performed, and the poly is returned which represents the parts of the original poly that fall within the current row, rather than starting at the leftmost edge of the current row in the entire bounding box, we really only need to start at the leftmost edge of the bounding box of that poly that was returned.
and similarly end at the eastern extent.

This would save a lot of wasted checks. A turf.extent() would need to be performed for every row.

Return different geohash level

Dear sir, could I return different geohash level (precision) in one run? Beside it, could you tell me more details about your algorithm? How can you find the row bounding? Does it look like the image below? Another problem that I still don't understand is that how you build the row hash (the size, the offset)?
Thanks in advance!
usa

Options for what constitutes coverage

Currently the geohash centre point must be within a poly to pass as being part of the poly. This allows dealing with a large amount of shapes that are flush, there would be no overlapping hashes. In many cases there will be parts of the poly that are not covered by a geohash.

Would be nice to specify an option where coverage infers that the poly is entirely covered. Would require intersection detection I think.

Make cli accept a filepath

right now it's just accepting the string of a poly coordinates. Would like it to accept a geojson file perhaps.

hashMode 'intersection' bug (?) and workaround

Hi,
first of all thank you for your work and this great tool. It's really quite fast compared to other approaches.

I found a bug that occurs when using the hashMode 'intersection':
When you specify 'intersection' only (without a threshold) it includes geohashes which do not even touch the polygon:

geohashpoly({coords: coords, precision: 8, hashMode: "intersect" ....

results in:

hashMode intersect

A workaround is using a really small threshold:

geohashpoly({coords: coords, precision: 8, hashMode: "intersect", threshold: 0.0001} .....

results in:

hashMode intersect with small threshold

The second case should be the default behavior in my opinion.

Since it's easy to use a small threshold, a fix might not be needed but one should know about this issue, that's why I'm posting it here.

Best regards!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.