CoordinatesFilter
Bases: ABC
Abstract class for coordinates filters
Coordinates filters are callables that filter coordinates. The coordinates filter can be used to filter the coordinates of the bottom left corner of each tile. E.g., to remove tiles that don't intersect with an area of interest or tiles that are already processed.
Currently implemented coordinates filters
- CompositeFilter: Composes multiple coordinates filters
- DuplicatesFilter: Removes duplicates
- GeospatialFilter: Filters based on geospatial data
- MaskFilter: Filters based on a boolean mask
- SetFilter: Filters based on other coordinates
__call__
abstractmethod
Filters the coordinates.
PARAMETER | DESCRIPTION |
---|---|
coordinates |
coordinates (x_min, y_min) of each tile
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CoordinatesSet
|
filtered coordinates (x_min, y_min) of each tile |
CompositeFilter
Bases: CoordinatesFilter
Coordinates filter that composes multiple coordinates filters
PARAMETER | DESCRIPTION |
---|---|
coordinates_filters |
coordinates filters
TYPE:
|
__call__
Filters the coordinates with each coordinates filter.
PARAMETER | DESCRIPTION |
---|---|
coordinates |
coordinates (x_min, y_min) of each tile
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CoordinatesSet
|
filtered coordinates (x_min, y_min) of each tile |
DuplicatesFilter
Bases: CoordinatesFilter
Coordinates filter that removes duplicates
__call__
Filters the coordinates by removing duplicates.
PARAMETER | DESCRIPTION |
---|---|
coordinates |
coordinates (x_min, y_min) of each tile
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CoordinatesSet
|
filtered coordinates (x_min, y_min) of each tile |
GeospatialFilter
Bases: CoordinatesFilter
Coordinates filter that filters based on geospatial data
Available modes
DIFFERENCE
: Removes coordinates of tiles that are within the polygons in the geodataframeINTERSECTION
: Removes coordinates of tiles that don't intersect with the polygons in the geodataframe
PARAMETER | DESCRIPTION |
---|---|
tile_size |
tile size in meters
TYPE:
|
gdf |
geodataframe
TYPE:
|
mode |
geospatial filter mode (
TYPE:
|
__call__
Filters the coordinates based on the polygons in the geodataframe.
PARAMETER | DESCRIPTION |
---|---|
coordinates |
coordinates (x_min, y_min) of each tile
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CoordinatesSet
|
filtered coordinates (x_min, y_min) of each tile |
MaskFilter
Bases: CoordinatesFilter
Coordinates filter that filters based on a boolean mask
PARAMETER | DESCRIPTION |
---|---|
mask |
boolean mask
TYPE:
|
__call__
Filters the coordinates based on the boolean mask.
PARAMETER | DESCRIPTION |
---|---|
coordinates |
coordinates (x_min, y_min) of each tile
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CoordinatesSet
|
filtered coordinates (x_min, y_min) of each tile |
SetFilter
Bases: CoordinatesFilter
Coordinates filter that filters based on other coordinates
Available modes
DIFFERENCE
: Removes coordinates that are in the other coordinatesINTERSECTION
: Removes coordinates that are not in the other coordinatesUNION
: Combines the coordinates with the other coordinates and removes duplicates
PARAMETER | DESCRIPTION |
---|---|
other |
other coordinates (x_min, y_min) of each tile
TYPE:
|
mode |
set filter mode (
TYPE:
|
__call__
Filters the coordinates based on the other coordinates.
PARAMETER | DESCRIPTION |
---|---|
coordinates |
coordinates (x_min, y_min) of each tile
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
CoordinatesSet
|
filtered coordinates (x_min, y_min) of each tile |