Convert a GeoJSON linestring into an st_linestring

gj_linestring_to_st_linestring(gj_ls)

Arguments

gj_ls

A GeoJSON linestring

Value

The linestring as sf::sfg

Examples

if (FALSE) {
gj_ls <- paste0(
  "-14.803659 128.403426 10.9 5.9;",
  "-14.803719 128.40326 1.7 1.9;",
  "-14.803756 128.40317 1.9 1.7;",
  "-14.80383 128.402983 1.7 1.6;",
  "-14.803913 128.402786 1.4 1.6;"
)
x <- gj_linestring_to_st_linestring(gj_ls)
class(x) == c("XYZM", "LINESTRING", "sfg")
}