/** * Convenience method for getting the bounding box most westerly point (longitude) as a double * coordinate. * * @return the most westerly coordinate inside this bounding box * @since 3.0.0 */ public final double north() { return northeast().latitude(); }
/** * Convenience method for getting the bounding box most westerly point (longitude) as a double * coordinate. * * @return the most westerly coordinate inside this bounding box * @since 3.0.0 */ public final double north() { return northeast().latitude(); }
/** * Convenience method for getting the bounding box most easterly point (longitude) as a double * coordinate. * * @return the most easterly coordinate inside this bounding box * @since 3.0.0 */ public final double east() { return northeast().longitude(); }
/** * Convenience method for getting the bounding box most easterly point (longitude) as a double * coordinate. * * @return the most easterly coordinate inside this bounding box * @since 3.0.0 */ public final double east() { return northeast().longitude(); }
point = src.northeast(); unshiftedCoordinates = CoordinateShifterManager.getCoordinateShifter().unshiftPoint(point);
point = src.northeast(); unshiftedCoordinates = CoordinateShifterManager.getCoordinateShifter().unshiftPoint(point);
@Test public void northEast_doesReturnMostNortheastCoordinate() throws Exception { Point southwest = Point.fromLngLat(1.0, 2.0); Point northeast = Point.fromLngLat(3.0, 4.0); BoundingBox boundingBox = BoundingBox.fromPoints(southwest, northeast); assertTrue(northeast.equals(boundingBox.northeast())); }
@Test public void bbox_basic_shift() throws Exception { Point southwest = Point.fromLngLat(2.0, 2.0); Point northeast = Point.fromLngLat(4.0, 4.0); CoordinateShifter shifter = new TestCoordinateShifter(); // Manually shifted List<Double> shifted = shifter.shiftLonLat(southwest.longitude(), southwest.latitude()); Point southwestManualShifted = Point.fromLngLat(shifted.get(0), shifted.get(1)); shifted = shifter.shiftLonLat(northeast.longitude(), northeast.latitude()); Point northeastManualShifted = Point.fromLngLat(shifted.get(0), shifted.get(1)); CoordinateShifterManager.setCoordinateShifter(shifter); BoundingBox boundingBoxFromDouble = BoundingBox.fromLngLats(2.0, 2.0, 4.0, 4.0); BoundingBox boundingBoxFromPoints = BoundingBox.fromPoints(Point.fromLngLat(2.0, 2.0), Point.fromLngLat(4.0, 4.0)); assertEquals(boundingBoxFromDouble, boundingBoxFromPoints); assertEquals(southwestManualShifted, boundingBoxFromPoints.southwest()); assertEquals(northeastManualShifted, boundingBoxFromPoints.northeast()); CoordinateShifterManager.setCoordinateShifter(null); }