v.19.14New Feature

Function Geohashesinbox(longitude_min, Latitude_min, Longitude_max, Latitude_max, Precision) Which Creates Array of Precision-long Strings of Geohash-boxes Covering Provided Area

Function geohashesInBox(longitude_min, latitude_min, longitude_max, latitude_max, precision) which creates array of precision-long strings of geohash-boxes covering provided area. #6127 (Vasily Nemkov)
Introduces the function geohashesInBox(longitude_min, latitude_min, longitude_max, latitude_max, precision) that returns an array of geohash strings of specified precision covering a given rectangular geographic area.

Why it matters

This function provides a convenient way to represent and index spatial areas using geohashes, enabling efficient spatial queries and geographic data processing by generating all geohash boxes within a specified bounding box area.

How to use it

Call the function with the bounding box coordinates (minimum longitude, minimum latitude, maximum longitude, maximum latitude) and the desired geohash precision as arguments. Example usage:

SELECT geohashesInBox(longitude_min, latitude_min, longitude_max, latitude_max, precision)
FROM ...

This returns an array of geohash strings covering the specified area.