Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

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

No branches or pull requests

0 participants