/** * Create an empty Bounds object with coordinates set to null */ public Bounds() { this(BoundsImpl.create()); }
public float getHeight() { return BoundsImpl.getHeight(getJSObject()); } /**
/** * @return double - upper right x-coordinate of bounds */ public double getUpperRightX(){ return BoundsImpl.getMaxX(getJSObject()); }
/** * @return double - upper right y-coordinate of bounds */ public double getUpperRightY(){ return BoundsImpl.getMaxY(getJSObject()); }
public double[] toArray() { JSObject boundsOpaque = BoundsImpl.toArray(getJSObject()); JDoubleArray bounds = JDoubleArray.narrowToJDoubleArray(boundsOpaque); int boundsLength = bounds.length(); double[] boundsCoordinates = new double[4]; if (boundsLength == 4) { for (int i = 0; i < boundsLength; i++) { boundsCoordinates[i] = bounds.get(i); } } return boundsCoordinates; }
/** * @return double - lower left y-coordinate of bounds */ public double getLowerLeftY(){ return BoundsImpl.getMinY(getJSObject()); }
/** * @return double - lower left x-coordinate of bounds */ public double getLowerLeftX() { return BoundsImpl.getMinX(getJSObject()); }
/** * * @return the center of the bounds in map space */ public LonLat getCenterLonLat() { return LonLat.narrowToLonLat(BoundsImpl.getCenterLonLat( this.getJSObject())); }
public boolean containsBounds(Bounds bounds, boolean partial, boolean contains) { return BoundsImpl.containsBounds(getJSObject(), bounds.getJSObject(), partial, contains); }
public float getWidth() { return BoundsImpl.getWidth(getJSObject()); }
/** * @return double - upper right y-coordinate of bounds */ public double getUpperRightY() { return BoundsImpl.getMaxY(getJSObject()); }
public double[] toArray(){ JSObject boundsOpaque = BoundsImpl.toArray(getJSObject()); JDoubleArray bounds = JDoubleArray.narrowToJDoubleArray(boundsOpaque); int boundsLength = bounds.length(); double[] boundsCoordinates = new double[4]; if(boundsLength == 4){ for(int i = 0; i < boundsLength;i++){ boundsCoordinates[i] = bounds.get(i); } } return boundsCoordinates; }
/** * @return double - lower left y-coordinate of bounds */ public double getLowerLeftY() { return BoundsImpl.getMinY(getJSObject()); }
/** * @return double - lower left x-coordinate of bounds */ public double getLowerLeftX(){ return BoundsImpl.getMinX(getJSObject()); }
public LonLat getCenterLonLat() { return LonLat.narrowToLonLat(BoundsImpl.getCenterLonLat(this.getJSObject())); }
public boolean containsBounds(Bounds bounds, boolean partial, boolean contains ) { return BoundsImpl.containsBounds(getJSObject(), bounds.getJSObject(), partial, contains); } }
public float getWidth() { return BoundsImpl.getWidth(getJSObject()); }
/** * Create a bounding box by specifying its lower left coordinates, * and its upper right coordinates. * * The units of the bounding box will depend on the CRS and or projection used. * * For example, a bounds object that represents the world-wide bounds * in EPSG:4392 is specified as: * new Bounds(-180,-90,180,90); * * @param lowerLeftX = west = minx * @param lowerLeftY = south = miny * @param upperRightX = east = maxx * @param upperRightY = north = maxy */ public Bounds(double lowerLeftX, double lowerLeftY, double upperRightX, double upperRightY) { this (BoundsImpl.create(lowerLeftX, lowerLeftY, upperRightX, upperRightY)); }
/** * @return double - upper right x-coordinate of bounds */ public double getUpperRightX() { return BoundsImpl.getMaxX(getJSObject()); }
public float getHeight() { return BoundsImpl.getHeight(getJSObject()); }