| a5_grid_disk | R Documentation |
Returns, for each centre cell, the cells reachable within k hops,
including the centre cell itself, as an a5_covering.
a5_grid_disk() steps between cells that share an edge;
a5_grid_disk_vertex() also steps between cells that share only a
vertex, so it reaches more cells for the same k.
a5_grid_disk(cell, k)
a5_grid_disk_vertex(cell, k)
cell |
An a5_cell vector of centre cells. |
k |
Non-negative integer scalar, number of hops. |
An a5_covering vector the same length as cell, at the
resolution of each centre cell. NA where cell is NA. Use
a5_uncompact() for the cells.
a5_spherical_cap() for distance-based selection.
cell <- a5_lonlat_to_cell(-3.19, 55.95, resolution = 8)
disk <- a5_grid_disk(cell, k = 1)
disk
a5_uncompact(disk)
a5_grid_disk_vertex(cell, k = 1)
cells <- a5_lonlat_to_cell(c(-3.19, 0), c(55.95, 0), resolution = 5)
a5_grid_disk(cells, k = 2) # one covering per cell
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.