GeoCircle extends Primitive { @Override public boolean overlaps(@Nonnull final GeoArea area) { final boolean overlap = area.boundingBox().overlaps(boundingBox()); return overlap; } GeoCircle(
            @Nonnull final GeoPoint center,
            @Nonnull final Double radiusMeters);  GeoCircle(
            @Nonnull final GeoPoint center,
            @Nonnull final GeoPoint point); @SuppressWarnings({"ConstantConditions", "UnusedDeclaration"}) @Deprecated private  GeoCircle(); @Override @Nonnull GeoPoint getCenter(); @Nonnull Double getRadiusMeters(); @Nonnull GeoCircle withCenter(@Nonnull final GeoPoint center); @Nonnull GeoCircle withRadiusMeters(@Nonnull final Double radiusMeters); @Override boolean overlaps(@Nonnull final GeoArea area); @Override boolean contains(@Nonnull final GeoArea area); @Override boolean contains(@Nonnull final GeoPoint point); @Override @Nonnull GeoRectangle boundingBox(); @Nonnull @Override GeoCircle translate(@Nonnull final GeoVector vector); @Nonnull @Override GeoCircle moveTo(@Nonnull final GeoPoint origin); @Override @Nonnull Collection<GeoRectangle> pixelate(); @Nonnull GeoRectangle innerBoundingBox(); @Override boolean canEqual(@Nonnull final Object obj); @Override boolean equals(@Nullable final Object obj); @Override int hashCode();  }
@Test public void testOverlaps() { LOG.info("testOverlaps"); final GeoCircle a1 = new GeoCircle(new GeoPoint(0.0, 0.0), Geo.degreesLonToMetersAtLat(0.5, 0.0)); final GeoCircle a2 = new GeoCircle(new GeoPoint(0.0, 0.0), Geo.degreesLonToMetersAtLat(1.0, 0.0)); final GeoCircle a3 = new GeoCircle(new GeoPoint(0.0, 0.0), Geo.degreesLonToMetersAtLat(1.5, 0.0)); final GeoCircle a4 = new GeoCircle(new GeoPoint(0.0, 0.0), Geo.degreesLonToMetersAtLat(2.0, 0.0)); Assert.assertTrue(a1.overlaps(a1)); Assert.assertTrue(a1.overlaps(a2)); Assert.assertTrue(a1.overlaps(a3)); Assert.assertTrue(a1.overlaps(a4)); final GeoCircle b1 = new GeoCircle(new GeoPoint(2.0, 0.0), Geo.degreesLonToMetersAtLat(0.5, 0.0)); final GeoCircle b2 = new GeoCircle(new GeoPoint(2.0, 0.0), Geo.degreesLonToMetersAtLat(1.0, 0.0)); final GeoCircle b3 = new GeoCircle(new GeoPoint(2.0, 0.0), Geo.degreesLonToMetersAtLat(1.5, 0.0)); Assert.assertTrue(b1.overlaps(b1)); Assert.assertTrue(b1.overlaps(b2)); Assert.assertTrue(b1.overlaps(b3)); Assert.assertFalse(a1.overlaps(b1)); Assert.assertFalse(a1.overlaps(b2)); Assert.assertFalse(a2.overlaps(b1)); Assert.assertTrue(a2.overlaps(b2)); Assert.assertTrue(a2.overlaps(b3)); Assert.assertTrue(a3.overlaps(b1)); Assert.assertTrue(a3.overlaps(b2)); Assert.assertTrue(a3.overlaps(b3)); Assert.assertTrue(a4.overlaps(b1)); Assert.assertTrue(a4.overlaps(b2)); Assert.assertTrue(a4.overlaps(b3)); final GeoCircle c2 = new GeoCircle(new GeoPoint(1.0, 1.0), Geo.degreesLonToMetersAtLat(1, 0)); Assert.assertTrue(a1.overlaps(c2)); Assert.assertTrue(a2.overlaps(c2)); Assert.assertTrue(a3.overlaps(c2)); }