RasterChannel
Bases: Channel, Iterable[npt.NDArray]
Channel that contains batched raster data
Notes
- The data items are assumed to be in shape (n, n), where n is the spatial extent in x and y direction
- The
dataproperty returns a reference to the data - The dunder methods
__getitem__and__iter__return or yield a reference to a data item
| PARAMETER | DESCRIPTION |
|---|---|
data
|
Data
TYPE:
|
name
|
Name
TYPE:
|
buffer_size
|
Buffer size as a fraction of the spatial extent of the data
TYPE:
|
metadata
|
Metadata
TYPE:
|
copy
|
If True, the data and metadata are copied during initialization
TYPE:
|
name
property
writable
| RETURNS | DESCRIPTION |
|---|---|
ChannelName | str
|
Name |
buffer_size
property
| RETURNS | DESCRIPTION |
|---|---|
FractionalBufferSize
|
Buffer size as a fraction of the spatial extent of the data |
metadata
property
writable
| RETURNS | DESCRIPTION |
|---|---|
dict[str, object]
|
Metadata |
is_copied
property
| RETURNS | DESCRIPTION |
|---|---|
bool
|
If True, the data and metadata are copied during initialization |
batch_size
property
| RETURNS | DESCRIPTION |
|---|---|
int
|
Batch size |
is_in_tiles
property
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the channel is inside tiles, False otherwise |
data
property
| RETURNS | DESCRIPTION |
|---|---|
list[npt.NDArray]
|
Data |
__len__
Computes the batch size.
| RETURNS | DESCRIPTION |
|---|---|
int
|
Batch size |
from_channels
classmethod
Creates a raster channel from raster channels.
| PARAMETER | DESCRIPTION |
|---|---|
channels
|
Raster channels
TYPE:
|
copy
|
If True, the data and metadata are copied during initialization
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
RasterChannel
|
Raster channel |
__eq__
Compares the raster channels.
| PARAMETER | DESCRIPTION |
|---|---|
other
|
Other raster channel
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the raster channels are equal, False otherwise |
__getitem__
Returns the data item.
| PARAMETER | DESCRIPTION |
|---|---|
index
|
Index or slice of the data item
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
npt.NDArray | list[npt.NDArray]
|
Data item or sliced data |
__iter__
Iterates over the data.
| YIELDS | DESCRIPTION |
|---|---|
npt.NDArray
|
Data item |
__add__
Adds the raster channels.
| PARAMETER | DESCRIPTION |
|---|---|
other
|
Other raster channel
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
RasterChannel
|
Raster channel |
append
Appends the data.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
Data
TYPE:
|
inplace
|
If True, the data is appended inplace
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
RasterChannel
|
Raster channel |
copy
Copies the raster channel.
| RETURNS | DESCRIPTION |
|---|---|
RasterChannel
|
Raster channel |
remove_buffer
Removes the buffer.
| PARAMETER | DESCRIPTION |
|---|---|
inplace
|
If True, the buffer is removed inplace
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
RasterChannel
|
Raster channel |