r-spatialecology/landscapemetrics

Difference to new FRAGSTATS version

Closed this issue · 7 comments

I rerun the results using the latest FRAGSTATS version and created a test (helper-fragstats.R, test-fragstats.R). Most metrics are identical or within a certain threshold due to numerical differences (less than 5%). However, especially DCORE is really off and I don't know why yet. Especially since most other core metrics seem to be okay.

Also, there are a few differences of the CV or SD values on class level (more than 5% less than 10%) that I am not sure why.

Related to 28ca236

There are a few metrics which have some deviations from FRAGSTATS which can not be explained by numeric differences. Mostly, they seem to be related to the core area and and the augusta landscape. But also other issues seem to be present.

Currently the test are commented out.

Patch level

  • gyrate
  • ncore
  • shape

Class level

  • dcad
  • ndca
  • tca

landscape

  • nda
  • tca
  • dcad

Also, kind of related. Given we already test metrics on patch level, I don't compare the distribution of them on class and landscape level. If the patch-scale is identical, also mean, sd, and cv must be.

Fixed vignette 7b68e22

I have a suspicion about all metrics related to the core. We define core as cells using "[...] has no neighbour with a different value than itself (rook's case) [...]". I think FRAGSTATS uses a distance definition where it seems core cells are all cells (or their center coordinate) further away from the edge than a certain threshold.

Edit: Yes, found it in the FRAGSTATS manual. They are using a distance-mask placed on the perimeter (Second paragraph)

@mhesselbarth see:

library(terra)
#> terra 1.7.46
landscape = terra::rast(landscapemetrics::landscape)
plot(landscape)

plot(t(flip(landscape, "horizontal")))

Created on 2023-09-27 with reprex v2.0.2

Thanks, but I start to doubt we can match the exact FRAGSTATS labelling. They are actually going zick-zack I think. Additionally, they are going by patch first and class second, where we go by class first and patch second...

All tests run with a correlation of p>= 0.975 on patch level and deviations of less than 5% on class and landscape level