centreborelli / s2p

Satellite Stereo Pipeline
GNU Affero General Public License v3.0
208 stars 67 forks source link

if exogenous_dem_geoid_mode is True or False #109

Closed lionlai1989 closed 2 years ago

lionlai1989 commented 2 years ago

In s2p/rpc_utils.py, it states

    if exogenous_dem_geoid_mode is True:
        z = geographiclib.geoid_to_ellipsoid(lat, lon, z)

When exogenous_dem_geoid_mode is True, then converting height from geoid to ellipsoid.
My questions are:
1, Why is it not if exogenous_dem_geoid_mode is False:? It makes more sense to me that when exogenous_dem_geoid_mode is False, then the DEM should be ellipsoid height.

  1. Does function geoid_to_ellipsoid convert a orthometric height to ellipsoid height? From H to h as in geoid height calculator states. It would be great that if you can clarify these things. Thank you.
oleg-alexandrov commented 2 years ago

I think when when exogenous_dem_geoid_mode is true, your input DEM is assumed to be in orthometric (geoid) heights, and then it needs conversion to ellipsoid heights, which is what happens in that code. So, the logic is correct. Ellipsoid heights are lot more convenient to use than orthometric heights for later processing.