I am using JTS in java I have a Polygon and a LineString , I can easy find the Coordinate where the LineString intersects the Polygon .
Geometry intersections = polygon.intersection(line);
for(Coordinate coor : intersections.getCoordinates()){
System.out.println("Intersects at "+coor);
}
But what i need is , the edges of the Polygon where the LineString Intersects the Polygon . Is there any way or any method which will return me the intersecting edges of a polygon with a Line ?
I guess you could get the boundaries of the polygon and then perform that intersection. Something like this :