+ if( XXpYY + Z*Z < 25 ) {
+ // This function fails near the geocenter region, so catch that special case here.
+ // Define the innermost sphere of small radius as earth center and return the
+ // coordinates 0/0/-EQURAD. It may be any other place on geoide's surface,
+ // the Northpole, Hawaii or Wentorf. This one was easy to code ;-)
+ geod.setLongitudeRad( 0.0 );
+ geod.setLongitudeRad( 0.0 );
+ geod.setElevationM( -EQURAD );
+ return;
+ }
+