polyfill | R Documentation |
Get all hexagons with centers contained in a given polygon.
polyfill(polygon, res = 7) ## S3 method for class 'matrix' polyfill(polygon, res = 7) ## S3 method for class 'sfc_POLYGON' polyfill(polygon, res = 7) ## S3 method for class 'sfc_MULTIPOLYGON' polyfill(polygon, res = 7) ## S3 method for class 'sf' polyfill(polygon, res = 7)
polygon |
geo-coordinates of polygon as lat/lng pairs (matrix) or object of class |
res |
resolution between 0 and 15 |
character vector of H3 indexes
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE) %>% sf::st_transform(4326) h3_indexes <- polyfill(nc[1, ], res = 7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.