Geometry view = this.geometryFactory.createLinearRing( Utils.createBoxCoords( 0, 1000, 0, 1000 ) );
String featureCoords = "200 -1000,300 2000," // create a 3-linestring intersection on the LHS of the view, with the left edge of the view being the longest of the 3
+ "400 2000,400 500,410 500,410 2000," // create another intersection smaller than the negligible distance
+ "500 2000,500 500,900 500,900 2000," // and a third intersection on the top edge of the view
+ "900 3000,-1000 3000,-1000 -1000,200 -1000"; // and complete the linear ring, going round anti-clockwise to meet to first point
LinearRing featureBounds = this.geometryFactory.createLinearRing( Utils.createCoords( featureCoords ) );
Polygon featurePolygon = this.geometryFactory.createPolygon( featureBounds, null );
// These are the intersections we'd expect, given the above featureCoords
Collection<Geometry> expectedIntersections = new ArrayList<Geometry>();
expectedIntersections.add( this.geometryFactory.createLineString( Utils.createCoords( "0 0, 0 1000" ) ) );