-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I think the solution here is, whenever a 'NA' / empty ID is found, it sends it down to the next level geometry. So multipolygon goes to polygon, polygon goes to linestring etc.
df <- data.frame(
poly_id = c(1,1,1,1,NA,NA,NA,2,2,2)
, line_id = rep(1,10)
, x = 1:10
, y = 1:10
)And you'd call to_sf() on this, rather than the specific sf_polygon() calls.
- GEOMETRY sfc
Metadata
Metadata
Assignees
Labels
No labels