Returns the bounding box of this polyline.

@return a {@link Rectangle2D} that is the high-precision
bounding box of this line.
@see java.awt.Shape#getBounds2D()
972739
public Rectangle2D getBounds2D() {
		int[] r = rect();
		return r==null?null:new Rectangle2D.Double(r[0], r[1], r[2], r[3]);
	}
1174170
public Rectangle getRect1() {
        verifyPropertyPresence(RECT1);
        //noinspection unchecked
        return mapToRect((Map<String, Object>) getCommandResult().get(RECT1));
    }
411880
public double[] getMapBounds() {
        BoundingBox bb = mapDataStore.boundingBox();
        double[] nswe = new double[4];
        nswe[0] = bb.maxLatitude;
        nswe[1] = bb.minLatitude;
        nswe[2] = bb.minLongitude;
        nswe[3] = bb.maxLongitude;
        return nswe;
    }
721672
public static final Rectangle toRect(Shape a)
    {
        return a instanceof Rectangle ? (Rectangle) a : a.getBounds();
    }
388241
def bounding_box(self):
        
        if self.world_coords:
            return self.world_obj.findSolid().BoundingBox()
        return self.local_obj.findSolid().BoundingBox()
576451
protected Rectangle2d calcVisibleBounds() {
		final Rectangle2d r = new Rectangle2d();
		boolean first = true;
		Rectangle2d subBounds;
		for (final MapLayer sublayer : this.subLayers) {
			if (sublayer.isVisible()) {
				if (sublayer instanceof GISLayerContainer<?>)  {
					subBounds = ((GISLayerContainer<?>) sublayer).getVisibleBoundingBox();
				} else {
					subBounds = sublayer.getBoundingBox();
				}
				if (subBounds != null && !subBounds.isEmpty()) {
					if (first) {
						first = false;
						r.set(subBounds);
					} else {
						r.setUnion(subBounds);
					}
				}
			}
		}
		return first ? null : r;
	}
175307
private Rectangle getDefaultBounds() {
		final Dimension size = getToolkit().getScreenSize();
		final Insets insets = getToolkit().getScreenInsets(getGraphicsConfiguration());
		return new Rectangle(insets.left, insets.top, size.width - insets.left - insets.right,
				size.height - insets.top - insets.bottom);
	}
547304
public ObjectProperty<Rectangle2dfx> controlPointBoundingBoxProperty() {
		if (this.logicalBounds == null) {
			this.logicalBounds = new ReadOnlyObjectWrapper<>(this, MathFXAttributeNames.CONTROL_POINT_BOUNDING_BOX);
			this.logicalBounds.bind(Bindings.createObjectBinding(() -> {
				final Rectangle2dfx bb = getGeomFactory().newBox();
				Path2afp.calculatesControlPointBoundingBox(
						getPathIterator(),
						bb);
				return bb;
			},
					innerCoordinatesProperty()));
		}
		return this.logicalBounds;
	}
944860
@Override
	@Pure
	protected Rectangle2d calcBounds() {
		final Rectangle2d rect = new Rectangle2d();
		boolean first = true;
		Rectangle2d rs;
		for (final RoadSegment segment : getRoadSegments()) {
			rs = segment.getBoundingBox();
			if (rs != null && !rs.isEmpty()) {
				if (first) {
					first = false;
					rect.set(rs);
				} else {
					rect.setUnion(rs);
				}
			}
		}
		return first ? null : rect;
	}
289996
public static Rectangle getSelectedBounds(BufferedImage p) {
		int width = p.getWidth();
        int height = p.getHeight();
		int maxX = 0, maxY = 0, minX = width, minY = height;
		boolean anySelected = false;
		int y1;
		int [] pixels = null;
		
		for (y1 = height-1; y1 >= 0; y1--) {
			pixels = getRGB( p, 0, y1, width, 1, pixels );
			for (int x = 0; x < minX; x++) {
				if ((pixels[x] & 0xff000000) != 0) {
					minX = x;
					maxY = y1;
					anySelected = true;
					break;
				}
			}
			for (int x = width-1; x >= maxX; x--) {
				if ((pixels[x] & 0xff000000) != 0) {
					maxX = x;
					maxY = y1;
					anySelected = true;
					break;
				}
			}
			if ( anySelected )
				break;
		}
		pixels = null;
		for (int y = 0; y < y1; y++) {
			pixels = getRGB( p, 0, y, width, 1, pixels );
			for (int x = 0; x < minX; x++) {
				if ((pixels[x] & 0xff000000) != 0) {
					minX = x;
					if ( y < minY )
						minY = y;
					anySelected = true;
					break;
				}
			}
			for (int x = width-1; x >= maxX; x--) {
				if ((pixels[x] & 0xff000000) != 0) {
					maxX = x;
					if ( y < minY )
						minY = y;
					anySelected = true;
					break;
				}
			}
		}
		if ( anySelected )
			return new Rectangle( minX, minY, maxX-minX+1, maxY-minY+1 );
		return null;
	}
39601
public static ArrayList<IGeoPoint> pointsAsRect(BoundingBox rectangle){
		ArrayList<IGeoPoint> points = new ArrayList<IGeoPoint>(4);
		points.add(new GeoPoint(rectangle.getLatNorth(), rectangle.getLonWest()));
		points.add(new GeoPoint(rectangle.getLatNorth(), rectangle.getLonEast()));
		points.add(new GeoPoint(rectangle.getLatSouth(), rectangle.getLonEast()));
		points.add(new GeoPoint(rectangle.getLatSouth(), rectangle.getLonWest()));
		return points;
	}
318554
public Bbox getBounds() {
		double w = getViewSpaceWidth();
		double h = getViewSpaceHeight();
		double x = viewState.getX() - w / 2;
		double y = viewState.getY() - h / 2;
		return new Bbox(x, y, w, h);
	}
347054
public ObjectProperty<RectangularPrism3ifx> controlPointBoundingBoxProperty() {
		if (this.logicalBounds == null) {
			this.logicalBounds = new ReadOnlyObjectWrapper<>(this, MathFXAttributeNames.CONTROL_POINT_BOUNDING_BOX);
			this.logicalBounds.bind(Bindings.createObjectBinding(() -> {
				final RectangularPrism3ifx bb = getGeomFactory().newBox();
				Path3ai.computeControlPointBoundingBox(
						getPathIterator(),
						bb);
				return bb;
			},
					innerCoordinatesProperty()));
		}
		return this.logicalBounds;
	}
346519
public static Rectangle2D getRectangle2D(IAtomContainer container) {
        double[] minmax = getMinMax(container);
        return new Rectangle2D.Double(minmax[0], minmax[1], minmax[2] - minmax[0], minmax[3] - minmax[1]);
    }
761637
@Pure
	protected final boolean boundsIntersects(Shape2D<?, ?, ?, ?, ?, ? extends Rectangle2afp<?, ?, ?, ?, ?, ?>> rectangle) {
		final Rectangle2d bounds = getBoundingBox();
		assert bounds != null;
		return bounds.intersects(rectangle);
	}
652558
public static Rectangle asRectangle(Rectangle2D rectangle)
    {
        Rectangle r = new Rectangle(
            (int)rectangle.getX(), 
            (int)rectangle.getY(),
            (int)rectangle.getWidth(),
            (int)rectangle.getHeight());
        return r;
    }
498040
public Bbox getMaximumBounds() {
		org.geomajas.gwt.client.spatial.Bbox box = mapView.getMaxBounds();
		return new Bbox(box.getX(), box.getY(), box.getWidth(), box.getHeight());
	}