umr-lops / xsar

Synthetic Aperture Radar (SAR) Level-1 GRD python mapper for efficient xarray/dask based processing
https://cyclobs.ifremer.fr/static/sarwing_datarmor/xsar/
MIT License
25 stars 8 forks source link

add s1meta.orbit #44

Closed oarcher closed 2 years ago

oarcher commented 2 years ago

will close #43. Needed for #38

oarcher commented 2 years ago

so s1meta.orbit is a geopandas, like:

s1meta.orbit velocity geometry
2017-09-07 10:29:14.474905 POINT Z (-116.710637 -3432.91065 -6775.974019) POINT Z (2891647.47008 -5782320.10182 2868682....
2017-09-07 10:29:24.474905 POINT Z (-154.090577 -3367.676328 -6807.999362) POINT Z (2890293.37221 -5816323.40019 2800762....
... ... ...
2017-09-07 10:31:54.474905 POINT Z (-698.6278620000001 -2341.617687 -7194... POINT Z (2825923.26241 -6245572.10435 1748361....

crs is 'Earth Fixed' (others are not implemented):

s1meta.orbit.crs

<Geocentric CRS: +proj=geocent +ellps=WGS84 +datum=WGS84 +type=crs>
Name: unknown
Axis Info [cartesian]:
- X[geocentricX]: Geocentric X (metre)
- Y[geocentricY]: Geocentric Y (metre)
- Z[geocentricZ]: Geocentric Z (metre)
Area of Use:
- undefined
Datum: World Geodetic System 1984
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich

It has also an attributes dictionnary: s1meta.orbit.attrs

{
  'orbit_pass': 'Descending', 
  'platform_heading': -167.7668824808032, 
  'history': """orbit:  
    annotation/s1a.xml:
      - //product/generalAnnotation/orbitList/orbit/time  
      - //product/generalAnnotation/orbitList/orbit/frame  
      - //product/generalAnnotation/orbitList/orbit/position/x  
      - //product/generalAnnotation/orbitList/orbit/position/y  
      - //product/generalAnnotation/orbitList/orbit/position/z
      - //product/generalAnnotation/orbitList/orbit/velocity/x
      - //product/generalAnnotation/orbitList/orbit/velocity/y  
      - //product/generalAnnotation/orbitList/orbit/velocity/z  
      - /product/generalAnnotation/productInformation/pass
      - /product/generalAnnotation/productInformation/platformHeading
      """
}

Sentinel1Meta._repr_mimebundle_ has been modified, so the orbit is shown in a notebook.

s1meta image