Utility method to get the distance from the bottom left corner of the
bounding box to the upper right corner

@param boundingBox
The bounding box
@return The distance in meters
354784
public int getDistanceMeters(Extent boundingBox) {
		return new Double(Math.floor(Calculator.latLonDist(boundingBox.getMinX(), boundingBox.getMinY(),
				boundingBox.getMaxX(), boundingBox.getMaxY()))).intValue();
	}
699431
public BoundingBox boundingBoxFromWgs84(BoundingBox boundingBox) {
        if (projection == null) {
            throw new GeoPackageException("Shape Converter projection is null");
        }
        return boundingBox.transform(fromWgs84);
    }
652071
public BoundingBox overlap(BoundingBox boundingBox, boolean allowEmpty) {

		double minLongitude = Math.max(getMinLongitude(),
				boundingBox.getMinLongitude());
		double maxLongitude = Math.min(getMaxLongitude(),
				boundingBox.getMaxLongitude());
		double minLatitude = Math.max(getMinLatitude(),
				boundingBox.getMinLatitude());
		double maxLatitude = Math.min(getMaxLatitude(),
				boundingBox.getMaxLatitude());

		BoundingBox overlap = null;

		if ((minLongitude < maxLongitude && minLatitude < maxLatitude)
				|| (allowEmpty && minLongitude <= maxLongitude && minLatitude <= maxLatitude)) {
			overlap = new BoundingBox(minLongitude, minLatitude, maxLongitude,
					maxLatitude);
		}

		return overlap;
	}
649137
public static long getTileRow(BoundingBox totalBox, long matrixHeight,
			double latitude) {

		double minY = totalBox.getMinLatitude();
		double maxY = totalBox.getMaxLatitude();

		long tileId;
		if (latitude <= minY) {
			tileId = matrixHeight;
		} else if (latitude > maxY) {
			tileId = -1;
		} else {
			double matrixHeightMeters = totalBox.getMaxLatitude()
					- totalBox.getMinLatitude();
			double tileHeight = matrixHeightMeters / matrixHeight;
			tileId = (long) ((maxY - latitude) / tileHeight);
		}

		return tileId;
	}
499097
public GeoRect getBoundingBox() {
        double radDist = radius / EARTH_RADIUS;
        double radLat = Math.toRadians(latitude);
        double radLon = Math.toRadians(longitude);

        double minLat = radLat - radDist;
        double maxLat = radLat + radDist;

        double minLon, maxLon;
        if (minLat > MIN_LAT && maxLat < MAX_LAT) {
            double deltaLon = Math.asin(Math.sin(radDist) /
                Math.cos(radLat));
            minLon = radLon - deltaLon;
            if (minLon < MIN_LON) {
                minLon += 2d * Math.PI;
            }
            maxLon = radLon + deltaLon;
            if (maxLon > MAX_LON) {
                maxLon -= 2d * Math.PI;
            }
        } else {
            // a pole is within the distance
            minLat = Math.max(minLat, MIN_LAT);
            maxLat = Math.min(maxLat, MAX_LAT);
            minLon = MIN_LON;
            maxLon = MAX_LON;
        }

        return new GeoRect(
            new GeoPoint(Math.toDegrees(maxLat), Math.toDegrees(minLon)),
            new GeoPoint(Math.toDegrees(minLat), Math.toDegrees(maxLon))
        );
    }
398013
public static GeoBoundingBoxQuery geoBoundingBox(double topLeftLon, double topLeftLat,
        double bottomRightLon, double bottomRightLat) {
        return new GeoBoundingBoxQuery(topLeftLon, topLeftLat, bottomRightLon, bottomRightLat);
    }
1088957
public Rectangle2D getBoundingBox() {
		Rectangle2D bb = new Rectangle2D.Double(
				m_base.getX(),
				m_base.getY()-50,
				getWidth(),
				50);
		return bb;
	}
407526
def _parse_bounding_box(bounding_box):
        '''
        
        '''
        coordinates = json.loads(bounding_box)["coordinates"]
        x_coords = [x for x, y in coordinates[0]]
        y_coords = [y for x, y in coordinates[0]]
        return min(x_coords), min(y_coords), max(x_coords), max(y_coords)
193381
public static Tile getLowerRight(BoundingBox boundingBox, byte zoomLevel, int tileSize) {
        int tileRight = MercatorProjection.longitudeToTileX(boundingBox.maxLongitude, zoomLevel);
        int tileBottom = MercatorProjection.latitudeToTileY(boundingBox.minLatitude, zoomLevel);
        return new Tile(tileRight, tileBottom, zoomLevel, tileSize);
    }
367921
public static BoundingBox getBoundingBox(int x, int y, int zoom) {

		int tilesPerSide = tilesPerSide(zoom);
		double tileWidthDegrees = tileWidthDegrees(tilesPerSide);
		double tileHeightDegrees = tileHeightDegrees(tilesPerSide);

		double minLon = -180.0 + (x * tileWidthDegrees);
		double maxLon = minLon + tileWidthDegrees;

		double maxLat = 90.0 - (y * tileHeightDegrees);
		double minLat = maxLat - tileHeightDegrees;

		BoundingBox box = new BoundingBox(minLon, minLat, maxLon, maxLat);

		return box;
	}
361009
public static BoundingBox overlap(BoundingBox boundingBox,
			BoundingBox boundingBox2, boolean allowEmpty) {
		return boundingBox.overlap(boundingBox2, allowEmpty);
	}
81278
function getBoundingBox() {
    if (!bounds) return // client does not want to restrict movement

    if (typeof bounds === 'boolean') {
      // for boolean type we use parent container bounds
      var ownerRect = owner.getBoundingClientRect()
      var sceneWidth = ownerRect.width
      var sceneHeight = ownerRect.height

      return {
        left: sceneWidth * boundsPadding,
        top: sceneHeight * boundsPadding,
        right: sceneWidth * (1 - boundsPadding),
        bottom: sceneHeight * (1 - boundsPadding),
      }
    }

    return bounds
  }
202656
public static double getLongitudeFromPixel(long width,
			BoundingBox boundingBox, float pixel) {
		return getLongitudeFromPixel(width, boundingBox, boundingBox, pixel);
	}
1036549
public static boolean isPointInBoundingBox(Point point,
			BoundingBox boundingBox) {
		BoundingBox pointBoundingbox = new BoundingBox(point.getX(),
				point.getY(), point.getX(), point.getY());
		return boundingBox.intersects(pointBoundingbox, true);
	}
731185
public static double getLatitudeDistance(double minLatitude,
                                             double maxLatitude) {
        LatLng lowerMiddle = new LatLng(minLatitude, 0);
        LatLng upperMiddle = new LatLng(maxLatitude, 0);
        double latDistance = SphericalUtil.computeDistanceBetween(lowerMiddle,
                upperMiddle);
        return latDistance;
    }
82080
public static boolean isPointInBoundingBox(Point point,
			BoundingBox boundingBox, double maxLongitude) {
		BoundingBox pointBoundingbox = new BoundingBox(point.getX(),
				point.getY(), point.getX(), point.getY());
		BoundingBox overlap = overlap(boundingBox, pointBoundingbox,
				maxLongitude, true);
		return overlap != null;
	}
209771
def bounding_box(self):
        
        from . import primitives

        transform = np.eye(4)
        # translate to center of axis aligned bounds
        transform[:3, 3] = self.bounds.mean(axis=0)

        aabb = primitives.Box(transform=transform,
                              extents=self.extents,
                              mutable=False)
        return aabb