create benthic heterogeneity layer
Closed this issue · 7 comments
@bbest is it possible to add the benthic heterogeneity layer to the data folder? let me know if I can help!
Hi @mvisalli,
They should be in there as s_phys_scapes
:
- s_phys_scapes • bbnj
Raster stack for area (km2) of 1 thru 11 classes of benthic seascapes (Harris & Whiteway, 2009)
Ah, now I'm remembering the missing "heterogeneity" layer. We can use
raster::focal() function to accomplish this.
Almost there...
r_scapes <- raster(scapes_tif)
# 20-cell radius should be 41 cells in width & height
r <- raster(ncols=101, nrows=101, xmn=0)
fw <- focalWeight(r, 36, type='circle')
dim(fw)
# 41 41
image(fw, asp=1, axes=F)
plot(r_scapes)
r_focal <- focal(
r_scapes, w = fw,
fun = function(x, ...){length(unique(na.omit(x)))}, na.rm=T)
plot(r_focal)
Background on Focal Variety
- How Focal Statistics works—Help | ArcGIS for Desktop
- Focal Statistics—Help | ArcGIS for Desktop
- Raster operations in R | Intro to GIS and Spatial Analysis
- RPubs - Raster operations 1
Harris & Whiteway (2009)
5.3. High seas MPAs
How can the maps of seabed geomorphology and seascapes be used to identify optimal sites for high seas MPAs (HSMPA)? In order to answer this question we conducted a focal-variety analysis in ArcInfo (ESRI Inc.; 42) that identifies areas where the most geomorphic diversity occurs, and where the most seascape diversity occurs. The focal-variety tool ‘‘determines the number of unique values (or the variety) for each cell location on an input raster within a specified neighborhood and sends it to the corre- sponding cell location on the output raster.’’ (ArcGIS Desktop Help, ESRI; [41,42].). The user determines the neighborhood that will be investigated for each cell. The neighborhood is defined by shape (circle or rectangle) and by distance from centroid, or number of cells. For each cell the focal-variety program will calculate how many different values are in the surrounding specified neighbor- hood and give the cell the value representing the number of different values it finds.
The focal-variety analysis was carried out separately for the geomorphic features map (Fig. 15A) and for the seascapes map (Fig. 15B) using a 20-cell radius (i.e. w220 km). This length scale will account for some of the uncertainty involved in the classifi- cation of data points along class boundaries and is consistent with previous applications of the focal-variety function in seascapes analyses carried out elsewhere [41,42]. Interestingly, hotspots of heterogeneity are located in similar areas in both (geomorphology and seascape) maps, in Drake Passage, between New Zealand and Antarctica, in the northern-central Indian Ocean and in the northwestern Atlantic. The sum of focal-variety results for seascapes and geomorphic features (Fig. 15C) provides a synthesis of the two separate analyses.
We assume that seascapes and geomorphic units can be treated as separate bioregions, each supporting different groups of benthic communities. This has direct applications in designing and cross- validating the HSMPA, which has a goal of conserving marine biodiversity within each bioregion [5]. The hotspots of habitat heterogeneity (Fig. 15C) immediately suggest themselves within bioregions as candidates for MPAs, where conserving the maximum habitat heterogeneity (1⁄4biodiversity?) can be achieved in the smallest possible area. They are also areas where targeted marine surveys could be optimised to investigate whether the apparent diversity of habitats equates with regionally increased levels of biodiversity. In areas of low habitat heterogeneity, conservation efforts can most reliably target specific geomorphic features and seascapes.It is important to emphasise that the seascapes approach is not a replacement for direct sampling and mapping of biodiversity. Areas suggested as biodiversity hotspots based on habitat hetero- geneity (Fig. 15C) need to be validated by field surveys. Seascapes and other physical surrogates for biodiversity are a useful, complementary means of identifying locations where biodiversity conservation can be optimised within MPAs to augment existing biological information and to fill in the gaps where biological data sources provide little or no coverage.
Hi @mvisalli,
You should now be able to use:
# gcs 0.5 d
r_phys_scapes_hetero
# or
get_d_prjres("r_phys_scapes_hetero", "")
# mollweide 50km
get_d_prjres("r_phys_scapes_hetero", "_mol50km")
Running scenario with benthic heterogeneity layer did not work for me.
Adding this line:
https://github.com/ecoquants/bbnj/blob/d615335fed9c5abe0cf059068f143fda67de5952/inst/app/www/scenarios/s00c.bio.30pct.gl.scapehetero.mol50km.Rmd#L78
Returned error:
Error in get_d_prjres("r_phys_scapes_hetero", prjres) :
Missing path: /Users/morgan/github/bbnj/inst/data/phys_scapes_hetero_mol50km.tif
Calls: ... eval -> eval -> stack -> stack -> .local -> get_d_prjres
Execution halted
Will keep exploring!