eodal.metadata.sentinel2.utils module

Metadata filtering utilities for Sentinel-2 data

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.sentinel2.utils.identify_updated_scenes(metadata_df: DataFrame, return_highest_baseline: bool | None = True) Tuple[DataFrame, DataFrame][source]

Returns those S2 entries in a pandas DataFrame retrieved from a query in eodal’s metadata base that originate from the same orbit and data take but were processed by different PDGS Processing Baseline number (the ‘Nxxxx’ in the product_uri entry in the scene metadata or .SAFE name).

Parameters:
  • metadata_df – dataframe from metadata base query in which to search for mapper with the same sensing date and data take but different baseline versions

  • return_highest_baseline – if True (default) return those mapper with the highest baseline. Otherwise return the baseline most products belong to

Returns:

Tuple with two entries. The first entries contains a DataFrame with those S2 mapper belonging to either the highest PDGS baseline or the most common baseline version. The other “older” mapper are in the second tuple item.