eodal.metadata.utils module

Helper functions to interact with the satellite meta data base

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.utils.reconstruct_path(record: Series, is_raw_data: bool | None = True, path_to_nas: bool | None = True) Path[source]

auxiliary function to reconstruct the actual dataset location based on the entries in the metatdata base. Raises an error if the dataset was not found.

Parameters:
  • record – single record from the metadata base denoting a single dataset

  • is_raw_data – if True (default) assumes the queried data is Sentinel-2 ESA derived “raw” data in .SAFE archive format and not already processed by eodal to multi-band geoTiff files.

  • path_to_nas – if True (default) tries to find the mount point of the NAS file system on the local machine’s file system.

Return in_dir:

filepath to the directory for the local machine