@Test
public void testDistanceBetweenLineStringAndPolygon() throws
                                                      Exception {

    // given LineString and Polygon
    final double distance1 = distanceTo(createLineString(gf,
                                                         createCoordinate(gf,
                                                                          47.226468d,
                                                                          -1.554996d),
                                                         createCoordinate(gf,
                                                                          47.226600d,
                                                                          -1.554846d)),
                                        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 59m
    assertEquals(58d,
                 distance1,
                 1d);
    // given Polygon and LineString
    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)),
                                        createLineString(gf,
                                                         createCoordinate(gf,
                                                                          47.226468d,
                                                                          -1.554996d),
                                                         createCoordinate(gf,
                                                                          47.226600d,
                                                                          -1.554846d)));
    // then the computed distance should be roughly equals to 59m
    assertEquals(58d,
                 distance2,
                 1d);
}