Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

core.raster.add_layer (procNode)

Add a named layer to a raster, every cell zero; a layer already there is left as it is.

Built from g.has over the raster's layers and a point-class column write.

Inputs

  • raster (Raster). The raster extended.
  • name (String). Default "". The layer's name.

Outputs

  • raster: the raster with the layer.

Example

local raster = g.core.raster.new({ size = { x = 8, z = 8 }, resolution = 1, layers = { "height" } })
local wet = g.core.raster.add_layer({ raster = raster, name = "water" })

wet.layers holds a water column beside height.