asp_plot.sensors.dimap#

Metadata reader for Airbus-family DIMAP v2 camera files.

Covers the sensors that share the DIMAP v2 primary-product layout: Pléiades 1A/1B, Pléiades Neo, SPOT 6/7, and PeruSat-1. ASP parses these with a single reader too (PleiadesXML.cc; PeruSatXML.cc duplicates the same layout), which is the reference implementation this module mirrors.

Attributes#

Classes#

PleiadesMetadata

Metadata reader for Airbus-family DIMAP v2 camera files.

Module Contents#

class asp_plot.sensors.dimap.PleiadesMetadata(directory=None, image_list=None)#

Bases: asp_plot.sensors.base.SensorMetadata

Metadata reader for Airbus-family DIMAP v2 camera files.

Parses DIMAP v2 primary-product metadata (DIM_*.XML, root tag Dimap_Document) as delivered with Pléiades 1A/1B, Pléiades Neo, SPOT 6/7, and PeruSat-1 SEN(sor) products. Each scene is delivered as a single DIM XML, so unlike WorldView there is no tile mosaicking step. The sidecar RPC_*.XML files share the DIMAP root but carry no ephemeris, attitude, or acquisition-angle information, so discovery keeps only files whose METADATA_SUBPROFILE is PRODUCT and whose METADATA_PROFILE is one of SUPPORTED_DIMAP_PROFILES (products from other DIMAP profiles are skipped with an explanatory warning). Profiles in SPEC_ONLY_DIMAP_PROFILES are implemented from ASP’s reader spec but not yet validated against real deliveries (#168).

Notes

  • Airbus quaternions are scalar-first (Q0 is the scalar part). They are reordered to the scalar-last q1..q4 layout shared with WorldView, as consumed by the roll/pitch/yaw computation in asp_plot.stereo_geometry.StereoGeometryPlotter._compute_roll_pitch_yaw().

  • Attitude comes in two shapes: tabulated quaternion samples (Quaternion_List; Pléiades Neo, SPOT 6/7, PeruSat-1) or one degree-3 polynomial per quaternion component (Polynomial_Quaternions; Pléiades 1A/1B), which is evaluated at the ephemeris timestamps so both shapes yield the same tabulated att_df downstream.

  • DIMAP reports no ephemeris/attitude covariance and no scan direction or TDI level: the cov_* columns are filled with NaN and scandir / tdi are None. Consumers treat those as “not provided”.

  • The mean view/sun angles and GSD are averaged over the Located_Geometric_Values blocks — nine for Pléiades/SPOT (corners, edge midpoints, center), a single center block for PeruSat-1. meansatel is derived as 90° minus the mean target incidence angle, matching the WorldView MEANSATEL convention.

getAtt_df(root)#

Create an attitude DataFrame from a parsed DIMAP document.

Pléiades Neo, SPOT 6/7, and PeruSat-1 products tabulate quaternion samples in a Quaternion_List; Pléiades 1A/1B products instead provide one polynomial per quaternion component (Polynomial_Quaternions), which is evaluated at the ephemeris timestamps so both shapes come out as the same tabulated DataFrame.

Parameters:

root (xml.etree.ElementTree.Element) – Parsed Dimap_Document root element.

Returns:

Time-indexed DataFrame with scalar-last quaternions q1..q4 (Airbus Q0 is the scalar part and lands in q4), plus NaN cov_* columns (DIMAP provides no attitude covariance).

Return type:

pandas.DataFrame

getEphem_gdf(root)#

Create an ephemeris GeoDataFrame from a parsed DIMAP document.

Parameters:

root (xml.etree.ElementTree.Element) – Parsed Dimap_Document root element.

Returns:

Time-indexed GeoDataFrame with x, y, z positions (m) and dx, dy, dz velocities (m/s) in ECEF (EPSG:4978), plus NaN cov_* columns (DIMAP provides no ephemeris covariance).

Return type:

geopandas.GeoDataFrame

get_scene_dict(xml, geteph=True)#

Get a dictionary of metadata for one DIMAP scene.

Parameters:
  • xml (str) – Path to the DIM_*.XML product metadata file.

  • geteph (bool, optional) – Whether to extract ephemeris/attitude data, default is True.

Returns:

Sensor-agnostic scene dict (see package docstring).

Return type:

dict

get_scene_dicts()#

Return one sensor-agnostic scene dict per DIMAP product XML.

name = 'Pleiades'#
asp_plot.sensors.dimap.SPEC_ONLY_DIMAP_PROFILES = ('S6_SENSOR', 'S7_SENSOR', 'PER1_SENSOR')#
asp_plot.sensors.dimap.SUPPORTED_DIMAP_PROFILES = ('PHR_SENSOR', 'PNEO_SENSOR', 'S6_SENSOR', 'S7_SENSOR', 'PER1_SENSOR')#
asp_plot.sensors.dimap.logger#