st_thin {rangeMapper} | R Documentation |
Thinning of polygonal grids
Description
Nearest neighbours spatial thinning of polygonal grids
Usage
st_thin(x, lag)
Arguments
x |
an sf data.frame. |
lag |
lag order. |
Value
a thinned sf::st_as_sf()
object.
Note
This function is still under development.
References
Based on SO answer: https://stackoverflow.com/questions/65907022/
Examples
## Not run:
require(rangeMapper)
con = rmap_connect()
wrens = read_wrens()
rmap_add_ranges(con, x = wrens, ID = 'sci_name')
rmap_prepare(con, 'hex', cellsize=500)
rmap_save_map(con)
x = rmap_to_sf(con)[, 'cell_id']
plot( st_thin(x,2) )
x = x[ ! x$cell_id %in% c(282,265) , ]
plot( st_thin(x,3) )
## End(Not run)
[Package rangeMapper version 2.0.3 Index]