uber h3 地理编码

python 包:

from h3 import h3

def geth3(lon, lat, levelnum):
    h3_address = h3.geo_to_h3(lat, lon, levelnum)  # 纬度,经度,地块级别
    hex_center_coordinates = h3.h3_to_geo(h3_address)
    hex_boundary = h3.h3_to_geo_boundary(h3_address)
    return h3_address

lon = 121.463708    # 国际 经度
lat = 31.422685     # 国际 纬度
levelnum = 6
h3address = geth3(lon, lat, levelnum)
print('h3address = ', h3address)

uber h3 地理编码_第1张图片

你可能感兴趣的:(my,python)