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

Change raster functions to terra #17

Closed
Martin-Jung opened this issue Sep 4, 2021 · 3 comments
Closed

Change raster functions to terra #17

Martin-Jung opened this issue Sep 4, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Martin-Jung
Copy link
Collaborator

Martin-Jung commented Sep 4, 2021

There is an indication that terra is generally faster for many functions than raster. Thus we could change all the functionalities to terra. Unlikely to remove raster as a dependency since many other packages continue to use.
See package website.

Currently having terra and raster loaded still causes problems (for instance for as.data.frame(rasterObj)). Thus wait until terra has matured more

Note:
Also see how the use of the stars package develops

@Martin-Jung Martin-Jung added the Quality of life Quality of life improvement label Sep 4, 2021
@Martin-Jung
Copy link
Collaborator Author

To be done in early 2023 on a separate branch. terra has increasingly matured to a point where it might be viable to switch

@Martin-Jung Martin-Jung self-assigned this Jul 28, 2022
@Martin-Jung Martin-Jung changed the title [Low priority] Change raster functions to terra Change raster functions to terra Jan 23, 2023
@Martin-Jung Martin-Jung added enhancement New feature or request help wanted Extra attention is needed and removed Quality of life Quality of life improvement labels Apr 5, 2023
Martin-Jung added a commit that referenced this issue Apr 11, 2023
Martin-Jung added a commit that referenced this issue Apr 25, 2023
@Martin-Jung
Copy link
Collaborator Author

Martin-Jung commented May 12, 2023

Current status Most functions successfully transferred.
Missing checks:

  • Scenarios do not project correctly currently. Issue seem to be that data.frame created from ´terra´ objects are not in the same order/values as stars.
  • Scenario constraints remain untested.
  • Offsets should be checked again for all engines.

Martin-Jung added a commit that referenced this issue Jun 12, 2023
* [skip-ci] First batch of work towards `terra` #17

* [skip-ci] Update with further work on terra transition

* Further work on #17

* Finished adoption towards `terra` #17

* Further work on translating to `terra` #17

* Added and worked on unit tests and changed last (?) remaining function calls #17

* Minor fixes and ensuring test script runs. Next scenarios tests and articles #17

* Further fixes on #17 and making sure most vignettes run

* Minor fixes and attempts to narrow down the data.frame issue #17

* Further bug fixes on scenario with `terra`. Now seems to work #17

* Further bug fixes on the way towards a `terra` #17

* Quick fix to unit test

* 🐛 Fix proj4string warning

* Fix warning in distfun() in utils-spatial.R @Martin-Jung does this make sense?

* Homogenise some arguments generic functions

* Small restructure and fix to `project`

* Small code and readme update

---------

Co-authored-by: mhesselbarth <mhk.hesselbarth@gmail.com>
@Martin-Jung
Copy link
Collaborator Author

Finished with 6f9bbf6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
No open projects
Development

No branches or pull requests

1 participant