* complicated for azimuthal projections.
*
* @return LatLonPoint
*/
public LatLonPoint getLowerRight() {
LatLonPoint tmp = new LatLonPoint();
float lat, lon;
// over north pole
if (overNorthPole()) {
lon = DATELINE;
// get the right bottom corner
tmp = inverse(width - 1, height - 1, tmp);
// check for invalid
if (MoreMath.approximately_equal(tmp.radlon_, ctrLon, 0.0001f)) {
lat = ctrLat - MoreMath.HALF_PI;
} else {
// southernmost coord is right bottom
lat = tmp.radlat_;
}
}
// over south pole
else if (overSouthPole()) {
lat = SOUTH_POLE;
lon = DATELINE;
}
// view in northern hemisphere
else if (ctrLat >= 0f) {
// get the right bottom corner
tmp = inverse(width - 1, height - 1, tmp);
// check for invalid
if (MoreMath.approximately_equal(tmp.radlon_, ctrLon, 0.0001f)) {
lat = ctrLat - MoreMath.HALF_PI;
lon = DATELINE;
} else {
// southernmost coord is right bottom
lat = tmp.radlat_;
// easternmost coord is right top
lon = inverse(width - 1, 0, tmp).radlon_;
}
}
// view in southern hemisphere
else {
// get the right bottom corner
tmp = inverse(width - 1, height - 1, tmp);
// check for invalid
if (MoreMath.approximately_equal(tmp.radlon_, ctrLon, 0.0001f)) {
lat = inverse(width / 2, height - 1, tmp).radlat_;
lon = DATELINE;
} else {
// easternmost coord is right bottom
lon = tmp.radlon_;
// southernmost coord is center bottom
lat = inverse(width / 2, height - 1, tmp).radlat_;
}
}
tmp.setLatLon(lat, lon, true);
// Debug.output("lr="+tmp);
return tmp;
}