geohash: Tools for Geohash Creation and Manipulation
- CRAN: http://cran.r-project.org/web/packages/geohash/index.html
- Vignettes: Geohashing in R
- GitHub: https://github.com/Ironholds/geohash/
> library(geohash)
バージョン: 0.1.2
関数名 | 概略 |
---|---|
geohash |
Tools for handling URLs |
gh_decode |
Decode Geohashes |
gh_encode |
Encode Latitude and Longitude Values |
gh_neighbours |
Get neighbours to geohashes |
gh_decode
geohashのデコード
Arguments
- hashes: ハッシュ値
> gh_encode(lat = 42.60498046875, lng = -5.60302734375, precision = 5) %>%
+ gh_decode()
lat lng lat_error lng_error
1 42.60498 -5.603027 0.02197266 0.02197266
gh_encode
緯度経度のgeohashエンコード
Arguments
- lats
- lngs
- precision: 精度を指定(1から10の値)。初期値は6
> gh_encode(lat = 42.60498046875, lng = -5.60302734375, precision = 5)
[1] "ezs42"
gh_neighbours
近傍のgeohashの値を得る
Arguments
- hashes: ハッシュ値
> gh_neighbours("ezs42")
north northeast east southeast south southwest west northwest
1 ezs48 ezs49 ezs43 ezs41 ezs40 ezefp ezefr ezefx
> # 個別の値を得る
> north("ezs42")
[1] "ezs48"