getCenterPoint method

LatLong getCenterPoint()

@return a new LatLong at the horizontal and vertical center of this BoundingBox.

Implementation

LatLong getCenterPoint() {
  double latitudeOffset = (this.maxLatitude - this.minLatitude) / 2;
  double longitudeOffset = (this.maxLongitude - this.minLongitude) / 2;
  return new LatLong(this.minLatitude + latitudeOffset, this.minLongitude + longitudeOffset);
}