Description: This section loads a PlanetScope TIFF image file and reads its associated metadata and quality data. The goal is to load the primary data array, quality data (e.g., UDM data for quality control), and metadata for further analysis
Input:
Expected Output:
Code Snippet:
# Path to the tif file
tif_file = "/path_to_planetscope.tif"
# Load data
with PlanetScope.open(tif_file) as planet_obj:
# Display file paths to verify that data, metadata, and QA files are loaded correctly
print(planet_obj.data_file_path) # Path to main image data
print(planet_obj.metadata_file_path) # Path to metadata information
print(planet_obj.qa_file_path) # Path to quality assurance data
# Load the primary data array
data_array = planet_obj.data
# Load quality data, such as UDM (Unusable Data Mask), to assess data validity
udm_data_array = planet_obj.quality_data
# Load metadata, including acquisition information and spatial resolution
metadata = planet_obj.metadata