#data #geohash #precision #usefull #distance #lat #numbers

r_geo_hash

一个用于获取一些有用数据的地理哈希库

1 个不稳定版本

0.1.0 2023年4月19日

#5 in #geohash

MIT/Apache

6KB
124 代码行(不含注释)

geohash

一个用于获取一些有用数据的地理哈希库

用法

使用库来获取

1. Distance between two geo-located points in Km, Miles and Nautic miles:
    - pass _lat, lon, lat, lon_ and _unit_ parameters to function.
    
2. Minimum geohash precision for a given geoBound array and the number of squares you want to divide it.
    - pass an array like _[ top_left => [ lat => x, lon => y ], bottom_right => [ lat => x, lon => y ]_.
    - pass the number of squares, it has to be multiple of two.
    - Function will return the minimal geohash precision (from 1 to 12) who can contain every square.

无运行时依赖