eodal.metadata.planet_scope.database.querying module¶
Functions to query PlanetScope specific metadata from the metadata DB.
Query criteria include
the acquisition period (between a start and an end date)
the scene-wide cloud coverage (derived from the scene metadata); this is optional.
Copyright (C) 2022 Lukas Valentin Graf
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- eodal.metadata.planet_scope.database.querying.find_raw_data_by_bbox(date_start: date, date_end: date, bounding_box: Polygon | str, cloud_cover_threshold: int | float | None = 100) DataFrame[source]¶
Queries the metadata DB by Planet-Scope bounding box, time period and cloud cover. The returned data is ordered by sensing time in ascending order.
Note
For the spatial query
ST_Intersectsis called.- Parameters:
date_start – start date of the time period
date_end – end date of the time period
bounding_box_wkt – bounding box either as extended well-known text in geographic coordinates or as shapely
Polygonin geographic coordinates (WGS84)cloud_cover_threshold – optional cloud cover threshold to filter datasets by scene cloud coverage. Must be provided as number between 0 and 100%.
- Returns:
dataframe with references to found Planet-Scope mapper
- eodal.metadata.planet_scope.database.querying.get_scene_metadata(scene_id: str) DataFrame[source]¶
Returns the complete metadata record of a Planet-Scope scene
- Parameters:
product_uri – unique scene identifier provided by Planet in the metadata *.json file
- Returns:
DataFramewith complete scene metadata