-
Notifications
You must be signed in to change notification settings - Fork 301
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
Surface area of the earth #2490
Comments
For me this gives > library(sf)
Linking to GEOS 3.12.1, GDAL 3.8.4, PROJ 9.3.1; sf_use_s2() is TRUE
> sf::FULL_bbox_ |> st_as_sfc() |> st_area()
5.100661e+14 [m^2] with > sf_use_s2(F)
Spherical geometry (s2) switched off
> sf::FULL_bbox_ |> st_as_sfc() |> st_area()
0 [m^2] |
And > sf_use_s2(TRUE); sf::FULL_bbox_ |> st_as_sfc() |> st_set_crs(NA) |> st_area()
Spherical geometry (s2) switched on
[1] 0
> sf_use_s2(FALSE); sf::FULL_bbox_ |> st_as_sfc() |> st_set_crs(NA) |> st_area()
Spherical geometry (s2) switched off
[1] 64800 which, I guess, should be an error for the first case: |
edzer
added a commit
that referenced
this issue
Dec 14, 2024
Gives (order reversed) library(sf)
# Linking to GEOS 3.12.1, GDAL 3.8.4, PROJ 9.4.0; sf_use_s2() is TRUE
sf_use_s2(FALSE); sf::FULL_bbox_ |> st_as_sfc() |> st_set_crs(NA) |> st_area()
# Spherical geometry (s2) switched off
# [1] 64800
sf_use_s2(TRUE); sf::FULL_bbox_ |> st_as_sfc() |> st_set_crs(NA)
# Spherical geometry (s2) switched on
# Error in `st_crs<-.sfc`(`*tmp*`, value = value) :
# To set the crs to NA, first remove the full polygons; see: st_is_full() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trying to find out the surface area of the earth:
returns 0
The text was updated successfully, but these errors were encountered: