eodal.core.sensors.planet_scope module¶
Accessing Planet-Scope data
- class eodal.core.sensors.planet_scope.PlanetScope(band_constructor: Callable[[...], Band] | None = None, scene_properties: SceneProperties | None = None, *args, **kwargs)[source]¶
Bases:
RasterCollection
- class eodal.core.sensors.planet_scope.SuperDove(band_constructor: Callable[[...], Band] | None = None, scene_properties: SceneProperties | None = None, *args, **kwargs)[source]¶
Bases:
PlanetScope- classmethod from_analytic(in_dir: Path, band_selection: List[str] | None = None, read_ql: bool | None = True, apply_scaling: bool | None = True, **kwargs)[source]¶
Loads a PS Super Dove scene into a RasterCollection object.
- Parameters:
in_dir – directory containing the scene-data
band_selection – selection of bands to read. By default all bands are read.
read_ql – If True (default) reads the quality layers from the udm2 file (usable data mask).
apply_scaling – If True scales the reflectance factors between 0 and 1 based on gain and offset.
kwargs – optional keyword arguments to pass to ~eodal.core.raster.RasterCollection.from_multi_band_raster
- mask_non_clear_pixels(confidence_threshold: int | None = 100)[source]¶
Mask out non-clear pixels and keep only clear pixels with a certain confidence threshold (100% by default).
- Parameters:
confidence_treshold – threshold [0-100] to treat a clear pixel as truely pixel. The higher the threshold the more confident the algorithm was that the pixel was clear. Set to 100 (maximum confidence) by default.
- classmethod read_pixels(in_dir: Path, vector_features: Path | GeoDataFrame, band_selection: List[str] | None = None, read_ql: bool | None = True, apply_scaling: bool | None = True) GeoDataFrame[source]¶
Extracts PlanetScope Super Dove raster values at locations defined by one or many vector geometry features read from a vector file (e.g., ESRI shapefile) or
GeoDataFrame.- Parameters:
in_dir – Planet Scope SuperDove scene from which to extract pixel values at the provided point locations
point_features – vector file (e.g., ESRI shapefile or geojson) or
GeoDataFramedefining point locations for which to extract pixel valuesband_selection – list of bands to read. Per default all raster bands available are read.
read_ql – read quality layer file (udm2, usuable data mask)
apply_scaling – apply SuperDove gain and offset factor to derive reflectance values scaled between 0 and 1.
- Returns:
GeoDataFramecontaining the extracted raster values. The band values are appened as columns to the dataframe. Existing columns of the input in_file_pixels are preserved.