public static boolean intersects(RectangleLineIntersector intersector, PointList pointList) {
        int len = pointList.size();
        if (len == 0)
            throw new IllegalArgumentException("PointList must not be empty");

        Coordinate coords = new Coordinate(pointList.getLon(0), pointList.getLat(0));
        if (len == 1)
            return intersector.intersects(coords, coords);

        for (int pointIndex = 1; pointIndex < len; pointIndex++) {
            Coordinate nextCoords = new Coordinate(pointList.getLon(pointIndex), pointList.getLat(pointIndex));
            if (intersector.intersects(coords, nextCoords))
                return true;
            coords = nextCoords;
        }
        return false;
    }
@Test
    public void testIntersect() {
        //    ---
        //    | |
        // ---------
        // |  | |  |
        // --------
        //    |_|
        //

        // use ISO 19115 standard (minLon, maxLon followed by minLat(south!),maxLat)
        assertTrue(new BBox(12, 15, 12, 15).intersects(new BBox(13, 14, 11, 16)));
        // assertFalse(new BBox(15, 12, 12, 15).intersects(new BBox(16, 15, 11, 14)));

        // DOES NOT WORK: use bottom to top coord for lat
        // assertFalse(new BBox(6, 2, 11, 6).intersects(new BBox(5, 3, 12, 5)));
        // so, use bottom-left and top-right corner!
        assertTrue(new BBox(2, 6, 6, 11).intersects(new BBox(3, 5, 5, 12)));

        // DOES NOT WORK: use bottom to top coord for lat and right to left for lon
        // assertFalse(new BBox(6, 11, 11, 6).intersects(new BBox(5, 10, 12, 7)));
        // so, use bottom-right and top-left corner
        assertTrue(new BBox(6, 11, 6, 11).intersects(new BBox(7, 10, 5, 12)));
    }