geomarker-io / appc

Daily, high resolution, near real-time, model-based ambient air pollution exposure assessments in R
http://geomarker.io/appc/
Other
0 stars 0 forks source link

readme section on s2 geohash #9

Closed cole-brokamp closed 8 months ago

cole-brokamp commented 10 months ago

The s2 geohash is a hierarchical geospatial index that uses spherical geometry (https://s2geometry.io/about/overview). The {appc} package uses s2 cells via the {s2} package to specify geospatial locations.

In R, s2 cells can be created using their character string representation, or by specifying latitude and longitude coordinates; e.g.:

s2::s2_lnglat(c(-84.4126, -84.5036), c(39.1582, 39.2875)) |> s2::as_s2_cell()

#> <s2_cell[2]>
#> [1] 8841ad122d9774a7 88404ebdac3ea7d1
cole-brokamp commented 9 months ago

https://geohash.softeng.co/

cole-brokamp commented 9 months ago

https://s2geometry.io/devguide/s2cell_hierarchy.html