Raster#

class rforge.library.containers.raster.Raster(scale: int, layers: Dict[str, Layer] | None = None)[source]#

Represents a collection of layers in a geospatial dataset.

_layers#

Dictionary mapping layer names to Layer instances.

Type:

Dict[str, Layer]

_scale#

The scale factor of the raster dataset.

Type:

int

__init__()[source]#

Initializes a Raster instance.

__str__()[source]#

Returns a string representation of the raster dataset.

layers()#

Getter for the layers dictionary.

count()#

Computes the number of layers in the dataset.

scale()#

Getter for the scale factor.

import_layers()[source]#

Imports layers from a raster file.

add_layer()[source]#

Adds a layer to the raster dataset.

remove_layer()[source]#

Removes a layer from the raster dataset.

edit_layer()[source]#

Renames a layer in the raster dataset.

add_layer(layer: Layer, name: str)[source]#
property count: int#
edit_layer(current_name: str, new_name: str)[source]#
import_layers(path: str, config: list[Dict[str, str | int]] | None = None)[source]#
property layers: Dict[str, Layer]#
remove_layer(name: str)[source]#
property scale: int#