View source: R/Round_Lat_Lon.R
roundLatLon | R Documentation |
The roundLatLon
function rounds lon/lat coordinates at the same resolution as the desired grid.
It can be used to aggregate spatial point data
roundLatLon(
x,
origin = 0,
cellsize = 1,
where = c("bottom-Left", "middle", "top-right")
)
x |
Integer or numeric vector containing the lon/lat information. |
origin |
Integer or character vector containing target nodes IDs. |
cellsize |
A non-negative integer or numeric vector containing the edges weights. |
where |
Character indicating where the rounding has to occur with respect to the origin or grid cells (default 'Bottom-Left'). |
lon = seq(1, 5, 0.01)
lat = seq(1, 5, 0.01)
roundLatLon(lon, origin = 0, cellsize = .123, where = "middle")
roundLatLon(lat, origin = 0, cellsize = .123, where = "middle")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.