SpatialBoundaries.jl

Core functions

SpatialBoundaries.womblingFunction
wombling(x::Vector{T}, y::Vector{T}, z::Vector{T}) where {T<:Number}

Wrapper function that implements the triangulation wombling algorithm for points that are irregularly arranged in space.

source
wombling(x::Vector{T}, y::Vector{T}, z::Matrix{T}) where {T<:Number}

Wrapper function that implements the lattice wombling algorithm for points that are regularly arranged in space. Note that the matrix is presented in a way that is flipped, i.e. the x coordinates corresponds to the rows, and the y coordinates correspond to the columns. If you want to think of x and y as geographic coordinates, y are the longitudes, and x are the latitudes. Using the bindings for SimpleSDMLayers, this conversion will be performed automatically.

source
wombling(m::Matrix{T}) where {T<:Number}

Shortcut to womble a matrix (using lattice wombling) when no x and y positions are given - the cell size in each dimension is expected to be 1.

source
wombling(layer::T; convert_to::Type=Float64) where {T <: SimpleSDMLayer}

Performs a lattice wombling on a SimpleSDMLayer.

source
SpatialBoundaries.boundariesFunction
boundaries(W::Womble, t=0.1; ignorezero=false)

Extracts candidate boundaries using calculated wombling object W on specified threshold t. Default threshold is 0.1, meaning that the top 10% of pixels are selected as part of the boundaries. This function returns a list of indices identifying which simplices are part of the boundaries. The NaN values in the rates of change are not going to be a part of the boundaries. The keyword ignorezero, which defaults to false, can be used to remove the points with a rate of change of 0.

source

Types

SpatialBoundaries.LatticeWombleType
LatticeWomble{T <: Number} <: Womble

A set of data (and co-ordinates) that are regularly arranged in space are of type LatticeWomble after having been passed through wombling - the fields in this type are

  • m, a matrix of rate of change at each (x,y) co-ordinate
  • θ, a matrix of direction of change at each (x,y) co-ordinate
  • x and y, the coordinates of the center of each cell

Note that the type of x and y should be the same as the element type of m and θ, because these values are all used when calculating the rate of change and that x and y correspond to latitude and longitude respectively.

source
SpatialBoundaries.TriangulationWombleType
TriangulationWomble{T <: Number} <: Womble

A set of data (and co-ordinates) that are irregularly arranged in space are of type TriangulationWomble after having been passed through wombling - the fields in this type are

  • m, a vector of rate of change at each (x,y) co-ordinate
  • θ, a vector of direction of change at each (x,y) co-ordinate
  • x and y, the coordinates of the barycenter of each triangle in the plan

Note that the type of x and y should be the same as the element type of m and θ, because these values are all used when calculating the rate of change and that x and y correspond to latitude and longitude respectively.

source