kungfoo / geohash-java

Implementation of GeoHashes in java. We try to be/stay compliant to the spec, as far as possible.
Other
985 stars 309 forks source link

Match intersection #34

Closed muety closed 5 years ago

muety commented 5 years ago

Is is possible to check whether the tile, corresponding to a GeoHash of certain precision, partly intersects with a given bounding box? I think GeoHash::within() will only match when the other GeoHash is completely contained in the one, which the method is called on, right?

Example:

image

kungfoo commented 5 years ago

You can get the bounding box of any hash by using getBoundingBox(), then do the intersection on the two bounding boxes. Does that solves your problem?