Skip to contents

Parses the GeoJSON produced by dwg_convert() into an sf data frame. The geometry keeps the drawing's local coordinates and carries no CRS; set the known one explicitly with sf::st_set_crs() before any reprojection.

Usage

dwg_as_sf(result, quiet = TRUE)

Arguments

result

A "dwg2geo_result" object from dwg_convert().

quiet

Suppress the reading message. Defaults to TRUE.

Value

An sf object with one row per feature and the CAD style metadata as columns.

Examples

if (FALSE) { # \dontrun{
shapes <- dwg_convert("drawing.dwg") |>
  dwg_as_sf() |>
  sf::st_set_crs(31983)
} # }