BioVeL ESW STACK - ENM Statistical Workflow with raster stack computation

Created: 2013-10-13 12:27:09      Last updated: 2016-06-22 14:45:58

The ENM Statistical Stack Workflow (ESW STACK) allows the computation of the extent, intensity and a cummulated potential species distribution through computation of an average sum layer from the input raster layers using the R statistical environment (R Core Team 2013). The sum layer is computed from all input files. e.g from different distribution of species as a mean value from each corresponding raster cell values, coming from the Ecological Niche Modelling (ENM) Workflow (

The average sum layer computed from each corresponding raster cell values is stored together with all input layers in a multilayer stack file, regardless of the input files’ geographical extent and origin. If the files have a different geographical extent and/or origin, the raster-diff workflow automatically crop them to the same extent and resample the values using the “nearest neighbour” method, resulting in a perfect cell match between the two rasters. The resulting values in the average sum file depends of the value range of the input files and will be normalized to their value range.

The values of the input layers and the average sum layer are classified into six positive classes. The predicted differences are presented for each species as a heat map, where cells with colors from green to red indicate an increase and from green to blue a decrease of predicted potential for a species. The workflow enables the computation of overall coverage, overall intensity and the difference in intensity or coverage between two raster layers. Overall coverage is computed as the percentage of raster cells with values >0, and overall intensity is computed as the sum of all valued cells divided by the number of raster cells. Summary statistics for the raster layers are also provided: number of raster cells, mean intensity, median, CV, SD, Min value, Max value and number of cells outside the mask.

The workflow contains the computation methods:

- Computation of the average sum layer:

sum_layer = sum(layerstack, na.rm=FALSE) average_sum_layer = (sum_layer /(nlayers(layerstack)*maxValue)) * maxValue.

- Computation of the overall coverage and intensity overall_coverage = ((ncell(x)-cellStats(x, 'countNA')-count(x,0))/(ncell(x)-cellStats(x, 'countNA')))*100 overall_intensity = cellStats(x, sum)/(ncell(x)-cellStats(x, 'countNA'))

- Computation of the covariance matrix:

The covariance (the measure of how much two random variables change together)matrix will be computed using standard functions in R: layerStats(layerstack,"cov",na.rm=TRUE) with excusion of noData values.

- Used standard R functions:

cellStats: layerStats:

This workflow create a multilayer stack file as output and create PNG thumbnais and PNG overwiews from the input files and the average sum layer. A second multilayer stack can display different pointsets relatet to each PNG

The PNG overview will be created with these values (corresponding to the Geoserver style) ERDASImagine file:

breakpoints = c(0,1,25,50,75,100) GeoTIFF file breakpoints = c(0,2,63,127,190,254) colors = c(rgb(1.0,1.0,1.0), rgb(0.996,0.898,0.851), rgb(0.988,0.682,0.569), rgb(0.984,0.416,0.290), rgb(0.871,0.176,0.149), rgb(0.647,0.059,0.082))

Expected as input files are those raster images as a URL reference e.g. output files from openModeller created by an ENM workflow. *A file upload into the workflow is not possible, only a reference to the input file as URL*

Supported formats are:

- ERDASImagine (.img) files with a value range 0 - 100, noData value 101 - GeoTIFF (.tif) files with a value range 0- 254, noData Value 255

Input files with a different extent will be intersected to a common extent and resampled to each other using the "nearest neighbor" sampling method.

For working with the ESW in a own localhost an R instance should by installed on a own machine ( For the computation the followed extensions must be installed: rgdal, raster and rserve. Rserve must be started before the computation.


This workflow has been created by the Biodiversity Virtual e-Laboratory (BioVeL project. BioVeL is funded by the EU’s Seventh Framework Program, grant no. 283359.

Information Preview

Information Run

Run this Workflow in the Taverna Workbench...

Option 1:

Copy and paste this link into File > 'Open workflow location...'
[ More InfoExpand ]

Information Workflow Components

Information Authors (1)
Information Titles (1)
Information Descriptions (1)
Information Dependencies (0)
Inputs (4)
Processors (2)
Beanshells (1)
Outputs (6)
Datalinks (11)
Coordinations (0)

Information Workflow Type

Taverna 2

Information Uploader

Information License

All versions of this Workflow are licensed under:

Information Version 5 (latest) (of 5)

View version:

Information Credits (1)


Information Attributions (0)



Information Tags (11)

Log in to add Tags

Information Shared with Groups (2)

Information Featured In Packs (0)


Log in to add to one of your Packs

Information Attributed By (0)



Information Favourited By (0)

No one

Information Statistics


Citations (0)


Version History

In chronological order:

Reviews Reviews (0)

No reviews yet

Be the first to review!

Comments Comments (0)

No comments yet

Log in to make a comment

Workflow Other workflows that use similar services (0)

There are no workflows in myExperiment that use similar services to this Workflow.