@Test
public void testDistanceBetweenPointAndPolygon() throws
                                                 Exception {

    // given Point and Polygon
    final double distance1 = distanceTo(createPoint(gf,
                                                    47.225782d,
                                                    -1.554476d),
                                        createPolygon(gf,
                                                      createCoordinate(gf,
                                                                       47.226219d,
                                                                       -1.554430d),
                                                      createCoordinate(gf,
                                                                       47.226237d,
                                                                       -1.554261d),
                                                      createCoordinate(gf,
                                                                       47.226122d,
                                                                       -1.554245d),
                                                      createCoordinate(gf,
                                                                       47.226106d,
                                                                       -1.554411d),
                                                      createCoordinate(gf,
                                                                       47.226219d,
                                                                       -1.554430d)));
    // then the computed distance should be roughly equals to 36m
    assertEquals(36d,
                 distance1,
                 1d);
    // given Polygon and Point
    final double distance2 = distanceTo(createPolygon(gf,
                                                      createCoordinate(gf,
                                                                       47.226219d,
                                                                       -1.554430d),
                                                      createCoordinate(gf,
                                                                       47.226237d,
                                                                       -1.554261d),
                                                      createCoordinate(gf,
                                                                       47.226122d,
                                                                       -1.554245d),
                                                      createCoordinate(gf,
                                                                       47.226106d,
                                                                       -1.554411d),
                                                      createCoordinate(gf,
                                                                       47.226219d,
                                                                       -1.554430d)),
                                        createPoint(gf,
                                                    47.225782d,
                                                    -1.554476d));
    // then the computed distance should be roughly equals to 36m
    assertEquals(36d,
                 distance2,
                 1d);
}