Search in sources :

Example 1 with LeafDefault

use of com.github.davidmoten.rtree2.internal.LeafDefault in project rtree2 by davidmoten.

the class LeafTest method testMbr.

@Test
public void testMbr() {
    Rectangle r1 = Geometries.rectangle(0d, 1, 3, 5);
    Rectangle r2 = Geometries.rectangle(1d, 2, 4, 6);
    Rectangle r = new LeafDefault<Object, Rectangle>(Arrays.asList(Entries.entry(new Object(), r1), Entries.entry(new Object(), r2)), context).geometry().mbr();
    assertEquals(r1.add(r2), r);
}
Also used : LeafDefault(com.github.davidmoten.rtree2.internal.LeafDefault) Rectangle(com.github.davidmoten.rtree2.geometry.Rectangle) Test(org.junit.Test)

Aggregations

Rectangle (com.github.davidmoten.rtree2.geometry.Rectangle)1 LeafDefault (com.github.davidmoten.rtree2.internal.LeafDefault)1 Test (org.junit.Test)1