-
Notifications
You must be signed in to change notification settings - Fork 90
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
A circle is deformed by rotation around its center by the spin() function #1576
Comments
My guess: |
Yes but my rotated object is not in a Cartesian space... |
It got rotated in a Cartesian space. |
library(terra)
# terra 1.7.78
library(sf)
# Linking to GEOS 3.12.1, GDAL 3.8.4, PROJ 9.3.1; sf_use_s2() is TRUE
xlon <- 0 ; ylat <- -90
v = vect("POLYGON((0 -80,-120 -80,120 -80,0 -80))")
crs(v) = 'EPSG:4326'
spin(v, 120, xlon, ylat) |> sf::st_as_sf() |> sf::st_geometry() -> x
x[[1]]
# POLYGON ((8.660254 -95, 68.66025 8.923048, -51.33975 -198.923, 8.660254 -95)) note the latitudes outside +/- 90. |
Thanks, you example illustrates better my point. Should't |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear all,
I'm unsure whether this is a bug or or a feature, or if I'm missing something obvious. Here is my MRE:
The result is very confusing for me, if this is the intented behaviour I suggest that this should be documented in the spin() function.
Very best and thanks for this wonderful package,
Pr. Jean R. Lobry
P.-S. My sessionInfo()
The text was updated successfully, but these errors were encountered: