providers.worldview
vhrharmonize.providers.worldview
¶
WorldView provider discovery and IMD metadata parsing.
WorldViewFilenameParts
dataclass
¶
Parsed components of a WorldView bundle filename.
WorldViewImage
dataclass
¶
WorldView image files and metadata for a single basename.
WorldViewScene
dataclass
¶
A single WorldView acquisition bundle with one MUL image and one PAN image.
primary_image
property
¶
Return the preferred primary image. Args: self: WorldView scene instance. Returns: Primary scene image or None.
primary_basename
property
¶
Return the primary scene basename. Args: self: WorldView scene instance. Returns: Primary image basename or None.
get_image(role)
¶
Return an image for a requested role. Args: role: Requested image role. Returns: Matching scene image or None.
set_image(image)
¶
Assign an image to the scene. Args: image: WorldView image to attach to the scene. Returns: None.
iter_images()
¶
Return available scene images. Args: self: WorldView scene instance. Returns: List of non-null scene images.
to_dict()
¶
Convert a scene to a flat dictionary. Args: self: WorldView scene instance. Returns: Flattened scene dictionary.
WorldViewMetadata
dataclass
¶
Provider-specific parsed IMD metadata.
from_imd_file(imd_file, *, photo_basename=None)
classmethod
¶
Build metadata from an IMD file. Args: cls: Dataclass type being constructed. imd_file: IMD file path. photo_basename: Optional basename override. Returns: Parsed WorldView metadata instance.
find_first(*keys)
¶
Find the first matching raw metadata value. Args: keys: Metadata keys to search for in order. Returns: First matching value or None.
find_first_number(*keys)
¶
Find the first matching numeric metadata value. Args: keys: Metadata keys to search for in order. Returns: First matching numeric value or None.
find_first_datetime(*keys)
¶
Find the first matching datetime metadata value. Args: keys: Metadata keys to search for in order. Returns: First matching UTC datetime or None.
to_dict()
¶
Convert parsed metadata to a dictionary. Args: self: WorldView metadata instance. Returns: Dictionary representation of the metadata.
parse_worldview_basename(name)
¶
Parse a WorldView basename using - and _ separators.
discover_worldview_scene_tree_from_tif_files(tif_files, filter_basenames=None)
¶
Discover WorldView scenes from tif files grouped by scene id then catalog id.
iter_worldview_scenes(scene_tree)
¶
Flatten a scene tree into a stable list of scenes.
parse_worldview_imd_text(imd_text)
¶
Parse an IMD file into nested Python objects.
parse_worldview_imd_file(imd_file)
¶
Parse a WorldView IMD file into nested Python objects.
load_worldview_metadata(imd_file, *, photo_basename=None)
¶
Load provider-specific WorldView metadata from an IMD file.
enrich_worldview_scenes_with_metadata(scenes)
¶
Attach provider-specific and standardized metadata to discovered scenes.
load_worldview_scenes_from_tif_files(tif_files, filter_basenames=None)
¶
Discover WorldView scenes from tif files and attach parsed metadata.
find_files(root_folder_path, filter_basenames=None)
¶
Discover WorldView scenes under a folder root. Args: root_folder_path: Root folder to scan for tif files. filter_basenames: Optional basenames to keep. Returns: Flattened scene dictionary keyed by scene and catalog id.