Skip to content

resample() vs. aggregate() in function create_species_priority_regions #6

@Turdus

Description

@Turdus

Is there a special reason, why we use resample() instead of aggregate() to change the resolution of the resulting raster?

resample() uses bilinear interpolation, which is in my opinion not totally appropriate here. aggregate() offers the possibility to use different functions to calculate the new cell values.

The resulting rasters do not only differ in cell values but also in the number of assigned cells (NA vs. values; visible discrepancy for 7 km resolution).

L. 133 of /R/site_suitability.R:
species_priority <- resample(species_priority, raster(ext=extent(species_priority), resolution=resolution))
why not
species_priority <- aggregate(species_priority, fact=7, fun=mean)?

I produced two example plots (Picea abies).
aggregate:
species_priority_aggregate
resample:
species_priority_resample

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions