org.locationtech.geomesa.utils.geohash.GeohashUtils
Container for the two values that together constitute a recommended number of bits resolution to use for GeoHashes for a polygon.
Container for the two values that together constitute a recommended number of bits resolution to use for GeoHashes for a polygon.
the resolution, in bits, for the target polygon
how many GeoHashes we expect the target polygon to be decomposed into at the recommended resolution
Given a geometry and constraints, return a recommendation for the number of bits to use for expressing this polygon as a collection of GeoHashes.
Given a geometry and constraints, return a recommendation for the number of bits to use for expressing this polygon as a collection of GeoHashes.
The approach is simple: Given the MBR, compute the ratio of the area of the target geometry to its bounding rectangle. As the resolution of the GeoHashes increases, the ratio of the number that will be inside the target geometry to the total number inside the MBR should approach the ratio of the areas. This principle guides the estimate, and should be reasonable for any sufficiently (non-trivially) large value of bits-resolution.
the target geometry
the range of resolutions over which to range
defining the acceptance criteria for this search
the pair of (recommended resolution, expected number of GeoHashes) that best satisfy the given constraints
Miscellaneous utilities for dealing with geometry-sizing, such as determining a reasonable number of bits (GeoHash) resolution for sizing polygons.