Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mixed geometries #25

Open
1 task
SymbolixAU opened this issue Aug 8, 2019 · 0 comments
Open
1 task

mixed geometries #25

SymbolixAU opened this issue Aug 8, 2019 · 0 comments

Comments

@SymbolixAU
Copy link
Contributor

SymbolixAU commented Aug 8, 2019

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants