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

unexpected change of raster object #1743

Closed
aloboa opened this issue Feb 17, 2025 · 3 comments
Closed

unexpected change of raster object #1743

aloboa opened this issue Feb 17, 2025 · 3 comments

Comments

@aloboa
Copy link

aloboa commented Feb 17, 2025

In the following, why does r change if I modify s?

> f <- system.file("ex/elev.tif", package="terra")
> r <- rast(f)
> res(r)
[1] 0.008333333 0.008333333
> s <- r
> res(r)
[1] 0.008333333 0.008333333
> extr <- ext(r)
> res(r)
[1] 0.008333333 0.008333333
> ext(s) <- extr*0.0001
> res(r)
[1] 8.333333e-07 8.333333e-07

terra_1.8-16

@rhijmans
Copy link
Member

Thanks, this was already fixed in the development version.

@aloboa
Copy link
Author

aloboa commented Feb 17, 2025

I confirm it works ok in terra_1.8-25
Do you have an estimate of how long this error has been occurring?
I had not noticed it.

@rhijmans
Copy link
Member

It looks like it has been like that from the beginning.

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

2 participants