Search in sources :

Example 1 with GeoCircle

use of org.apache.lucene.spatial3d.geom.GeoCircle in project lucene-solr by apache.

the class Geo3dShapeWGS84ModelRectRelationTest method testFailure2.

@Test
public void testFailure2() {
    final GeoBBox rect = GeoBBoxFactory.makeGeoBBox(planetModel, -74 * RADIANS_PER_DEGREE, -90 * RADIANS_PER_DEGREE, 0 * RADIANS_PER_DEGREE, 26 * RADIANS_PER_DEGREE);
    final GeoCircle circle = GeoCircleFactory.makeGeoCircle(planetModel, -87.3647352103 * RADIANS_PER_DEGREE, 52.3769709972 * RADIANS_PER_DEGREE, 1 * RADIANS_PER_DEGREE);
    assertTrue(GeoArea.DISJOINT == rect.getRelationship(circle));
// This is what the test failure claimed...
//assertTrue(GeoArea.CONTAINS == rect.getRelationship(circle));
//final GeoBBox bbox = getBoundingBox(circle);
//assertFalse(GeoArea.DISJOINT == rect.getRelationship(bbox));
}
Also used : GeoBBox(org.apache.lucene.spatial3d.geom.GeoBBox) GeoCircle(org.apache.lucene.spatial3d.geom.GeoCircle) Test(org.junit.Test)

Aggregations

GeoBBox (org.apache.lucene.spatial3d.geom.GeoBBox)1 GeoCircle (org.apache.lucene.spatial3d.geom.GeoCircle)1 Test (org.junit.Test)1