blob: a00c8e6dc0301910784c0ffd11d99cbd701c0423 [file] [log] [blame]
Index: lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoBBoxTest.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoBBoxTest.java (revision 04956b8a9075e15b4d633d254e035b781694da1e)
+++ lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoBBoxTest.java (revision )
@@ -386,5 +386,19 @@
//System.out.println("XYZBounds = "+bounds+" is within? "+solid.isWithin(point)+" solid="+solid);
assertTrue(box.isWithin(point) == solid.isWithin(point));
}
+
+ @Test
+ public void testBoundsInBBox() {
+ //GeoRectangle: {planetmodel=PlanetModel.WGS84,
+ // toplat=0.4854856431295457(27.816278365517416),
+ // bottomlat=0.29482713153842366(16.89235032310004),
+ // leftlon=0.4485050866306014(25.697448554082825),
+ // rightlon=0.9639699672164269(55.231410698865595)}
+ GeoBBox bbox = GeoBBoxFactory.makeGeoBBox(PlanetModel.WGS84, 0.4854856431295457, 0.29482713153842366, 0.4485050866306014, 0.9639699672164269);
+ LatLonBounds bounds = new LatLonBounds();
+ bbox.getBounds(bounds);
+ GeoBBox bbox2 = GeoBBoxFactory.makeGeoBBox(PlanetModel.WGS84, bounds.getMaxLatitude(), bounds.getMinLatitude(), bounds.getLeftLongitude(), bounds.getRightLongitude());
+ assertEquals(bbox, bbox2);
+ }
}