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
metadata
property returns a reference to the metadata - 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:
|
metadata
|
Metadata
TYPE:
|
copy
|
If True, the channels and metadata 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 |
metadata
property
writable
RETURNS | DESCRIPTION |
---|---|
dict[str, object]
|
Metadata |
is_copied
property
RETURNS | DESCRIPTION |
---|---|
bool
|
If True, the channels and metadata are copied during initialization |
area
property
RETURNS | DESCRIPTION |
---|---|
int
|
Area in square meters |
batch_size
property
RETURNS | DESCRIPTION |
---|---|
int
|
Batch size |
channel_names
property
RETURNS | DESCRIPTION |
---|---|
ChannelNameSet
|
Channel names |
grid
property
RETURNS | DESCRIPTION |
---|---|
Grid
|
Grid |
from_composite_raster
classmethod
Creates tiles from composite raster data.
PARAMETER | DESCRIPTION |
---|---|
data
|
Data
TYPE:
|
channel_names
|
Channel name or channel names (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:
|
metadata
|
Metadata
TYPE:
|
copy
|
If True, the channels and metadata 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.
PARAMETER | DESCRIPTION |
---|---|
channel_name
|
Channel name
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
bool
|
True if the channel is in the tiles, False otherwise |
__getattr__
Returns the channel.
PARAMETER | DESCRIPTION |
---|---|
channel_name
|
Channel name
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Channel
|
Channel |
__getitem__
Returns the channel.
PARAMETER | DESCRIPTION |
---|---|
channel_name
|
Channel name
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Channel
|
Channel |
remove
Removes the channels.
PARAMETER | DESCRIPTION |
---|---|
channel_names
|
Channel name, channel names, 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.
PARAMETER | DESCRIPTION |
---|---|
channel_names
|
Channel name, channel names, 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.
PARAMETER | DESCRIPTION |
---|---|
channel_names
|
Channel name, channel names, 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.
PARAMETER | DESCRIPTION |
---|---|
channel_names
|
Channel name or channel names
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
npt.NDArray
|
Composite raster data |