createGrid | R Documentation |
Create a PointMap through a grid
createGrid(minX, minY, maxX, maxY, gridSize, verbose = FALSE)
minX |
Minimum X of the bounding region |
minY |
Minimum Y of the bounding region |
maxX |
Maximum X of the bounding region |
maxY |
Maximum Y of the bounding region |
gridSize |
Size of the cells |
verbose |
Optional. Show more information of the process. |
A new PointMap
mifFile <- system.file(
"extdata", "testdata", "simple",
"simple_interior.mif",
package = "alcyon"
)
sfMap <- st_read(mifFile,
geometry_column = 1L, quiet = TRUE
)
shapeMap <- as(sfMap[, vector()], "ShapeMap")
lineStringMap <- as(sfMap, "sf")
mapRegion <- sf::st_bbox(lineStringMap)
createGrid(
minX = mapRegion[["xmin"]],
minY = mapRegion[["ymin"]],
maxX = mapRegion[["xmax"]],
maxY = mapRegion[["ymax"]],
gridSize = 0.04
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.