faninsar.query.GeoQuery#
- class faninsar.query.GeoQuery(points: Points | None = None, boxes: BoundingBox | list[BoundingBox] | None = None, polygons: Polygons | None = None)[source]#
Bases:
objectA combined query for geo-spatial data.
the
Points,BoundingBox, andPolygonsqueries. This class is used to sample data from a GeoDataset using multiple points, bounding boxes, and polygons at the same time.- __init__(points: Points | None = None, boxes: BoundingBox | list[BoundingBox] | None = None, polygons: Polygons | None = None) None[source]#
Initialize a GeoQuery instance.
- Parameters:
points (Points | None, optional) – The Points instance used to retrieve point values from the dataset. Default is None.
boxes (BoundingBox | list[BoundingBox] | None, optional) – The BoundingBox or a list of BoundingBox instances used to retrieve bounding box values from the dataset. Default is None.
polygons (Polygons | None, optional) – The Polygons instance used to retrieve polygon values from the dataset. Default is None.
- Raises:
ValueError: – If neither points, boxes, nor polygons are provided.
TypeError: – If points is not a Points instance, boxes is not a BoundingBox or a list of BoundingBox instances, or polygons is not a Polygons instance.
Methods
__init__([points, boxes, polygons])Initialize a GeoQuery instance.
Attributes
The bounding boxes used to sample the dataset.
The points used to sample the dataset.
The polygons used to sample the dataset.
- property boxes: list[BoundingBox] | None#
The bounding boxes used to sample the dataset.