createGrid {alcyon}R Documentation

Create a PointMap through a grid

Description

Create a PointMap through a grid

Usage

createGrid(minX, minY, maxX, maxY, gridSize, verbose = FALSE)

Arguments

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.

Value

A new PointMap

Examples

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
)

[Package alcyon version 0.4.0 Index]