Start in the middle, and build the 'path-link-vertex' table.
Paths.
sc_path(x, ...)
# S3 method for list
sc_path(x, ids = NULL, ...)
# S3 method for default
sc_path(x, ...)
# S3 method for PATH
sc_path(x, ...)
# S3 method for sfc_TIN
sc_path(x, ...)
# S3 method for PATH0
sc_path(x, ...)
# S3 method for ARC
sc_path(x, ...)
# S3 method for SC
sc_path(x, ...)
# S3 method for SC0
sc_path(x, ...)
# S3 method for matrix
sc_path(x, ...)
# S3 method for sf
sc_path(x, ids = NULL, ...)
# S3 method for sfc
sc_path(x, ids = NULL, ...)
# S3 method for MULTIPOLYGON
sc_path(x, ...)
# S3 method for POLYGON
sc_path(x, ...)
# S3 method for LINESTRING
sc_path(x, ...)
# S3 method for MULTILINESTRING
sc_path(x, ...)
# S3 method for POINT
sc_path(x, ...)
# S3 method for MULTIPOINT
sc_path(x, ...)
# S3 method for GEOMETRYCOLLECTION
sc_path(x, ...)
# S3 method for Spatial
sc_path(x, ids = NULL, ...)
input object
arguments passed to methods
object id, one for each object in the sfc
data frame of path identity and properties
Paths have properties of their type, their number of vertices, their geometric dimension and which object they occur in.
sc_coord
for the coordinates part of the model, sc_object
for
the features, and PATH
for the full model.
sc_path(minimal_mesh)
#> # A tibble: 3 × 6
#> ncol type subobject object_ path_ ncoords_
#> <int> <chr> <int> <chr> <chr> <int>
#> 1 2 MULTIPOLYGON 1 hQ8lod fB2U0d 8
#> 2 2 MULTIPOLYGON 1 hQ8lod 2oVpFs 6
#> 3 2 MULTIPOLYGON 1 rZRkgv LfmiJJ 5
sc_path(PATH(minimal_mesh))
#> # A tibble: 3 × 6
#> ncol type subobject object_ path_ ncoords_
#> <int> <chr> <int> <chr> <chr> <int>
#> 1 2 MULTIPOLYGON 1 5ez4SL bSgM27 8
#> 2 2 MULTIPOLYGON 1 5ez4SL tQfzoc 6
#> 3 2 MULTIPOLYGON 1 MuJ8eS EFdyQQ 5
sc_path(sfzoo$multipolygon)
#> # A tibble: 5 × 5
#> nrow ncol type subobject path_
#> <int> <int> <chr> <int> <chr>
#> 1 6 2 MULTIPOLYGON 1 O2K6wJ
#> 2 4 2 MULTIPOLYGON 1 QofmSE
#> 3 5 2 MULTIPOLYGON 2 yu79v0
#> 4 5 2 MULTIPOLYGON 2 kZNn5C
#> 5 4 2 MULTIPOLYGON 3 ssYNs2
sc_path(sfzoo$polygon)
#> # A tibble: 2 × 4
#> nrow ncol type path_
#> <int> <int> <chr> <chr>
#> 1 6 2 POLYGON pUFGiI
#> 2 4 2 POLYGON UBO9Y7
sc_path(sfzoo$linestring)
#> # A tibble: 1 × 4
#> nrow ncol type path_
#> <int> <int> <chr> <chr>
#> 1 4 2 LINESTRING LDyEgS
sc_path(sfzoo$multilinestring)
#> # A tibble: 3 × 4
#> nrow ncol type path_
#> <int> <int> <chr> <chr>
#> 1 4 2 MULTILINESTRING 19HIwV
#> 2 4 2 MULTILINESTRING uOHLka
#> 3 2 2 MULTILINESTRING ELgSYe
sc_path(sfzoo$point)
#> # A tibble: 1 × 4
#> nrow ncol type path_
#> <dbl> <dbl> <chr> <chr>
#> 1 1 2 POINT 6JlsQi
sc_path(sfzoo$multipoint)
#> # A tibble: 1 × 4
#> nrow ncol type path_
#> <int> <int> <chr> <chr>
#> 1 6 2 MULTIPOINT 5oRGji
sc_path(sfzoo$multipoint)
#> # A tibble: 1 × 4
#> nrow ncol type path_
#> <int> <int> <chr> <chr>
#> 1 6 2 MULTIPOINT xa2kkH