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#
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.SensorMetadataMetadata reader for Airbus-family DIMAP v2 camera files.
Parses DIMAP v2 primary-product metadata (
DIM_*.XML, root tagDimap_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 sidecarRPC_*.XMLfiles share the DIMAP root but carry no ephemeris, attitude, or acquisition-angle information, so discovery keeps only files whoseMETADATA_SUBPROFILEisPRODUCTand whoseMETADATA_PROFILEis one ofSUPPORTED_DIMAP_PROFILES(products from other DIMAP profiles are skipped with an explanatory warning). Profiles inSPEC_ONLY_DIMAP_PROFILESare implemented from ASP’s reader spec but not yet validated against real deliveries (#168).Notes
Airbus quaternions are scalar-first (
Q0is the scalar part). They are reordered to the scalar-lastq1..q4layout shared with WorldView, as consumed by the roll/pitch/yaw computation inasp_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 tabulatedatt_dfdownstream.DIMAP reports no ephemeris/attitude covariance and no scan direction or TDI level: the
cov_*columns are filled with NaN andscandir/tdiare None. Consumers treat those as “not provided”.The mean view/sun angles and GSD are averaged over the
Located_Geometric_Valuesblocks — nine for Pléiades/SPOT (corners, edge midpoints, center), a single center block for PeruSat-1.meansatelis derived as 90° minus the mean target incidence angle, matching the WorldViewMEANSATELconvention.
- 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_Documentroot element.- Returns:
Time-indexed DataFrame with scalar-last quaternions
q1..q4(AirbusQ0is the scalar part and lands inq4), plus NaNcov_*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_Documentroot element.- Returns:
Time-indexed GeoDataFrame with
x, y, zpositions (m) anddx, dy, dzvelocities (m/s) in ECEF (EPSG:4978), plus NaNcov_*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.
- 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#