未提供项目描述
项目描述
Polars-Reverse-Geocode
基于 https://github.com/gx0r/rrgeo 的 Polars 插件。
rrgeo 接收纬度和经度作为输入,并使用 k-d 树根据已知位置列表高效地找到最近邻,从而返回最接近的城市、国家、纬度和经度。如果您需要快速地对大量坐标进行反向地理编码,或者只需要坐标的大致位置,而不想使用在线反向地理编码器的费用或复杂性,这将非常有用。
安装
pip install polars-reverse-geocode
使用示例
import polars as pl
from polars_reverse_geocode import find_closest_city
df = pl.DataFrame({
'lat': [37.7749, 51.01, 52.5],
'lon': [-122.4194, -3.9, -.91]
})
print(df.with_columns(city=find_closest_city('lat', 'lon')))
shape: (3, 3)
┌─────────┬───────────┬───────────────────┐
│ lat ┆ lon ┆ city │
│ --- ┆ --- ┆ --- │
│ f64 ┆ f64 ┆ str │
╞═════════╪═══════════╪═══════════════════╡
│ 37.7749 ┆ -122.4194 ┆ San Francisco │
│ 51.01 ┆ -3.9 ┆ South Molton │
│ 52.5 ┆ -0.91 ┆ Market Harborough │
└─────────┴───────────┴───────────────────┘
项目详情
下载文件
下载您平台上的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。
源分布
polars_reverse_geocode-0.6.0.tar.gz (19.6 kB 查看哈希)
构建分布
关闭
polars_reverse_geocode-0.6.0.tar.gz 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | cba8fd6ed4055834152c815d3a68bd575a2101e443efa79aa5e0a9da90891afb |
|
MD5 | 6a9d5d99de4addd62c5d9ea1e2e680c0 |
|
BLAKE2b-256 | 515754093f150535c70d6d113888501cb69c979a0f997d20fe3b5e7224c25f35 |
关闭
polars_reverse_geocode-0.6.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 985e42e01fbde97515c28c2f29a3d7f50895ebadafce59b9dcbb5bef21d2a9a3 |
|
MD5 | f653278f2371ecc723c6960d755776e5 |
|
BLAKE2b-256 | 20ec69d667222054a35b3e15b5c10343e7451f2170085ccb840778b4acf77b8b |
关闭
polars_reverse_geocode-0.6.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 76eabdb64b08bc548801f7373998b2e6f8159166587ea96c961488225d6b1a46 |
|
MD5 | 3a27b5189efd7b434f7ce353d95444b0 |
|
BLAKE2b-256 | e51448350a8b87ed56383eb087c0cefdbff59324f9976ea03133629c73883c3c |
关闭
polars_reverse_geocode-0.6.0-cp38-abi3-macosx_11_0_arm64.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 29e61045db14d54f4468ab0908eb64b662793af1837340884955d7ae21569604 |
|
MD5 | e5073664c293717ecf7ba54f427faca5 |
|
BLAKE2b-256 | f6e60c21e4c17abc838b4766aa880e142488e1968b19714f6ef6501a59452e36 |
关闭
polars_reverse_geocode-0.6.0-cp38-abi3-macosx_10_12_x86_64.whl 的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 89e1b92e5999eead1248ff067b291d49be57b9dac31e567a0e726110c6d10136 |
|
MD5 | a7c6cab8d6a33b9b45421cdb76b1f172 |
|
BLAKE2b-256 | a4e1c58ada829ed88a8dec4040188732f253d07e0990ce3e279b06499d788e78 |