r-spatialecology / landscapemetrics

Landscape Metrics for Categorical Map Patterns 🗺️ in R
https://r-spatialecology.github.io/landscapemetrics
GNU General Public License v3.0
230 stars 43 forks source link

IIASA 2023 work #302

Closed Nowosad closed 1 year ago

Nowosad commented 1 year ago

Improvements (see https://github.com/Nowosad/lsm2023improvements):

Bug fixes:

Questions to answer:

Misc:

kadyb commented 1 year ago

test if as.int() gives any speed improvements

The object is R matrix/array or SpatRaster? If SpatRaster, then the object is held in memory as float.

Nowosad commented 1 year ago

@kadyb yep -- we have a SpatRaster, but then we convert it into a matrix (as.matrix(x, wide = TRUE)). The resulting matrix is either double (when as.int is not used previously) or integer (when as.int is applied beforehand).

mhesselbarth commented 1 year ago

I think once your merged the PR with the common calculates, we can also close this issue again?

Nowosad commented 1 year ago

Yep -- I plan to work on the remaining points during the next week and then I will undraft the PR.

Nowosad commented 1 year ago

See https://jakubnowosad.com/lsm2023improvements/

Nowosad commented 1 year ago

@mhesselbarth My 2.1 changes are ready for your review and merge -- see https://github.com/r-spatialecology/landscapemetrics/pull/308

mhesselbarth commented 1 year ago

PR is merged to main and commoncalcs deleted. Will update the CRAN version soon.