gbl: Gliding box lacunarity estimation using all estimators

View source: R/gbl.R

gblR Documentation

Gliding box lacunarity estimation using all estimators


Estimates gliding box lacunarity (GBL) for square boxes using all estimators described in (Hingee et al., 2017). It calls the functions gblc, gblg, gblcc and gblemp.


  estimators = c("GBLcc.pickaH"),
  obswin = NULL,
  includenormed = FALSE,
  setcov_boundarythresh = 1e-06

  estimators = c("GBLg.mattfeldt", "GBLg.pickaint", "GBLg.pickaH", "GBLcc.mattfeldt",
    "GBLcc.pickaint", "GBLc"),
  phat = NULL,
  cvchat = NULL,
  cpp1 = NULL



An observation of a RACS of interest as a full binary map (as an im object) or as the foreground set (as an owin object). In the latter case the observation window, obswin, must be supplied.


A list of box widths


A vector of estimator names - see details for possible names. estimators = "all" will select all estimators.


If xi is an owin object then obswin is an owin object that specifies the observation window.


A logical value. If TRUE then GBL estimates normalised by the GBL values at zero will be included in a returned list of fv objects


To avoid instabilities caused by dividing by very small quantities, if the set covariance of the observation window is smaller than setcov_boundarythresh, then the covariance is given a value of NA. If NULL is supplied (default) then setcov_boundarythresh is set to 1E-6.


The fraction of foreground area in the observation window, which is the usual estimator of coverage probability given by coverageprob.


The plug-in moment covariance estimate (often from plugincvc).


Picka's estimate of coverage probability for subsets of the observation window. See cppicka.


As empirical GBL is one of the GBL estimators available through this function, non-square boxes are not allowed. To estimate GBL for non-square boxes use gblcc or gblg directly.

If xi is an owin object then obswin and xi are converted into an im object using

The estimators available are

  • "GBLc" The unmodified (unbalanced) covariance estimator provided by gblc

  • "GBLemp" Empirical gliding box lacunarity (Allain and Cloitre, 1991). Calls gblemp

  • "GBLg.mattfeldt" See help for gblg and paircorr

  • "GBLg.pickaint" See help for gblg and paircorr

  • "GBLg.pickaH" See help for gblg and paircorr

  • "GBLcc.mattfeldt" See help for gblcc

  • "GBLcc.pickaint" See help for gblcc

  • "GBLcc.pickaH" See help for gblcc

The default, GBLcc.pickaH, is a method based on centred covariance. Centred covariance approaches zero for large vectors, and are thus easier to integrate with the set covariance of the boxes.

The set covariance of the boxes is computed empirically using spatstat's setcov function, which converts B into a binary pixel mask using as.mask defaults. Computation speed can be increased by setting a small default number of pixels, npixel, in spatstat's global options (accessed through spatstat.options), however fewer pixels also decreases the accuracy of the GBL computation.


An fv object.


  • gbl: computes GBL estimates from a binary map.

  • gbl.cvchat: computes covariance-based estimator of GBL from the plug-in moment estimate of covariance, Picka's reduced window coverage probability estimates (see cppicka) and the usual coverage probability estimate, phat.


Allain, C. and Cloitre, M. (1991) Characterizing the lacunarity of random and deterministic fractal sets. Physical Review A, 44, 3552-3558.

Hingee K, Baddeley A, Caccetta P, Nair G (2019). Computation of lacunarity from covariance of spatial binary maps. Journal of Agricultural, Biological and Environmental Statistics, 24, 264-288. DOI: 10.1007/s13253-019-00351-9.


xi <-$coarse, value = TRUE,
            na.replace = FALSE)
boxwidths <- seq(1, 10, by = 0.5)

# reduce resolution in setcov() for faster (less accurate) computation 
oldopt <- spatstat.options()
spatstat.options("npixel" = 2^5)

gblests <- gbl(xi, boxwidths, estimators = "GBLcc.pickaH")

lacunaritycovariance documentation built on March 18, 2022, 5:20 p.m.