Rectangle boundingBox = Rectangle.fromBoundingCircle( center, radius );
Rectangle boundingBox = Rectangle.fromBoundingCircle( center, radius );
Point center = Point.fromDegrees( random.nextDouble() * 2 + 44 , random.nextDouble() * 2 + 3 ); double radius = 25.0d; Rectangle boundingBox = Rectangle.fromBoundingCircle( center, radius );
@Test public void boundingBoxTest() { Point center = Point.fromDegrees( 45, 4 ); Rectangle rectangle = Rectangle.fromBoundingCircle( center, 50 ); Assert.assertEquals( 44.550339, rectangle.getLowerLeft().getLatitude(), 0.000001d ); Assert.assertEquals( 3.359047, rectangle.getLowerLeft().getLongitude(), 0.000001d ); Assert.assertEquals( 45.449660, rectangle.getUpperRight().getLatitude(), 0.000001d ); Assert.assertEquals( 4.640952, rectangle.getUpperRight().getLongitude(), 0.000001d ); } }
Rectangle boundingBox = Rectangle.fromBoundingCircle( center, radius );
Rectangle boundingBox = Rectangle.fromBoundingCircle( center, radius );