Tiles
Bases: Iterable[Channel]
The tiles specify the channels and their spatial extent.
Notes
- The type alias
Tile
can be used for semantic consistency if it specifies a single tile instead of a batch of tiles - The
channels
property returns a reference to the channels - The dunder methods
__getattr__
,__getitem__
, and__iter__
return or yield a reference to a channel
PARAMETER | DESCRIPTION |
---|---|
channels
|
Channels
TYPE:
|
coordinates
|
Coordinates (x_min, y_min) of the tile or of each tile in meters
TYPE:
|
tile_size
|
Tile size in meters
TYPE:
|
copy
|
If True, the channels are copied during initialization
TYPE:
|
channels
property
RETURNS | DESCRIPTION |
---|---|
list[Channel]
|
Channels |
coordinates
property
RETURNS | DESCRIPTION |
---|---|
CoordinatesSet
|
Coordinates (x_min, y_min) of each tile in meters |
tile_size
property
RETURNS | DESCRIPTION |
---|---|
TileSize
|
Tile size in meters |
is_copied
property
RETURNS | DESCRIPTION |
---|---|
bool
|
If True, the channels are copied during initialization |
area
property
RETURNS | DESCRIPTION |
---|---|
int
|
Area in square meters |
batch_size
property
RETURNS | DESCRIPTION |
---|---|
int
|
Batch size |
channel_keys
property
RETURNS | DESCRIPTION |
---|---|
ChannelKeySet
|
Channel name and time step combinations |
channel_names
property
RETURNS | DESCRIPTION |
---|---|
ChannelNameSet
|
Channel names |
grid
property
RETURNS | DESCRIPTION |
---|---|
Grid
|
Grid |
from_composite_raster
classmethod
Creates tiles from composite raster data.
Notes
- Accessing a channel by its name assumes the time step is None
PARAMETER | DESCRIPTION |
---|---|
data
|
Data
TYPE:
|
channel_keys
|
Channel name, channel name and time step combination, channel names, or channel name and time step combinations (if None, the channel is ignored)
TYPE:
|
coordinates
|
Coordinates (x_min, y_min) of the tile in meters
TYPE:
|
tile_size
|
Tile size in meters
TYPE:
|
buffer_size
|
Buffer size in meters
TYPE:
|
copy
|
If True, the channels are copied during initialization
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Tiles
|
Tiles |
__eq__
Compares the tiles.
PARAMETER | DESCRIPTION |
---|---|
other
|
Other tiles
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
bool
|
True if the tiles are equal, False otherwise |
__len__
Computes the number of channels.
RETURNS | DESCRIPTION |
---|---|
int
|
Number of channels |
__bool__
Checks if the tiles contain channels.
RETURNS | DESCRIPTION |
---|---|
bool
|
True if the tiles contain channels, False otherwise |
__contains__
Checks if the channel is in the tiles.
Notes
- Accessing a channel by its name assumes the time step is None
PARAMETER | DESCRIPTION |
---|---|
channel_key
|
Channel name or channel name and time step combination
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
bool
|
True if the channel is in the tiles, False otherwise |
__getattr__
Returns the channel.
Notes
- Accessing a channel by its name assumes the time step is None
PARAMETER | DESCRIPTION |
---|---|
channel_name
|
Channel name
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Channel
|
Channel |
__getitem__
Returns the channel.
Notes
- Accessing a channel by its name assumes the time step is None
PARAMETER | DESCRIPTION |
---|---|
channel_key
|
Channel name or channel name and time step combination
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Channel
|
Channel |
remove
Removes the channels.
Notes
- Removing a channel by its name assumes the time step is None
PARAMETER | DESCRIPTION |
---|---|
channel_keys
|
Channel name, channel name and time step combination, channel names, channel name and time step combinations, no channels (False or None), or all channels (True)
TYPE:
|
inplace
|
If True, the channels are removed inplace
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Tiles
|
Tiles |
remove_buffer
Removes the buffer.
Notes
- Removing the buffer of a channel by its name assumes the time step is None
PARAMETER | DESCRIPTION |
---|---|
channel_keys
|
Channel name, channel name and time step combination, channel names, channel name and time step combinations, no channels (False or None), or all channels (True)
TYPE:
|
inplace
|
If True, the buffer is removed inplace
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Tiles
|
Tiles |
select
Selects the channels.
Notes
- Selecting a channel by its name assumes the time step is None
PARAMETER | DESCRIPTION |
---|---|
channel_keys
|
Channel name, channel name and time step combination, channel names, channel name and time step combinations, no channels (False or None), or all channels (True)
TYPE:
|
inplace
|
If True, the channels are selected inplace
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Tiles
|
Tiles |
to_composite_raster
Converts the tiles to composite raster data.
Notes
- Accessing a channel by its name assumes the time step is None
PARAMETER | DESCRIPTION |
---|---|
channel_keys
|
Channel name, channel name and time step combination, channel names, or channel name and time step combinations
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
npt.NDArray
|
Composite raster data |