VectorChannel
Bases: Channel
, Iterable[gpd.GeoDataFrame]
Channel that contains batched vector data
Notes
- The data items are assumed to be normalized to the spatial extent [0, 1] in x and y direction without a coordinate reference system
- The
data
property 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:
|
time_step
|
Time step
TYPE:
|
copy
|
If True, the data is 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 |
time_step
property
writable
RETURNS | DESCRIPTION |
---|---|
TimeStep | None
|
Time step |
is_copied
property
RETURNS | DESCRIPTION |
---|---|
bool
|
If True, the data is 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 |
key
property
RETURNS | DESCRIPTION |
---|---|
ChannelKey
|
Name and time step combination |
data
property
RETURNS | DESCRIPTION |
---|---|
list[gpd.GeoDataFrame]
|
Data |
__len__
Computes the batch size.
RETURNS | DESCRIPTION |
---|---|
int
|
Batch size |
from_channels
classmethod
Creates a vector channel from vector channels.
PARAMETER | DESCRIPTION |
---|---|
channels
|
Vector channels
TYPE:
|
copy
|
If True, the data is copied during initialization
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
VectorChannel
|
Vector channel |
from_unnormalized_data
classmethod
Creates a vector channel from unnormalized data.
PARAMETER | DESCRIPTION |
---|---|
data
|
Data
TYPE:
|
name
|
Name
TYPE:
|
coordinates
|
Coordinates (x_min, y_min) of the tile or of each tile in meters
TYPE:
|
tile_size
|
Tile size in meters
TYPE:
|
buffer_size
|
Buffer size in meters
TYPE:
|
time_step
|
Time step
TYPE:
|
copy
|
If True, the data is copied during initialization
TYPE:
|
__eq__
Compares the vector channels.
PARAMETER | DESCRIPTION |
---|---|
other
|
Other vector channel
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
bool
|
True if the vector channels are equal, False otherwise |
__getitem__
Returns the data item.
PARAMETER | DESCRIPTION |
---|---|
index
|
Index or slice of the data item
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
gpd.GeoDataFrame | list[gpd.GeoDataFrame]
|
Data item or sliced data |
__iter__
Iterates over the data.
YIELDS | DESCRIPTION |
---|---|
gpd.GeoDataFrame
|
Data item |
__add__
Adds the vector channels.
PARAMETER | DESCRIPTION |
---|---|
other
|
Other vector channel
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
VectorChannel
|
Vector channel |
append
Appends the data.
PARAMETER | DESCRIPTION |
---|---|
data
|
Data
TYPE:
|
inplace
|
If True, the data is appended inplace
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
VectorChannel
|
Vector channel |
copy
Copies the vector channel.
RETURNS | DESCRIPTION |
---|---|
VectorChannel
|
Vector channel |
remove_buffer
Removes the buffer.
PARAMETER | DESCRIPTION |
---|---|
inplace
|
If True, the buffer is removed inplace
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
VectorChannel
|
Vector channel |
to_denormalized_data
Converts the data to denormalized data.
PARAMETER | DESCRIPTION |
---|---|
coordinates
|
Coordinates (x_min, y_min) of each tile in meters
TYPE:
|
tile_size
|
Tile size in meters
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[gpd.GeoDataFrame]
|
Data |