Convert polygons into their component linestrings
polygons_to_linestring.RdConvert polygons into their component linestrings
Value
An sf object (simple feature collection) with geometry type LINESTRING. The returned object contains:
- polygon_id
Integer. The row index of the originating polygon from the input
.sfobject, enabling linkage back to the source polygon.- line_id
Integer. A sequential identifier for each line segment within its originating polygon. Line segments are ordered according to the vertex sequence of the polygon boundary.
- ...
All original attributes from the input
.sfobject are preserved and joined back viapolygon_id.- geometry
LINESTRING geometry. Each line segment represents one edge of the original polygon boundary.
The CRS of the output matches the input .sf object (transformed to EPSG:5070 during processing).