Learn R Programming

alcyon (version 0.7.0)

axialToSegmentShapeGraph: Axial to Segment ShapeGraph

Description

Convert an Axial ShapeGraph to a Segment ShapeGraph

Usage

axialToSegmentShapeGraph(axialShapeGraph, stubRemoval = NULL)

Value

A new Segment ShapeGraph

Arguments

axialShapeGraph

An Axial ShapeGraph

stubRemoval

Remove stubs of axial lines shorter than this percentage (for example provide 0.4 for 40%)

Examples

Run this code
mifFile <- system.file(
    "extdata", "testdata", "barnsbury",
    "barnsbury_small_axial_original.mif",
    package = "alcyon"
  )
  sfMap <- st_read(mifFile,
    geometry_column = 1L, quiet = TRUE
  )
  shapeGraph <- as(sfMap, "AxialShapeGraph")
axialToSegmentShapeGraph(shapeGraph, stubRemoval = 0.4)

Run the code above in your browser using DataLab