diff --git a/SimpleSDMLayers/previews/PR345/.documenter-siteinfo.json b/SimpleSDMLayers/previews/PR345/.documenter-siteinfo.json index d338544ef..b296e7d3d 100644 --- a/SimpleSDMLayers/previews/PR345/.documenter-siteinfo.json +++ b/SimpleSDMLayers/previews/PR345/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2024-12-24T13:28:51","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.2","generation_timestamp":"2024-12-25T17:30:02","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/SimpleSDMLayers/previews/PR345/index.html b/SimpleSDMLayers/previews/PR345/index.html index 60dbcb52c..49296d3ce 100644 --- a/SimpleSDMLayers/previews/PR345/index.html +++ b/SimpleSDMLayers/previews/PR345/index.html @@ -1,2 +1,2 @@ -SimpleSDMLayers · SimpleSDMLayers

SimpleSDMLayers

SimpleSDMLayers._read_geotiffMethod
geotiff(file; bandnumber::Integer=1, left=nothing, right=nothing, bottom=nothing, top=nothing, driver)

The geotiff function reads a geotiff file, and returns it as a matrix of the correct type. The optional arguments left, right, bottom, and left are defining the bounding box to read from the file. This is particularly useful if you want to get a small subset from large files.

source
SimpleSDMLayers._write_geotiffMethod
geotiff(file::AbstractString, layers::Vector{SDMLayer{T}}; nodata::T=convert(T, -9999)) where {T <: Number}

Stores a series of layers in a file, where every layer in a band. See geotiff for other options.

source
SimpleSDMLayers.interpolateMethod
interpolate(layer::SDMLayer, destination::SDMLayer)

Interpolates a layer target so that it uses the same grid, crs, etc as destination.

source
SimpleSDMLayers.interpolateMethod
interpolate(layer::SDMLayer; dest="+proj=natearth2", newsize=nothing)

Returns an interpolated version of the later under the new destination CRS (natearth2 by default), and with optionally a new size of newsize.

source
SimpleSDMLayers.mask!Method
mask!(layer::SDMLayer, template::SDMLayer)

Updates the positions in the first layer to be those that have a value in the second layer.

source
SimpleSDMLayers.maskMethod
mask(layer::SDMLayer, template::SDMLayer)

Returns a copy of the first layer masked according to the second layer. See also mask!.

source
SimpleSDMLayers.mosaicMethod
mosaic(f, stack::Vector{<:SDMLayer})

Returns a layer that is the application of f to the values at each cell in the array of layers given as the second argument.

source
SimpleSDMLayers.nodata!Method
nodata!(layer::SDMLayer{T}, nodata::T) where {T}

Changes the value of the layer representing no data. This modifies the layer passed as its first argument.

source
SimpleSDMLayers.SDMLayerType
SDMLayer{T}

Defines a layer of geospatial information.

The type has two data fields:

  • grid: a Matrix of type T
  • indices: a BitMatrix to see which positions are valued

Each row in the grid field represents a slice of the raster of equal northing, i.e. the information is laid out in the matrix as it would be represented on a map once displayed. Similarly, columns have the same easting.

The geospatial information is represented by three positional fields:

  • x and y: two tuples, indicating the coordinates of the corners alongside the x and y dimensions (e.g. easting/northing) - the default values are (-180., 180.) and (-90., 90.), which represents the entire surface of the globe in WGS84
  • crs: any String representation of the CRS which can be handled by Proj.jl - the default is "+proj=longlat +datum=WGS84 +no_defs", which represents a latitude/longitude coordinate system
source
+SimpleSDMLayers · SimpleSDMLayers

SimpleSDMLayers

SimpleSDMLayers._read_geotiffMethod
geotiff(file; bandnumber::Integer=1, left=nothing, right=nothing, bottom=nothing, top=nothing, driver)

The geotiff function reads a geotiff file, and returns it as a matrix of the correct type. The optional arguments left, right, bottom, and left are defining the bounding box to read from the file. This is particularly useful if you want to get a small subset from large files.

source
SimpleSDMLayers._write_geotiffMethod
geotiff(file::AbstractString, layers::Vector{SDMLayer{T}}; nodata::T=convert(T, -9999)) where {T <: Number}

Stores a series of layers in a file, where every layer in a band. See geotiff for other options.

source
SimpleSDMLayers.interpolateMethod
interpolate(layer::SDMLayer, destination::SDMLayer)

Interpolates a layer target so that it uses the same grid, crs, etc as destination.

source
SimpleSDMLayers.interpolateMethod
interpolate(layer::SDMLayer; dest="+proj=natearth2", newsize=nothing)

Returns an interpolated version of the later under the new destination CRS (natearth2 by default), and with optionally a new size of newsize.

source
SimpleSDMLayers.mask!Method
mask!(layer::SDMLayer, template::SDMLayer)

Updates the positions in the first layer to be those that have a value in the second layer.

source
SimpleSDMLayers.maskMethod
mask(layer::SDMLayer, template::SDMLayer)

Returns a copy of the first layer masked according to the second layer. See also mask!.

source
SimpleSDMLayers.mosaicMethod
mosaic(f, stack::Vector{<:SDMLayer})

Returns a layer that is the application of f to the values at each cell in the array of layers given as the second argument.

source
SimpleSDMLayers.nodata!Method
nodata!(layer::SDMLayer{T}, nodata::T) where {T}

Changes the value of the layer representing no data. This modifies the layer passed as its first argument.

source
SimpleSDMLayers.SDMLayerType
SDMLayer{T}

Defines a layer of geospatial information.

The type has two data fields:

  • grid: a Matrix of type T
  • indices: a BitMatrix to see which positions are valued

Each row in the grid field represents a slice of the raster of equal northing, i.e. the information is laid out in the matrix as it would be represented on a map once displayed. Similarly, columns have the same easting.

The geospatial information is represented by three positional fields:

  • x and y: two tuples, indicating the coordinates of the corners alongside the x and y dimensions (e.g. easting/northing) - the default values are (-180., 180.) and (-90., 90.), which represents the entire surface of the globe in WGS84
  • crs: any String representation of the CRS which can be handled by Proj.jl - the default is "+proj=longlat +datum=WGS84 +no_defs", which represents a latitude/longitude coordinate system
source