diff --git a/Code/Projections/otbGeocentricTransform.txx b/Code/Projections/otbGeocentricTransform.txx index 4596797b08505d2648e512c8f70d1eeabb03205b..4def38abe5d88d0796343218cb21ea32a58b2cb8 100644 --- a/Code/Projections/otbGeocentricTransform.txx +++ b/Code/Projections/otbGeocentricTransform.txx @@ -47,6 +47,25 @@ namespace otb { OutputPointType outputPoint; + switch (DirectionOfMapping) + { + case INVERSE: + { + m_Ellipsoid->XYZToLatLonHeight(point[0], point[1], point[2], outputPoint[1],outputPoint[0],outputPoint[2]); + break; + } + case FORWARD: + { + m_Ellipsoid->latLonHeightToXYZ(point[1], point[0], point[2], outputPoint[0],outputPoint[1],outputPoint[2]); + + break; + } + default: + { + itkExceptionMacro(<<"Model is INVERSE or FORWARD only !!"); + break; + } + } //To be completed return outputPoint; }