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

Negative areas #3

Closed
SymbolixAU opened this issue May 21, 2018 · 1 comment
Closed

Negative areas #3

SymbolixAU opened this issue May 21, 2018 · 1 comment

Comments

@SymbolixAU
Copy link
Collaborator

Some areas are negative

library(sf)
nc <- st_read(system.file("shape/nc.shp", package="sf"))

library(googlePolylines)
library(boostgeometry)

enc <- encode(nc)
wkt <- polyline_wkt(encode(nc))
bg_area(wkt$geometry, strategy = "geographic")
sf::st_area(nc)

Has to do with winding, but, why are the already considered 'correct'?

bg_area(bg_reverse(wkt[98, 'geometry']), strategy = "geographic")
bg_area(bg_correct(wkt[98, 'geometry']), strategy = "geographic")
@SymbolixAU
Copy link
Collaborator Author

My example seems to be related to googlePolylines precision : SymbolixAU/googlePolylines#23

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