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

Incompability with terra SpatRaster objects #16

Closed
goergen95 opened this issue Apr 20, 2021 · 2 comments
Closed

Incompability with terra SpatRaster objects #16

goergen95 opened this issue Apr 20, 2021 · 2 comments

Comments

@goergen95
Copy link
Contributor

Hello @HannaMeyer,

in a current use-case I came across the issue that terra's SpatRaster objects are currently not supported by CAST.
Of course users can coerce their SpatRaster objects to RasterStack before using CAST functionality. However, in a recent PR #15 I included that functionality within the aoa and calibrate_aoa functions so that SpatRasters now won't throw an error and the output is also a SpatRaster object. Its a rather "dirty" solution but I was wondering if a transition to terra is something you are interested in for the package? And if so, should Raster objects still be supported since existing code might rely on the raster package? In that regard, if a transition to terra is considered valuable for CAST I guess it would make sense to "flip" the dependencies so that the general code base works on SpatRasters and Raster objects would be coerced beforehand?
Let me know if that is something you are interested in and I could put in some work on the mentioned PR.

@HannaMeyer
Copy link
Owner

Thanks Darius for adding the support for SpatRaster. It is currently not intended to move to terra but we're considering to have stars as the main package here.

@goergen95
Copy link
Contributor Author

Ok, thanks for the info and accepting the changes. Would be great to see terra support in the future development of the package.

HannaMeyer pushed a commit that referenced this issue Feb 7, 2024
* implement quantitative density layer

* document parameter k

* comments

* just spaces to be in sync with qmd scripts

* change QD to LPD

* update validation and maxLPD derivation

* update plot and print (#2)

* add exploreAOA function (#3)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* Dev (#4)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* update explore AOA docs

* shift package to description

* update exploreAOA docs

* update exploreAOA docs and add xmark

* update aoa, trainDI and exploreAOA docs

* update aoa docs

* change order of print.aoa

* update aoa.Rd

* update DESCRIPTION

* Dev (#6)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* update explore AOA docs

* shift package to description

* update exploreAOA docs

* update exploreAOA docs and add xmark

* update aoa, trainDI and exploreAOA docs

* update aoa docs

* change order of print.aoa

* update aoa.Rd

* update DESCRIPTION

* update aoa & trainDI

* add trainDat upload options

* raster to terra and new layout (#5)

* update plot function

* update exploreAOA

* update exploreAOA

* fix error

* fix error

* fix crs bounding box issue

* rm commented code

* update plot.aoa & exploreAOA

* fix error in trainLPD calculation

* fix MD calculation

* fix order in print.aoa & message in aoa()

* add predictors tif to CAST package

* add countryboundaries

* add elevation

* Dev (#12)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* update explore AOA docs

* shift package to description

* update exploreAOA docs

* update exploreAOA docs and add xmark

* update aoa, trainDI and exploreAOA docs

* update aoa docs

* change order of print.aoa

* update aoa.Rd

* update DESCRIPTION

* update aoa & trainDI

* add trainDat upload options

* raster to terra and new layout (#5)

* update plot function

* update exploreAOA

* update exploreAOA

* fix error

* fix error

* fix crs bounding box issue

* rm commented code

* update plot.aoa & exploreAOA

* fix error in trainLPD calculation

* fix MD calculation

* fix order in print.aoa & message in aoa()

* add predictors tif to CAST package

* add countryboundaries

* add elevation

* Change `maxLPD` parameter handling & enable `trainLPD` calculation with only training data provided (no model) (#7)

* add to maxLPD percantages

* update maxLPD parameter validation

* enable trainLPD calc with only trainDat (no model)

* minor change in maxLPD setting

* Add `LPDtoErrormetric` functionality (#8)

* add LPDtoErrormetric and adjust plot functions

* small change

* minor changes on docs and comments

* major docs update

* update DItoErrormetric and LPDtoErrormetric

* New calculation methods for LPD of training data and LPD of prediction data, add DI_LPDtoErrormetric  (#9)

* update trainLPD implementation in trainDI

* add DI_LPDtoErrormetric

* update docs

* update `toErrormetric` functions

* update `...toErrormetric` functions

* update CAST docs

* change legend position in exploreAOA

* update aoa and .knndist - enhance performance of LPD calculation

* update trainDI - add progress bars and messages

* update DI_LPDtoErrormetric & LPDtoErrormetric to enable multiCV

* Feat train di new (#11)

* Dev (#6)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* update explore AOA docs

* shift package to description

* update exploreAOA docs

* update exploreAOA docs and add xmark

* update aoa, trainDI and exploreAOA docs

* update aoa docs

* change order of print.aoa

* update aoa.Rd

* update DESCRIPTION

* update aoa & trainDI

* add trainDat upload options

* raster to terra and new layout (#5)

* update plot function

* update exploreAOA

* update exploreAOA

* fix error

* fix error

* fix crs bounding box issue

* rm commented code

* update plot.aoa & exploreAOA

* fix error in trainLPD calculation

* fix MD calculation

* fix order in print.aoa & message in aoa()

* add predictors tif to CAST package

* add countryboundaries

* add elevation

* update trainLPD implementation in trainDI

* add DI_LPDtoErrormetric

* update docs

* update `toErrormetric` functions

* update `...toErrormetric` functions

* update CAST docs

* change legend position in exploreAOA

* update aoa and .knndist - enhance performance of LPD calculation

* update trainDI - add progress bars and messages

* update DI_LPDtoErrormetric & LPDtoErrormetric to enable multiCV

* fix error in LPDtoErrormetric

* Dev (#13)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* update explore AOA docs

* shift package to description

* update exploreAOA docs

* update exploreAOA docs and add xmark

* update aoa, trainDI and exploreAOA docs

* update aoa docs

* change order of print.aoa

* update aoa.Rd

* update DESCRIPTION

* update aoa & trainDI

* add trainDat upload options

* raster to terra and new layout (#5)

* update plot function

* update exploreAOA

* update exploreAOA

* fix error

* fix error

* fix crs bounding box issue

* rm commented code

* update plot.aoa & exploreAOA

* fix error in trainLPD calculation

* fix MD calculation

* fix order in print.aoa & message in aoa()

* add predictors tif to CAST package

* add countryboundaries

* add elevation

* Change `maxLPD` parameter handling & enable `trainLPD` calculation with only training data provided (no model) (#7)

* add to maxLPD percantages

* update maxLPD parameter validation

* enable trainLPD calc with only trainDat (no model)

* minor change in maxLPD setting

* Add `LPDtoErrormetric` functionality (#8)

* add LPDtoErrormetric and adjust plot functions

* small change

* minor changes on docs and comments

* major docs update

* update DItoErrormetric and LPDtoErrormetric

* New calculation methods for LPD of training data and LPD of prediction data, add DI_LPDtoErrormetric  (#9)

* update trainLPD implementation in trainDI

* add DI_LPDtoErrormetric

* update docs

* update `toErrormetric` functions

* update `...toErrormetric` functions

* update CAST docs

* change legend position in exploreAOA

* update aoa and .knndist - enhance performance of LPD calculation

* update trainDI - add progress bars and messages

* update DI_LPDtoErrormetric & LPDtoErrormetric to enable multiCV

* Feat train di new (#11)

* Dev (#6)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* update explore AOA docs

* shift package to description

* update exploreAOA docs

* update exploreAOA docs and add xmark

* update aoa, trainDI and exploreAOA docs

* update aoa docs

* change order of print.aoa

* update aoa.Rd

* update DESCRIPTION

* update aoa & trainDI

* add trainDat upload options

* raster to terra and new layout (#5)

* update plot function

* update exploreAOA

* update exploreAOA

* fix error

* fix error

* fix crs bounding box issue

* rm commented code

* update plot.aoa & exploreAOA

* fix error in trainLPD calculation

* fix MD calculation

* fix order in print.aoa & message in aoa()

* add predictors tif to CAST package

* add countryboundaries

* add elevation

* update trainLPD implementation in trainDI

* add DI_LPDtoErrormetric

* update docs

* update `toErrormetric` functions

* update `...toErrormetric` functions

* update CAST docs

* change legend position in exploreAOA

* update aoa and .knndist - enhance performance of LPD calculation

* update trainDI - add progress bars and messages

* update DI_LPDtoErrormetric & LPDtoErrormetric to enable multiCV

* fix error in LPDtoErrormetric

* masking order

* adapt default degrees of freedom

* add exp and scam exp errormodels

* update docs

* update docs

* Dev (#14)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* update explore AOA docs

* shift package to description

* update exploreAOA docs

* update exploreAOA docs and add xmark

* update aoa, trainDI and exploreAOA docs

* update aoa docs

* change order of print.aoa

* update aoa.Rd

* update DESCRIPTION

* update aoa & trainDI

* add trainDat upload options

* raster to terra and new layout (#5)

* update plot function

* update exploreAOA

* update exploreAOA

* fix error

* fix error

* fix crs bounding box issue

* rm commented code

* update plot.aoa & exploreAOA

* fix error in trainLPD calculation

* fix MD calculation

* fix order in print.aoa & message in aoa()

* add predictors tif to CAST package

* add countryboundaries

* add elevation

* Change `maxLPD` parameter handling & enable `trainLPD` calculation with only training data provided (no model) (#7)

* add to maxLPD percantages

* update maxLPD parameter validation

* enable trainLPD calc with only trainDat (no model)

* minor change in maxLPD setting

* Add `LPDtoErrormetric` functionality (#8)

* add LPDtoErrormetric and adjust plot functions

* small change

* minor changes on docs and comments

* major docs update

* update DItoErrormetric and LPDtoErrormetric

* New calculation methods for LPD of training data and LPD of prediction data, add DI_LPDtoErrormetric  (#9)

* update trainLPD implementation in trainDI

* add DI_LPDtoErrormetric

* update docs

* update `toErrormetric` functions

* update `...toErrormetric` functions

* update CAST docs

* change legend position in exploreAOA

* update aoa and .knndist - enhance performance of LPD calculation

* update trainDI - add progress bars and messages

* update DI_LPDtoErrormetric & LPDtoErrormetric to enable multiCV

* Feat train di new (#11)

* Dev (#6)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* update explore AOA docs

* shift package to description

* update exploreAOA docs

* update exploreAOA docs and add xmark

* update aoa, trainDI and exploreAOA docs

* update aoa docs

* change order of print.aoa

* update aoa.Rd

* update DESCRIPTION

* update aoa & trainDI

* add trainDat upload options

* raster to terra and new layout (#5)

* update plot function

* update exploreAOA

* update exploreAOA

* fix error

* fix error

* fix crs bounding box issue

* rm commented code

* update plot.aoa & exploreAOA

* fix error in trainLPD calculation

* fix MD calculation

* fix order in print.aoa & message in aoa()

* add predictors tif to CAST package

* add countryboundaries

* add elevation

* update trainLPD implementation in trainDI

* add DI_LPDtoErrormetric

* update docs

* update `toErrormetric` functions

* update `...toErrormetric` functions

* update CAST docs

* change legend position in exploreAOA

* update aoa and .knndist - enhance performance of LPD calculation

* update trainDI - add progress bars and messages

* update DI_LPDtoErrormetric & LPDtoErrormetric to enable multiCV

* fix error in LPDtoErrormetric

* masking order

* adapt default degrees of freedom

* add exp and scam exp errormodels

* update docs

* update docs

* Dev (#15)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* update explore AOA docs

* shift package to description

* update exploreAOA docs

* update exploreAOA docs and add xmark

* update aoa, trainDI and exploreAOA docs

* update aoa docs

* change order of print.aoa

* update aoa.Rd

* update DESCRIPTION

* update aoa & trainDI

* add trainDat upload options

* raster to terra and new layout (#5)

* update plot function

* update exploreAOA

* update exploreAOA

* fix error

* fix error

* fix crs bounding box issue

* rm commented code

* update plot.aoa & exploreAOA

* fix error in trainLPD calculation

* fix MD calculation

* fix order in print.aoa & message in aoa()

* add predictors tif to CAST package

* add countryboundaries

* add elevation

* Change `maxLPD` parameter handling & enable `trainLPD` calculation with only training data provided (no model) (#7)

* add to maxLPD percantages

* update maxLPD parameter validation

* enable trainLPD calc with only trainDat (no model)

* minor change in maxLPD setting

* Add `LPDtoErrormetric` functionality (#8)

* add LPDtoErrormetric and adjust plot functions

* small change

* minor changes on docs and comments

* major docs update

* update DItoErrormetric and LPDtoErrormetric

* New calculation methods for LPD of training data and LPD of prediction data, add DI_LPDtoErrormetric  (#9)

* update trainLPD implementation in trainDI

* add DI_LPDtoErrormetric

* update docs

* update `toErrormetric` functions

* update `...toErrormetric` functions

* update CAST docs

* change legend position in exploreAOA

* update aoa and .knndist - enhance performance of LPD calculation

* update trainDI - add progress bars and messages

* update DI_LPDtoErrormetric & LPDtoErrormetric to enable multiCV

* Feat train di new (#11)

* Dev (#6)

* update plot and print

* add exploreAOA to package

* add message for trainLPD calculation

* update explore AOA docs

* shift package to description

* update exploreAOA docs

* update exploreAOA docs and add xmark

* update aoa, trainDI and exploreAOA docs

* update aoa docs

* change order of print.aoa

* update aoa.Rd

* update DESCRIPTION

* update aoa & trainDI

* add trainDat upload options

* raster to terra and new layout (#5)

* update plot function

* update exploreAOA

* update exploreAOA

* fix error

* fix error

* fix crs bounding box issue

* rm commented code

* update plot.aoa & exploreAOA

* fix error in trainLPD calculation

* fix MD calculation

* fix order in print.aoa & message in aoa()

* add predictors tif to CAST package

* add countryboundaries

* add elevation

* update trainLPD implementation in trainDI

* add DI_LPDtoErrormetric

* update docs

* update `toErrormetric` functions

* update `...toErrormetric` functions

* update CAST docs

* change legend position in exploreAOA

* update aoa and .knndist - enhance performance of LPD calculation

* update trainDI - add progress bars and messages

* update DI_LPDtoErrormetric & LPDtoErrormetric to enable multiCV

* fix error in LPDtoErrormetric

* masking order

* adapt default degrees of freedom

* add exp and scam exp errormodels

* update docs

* update docs
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