I have a big polygon and I want to find intersecting features with the polygon but since polygon is too big, I am getting timeout exception.
I was trying to look into JTS methods but couldn't get how to use it.
final List<Coordinate> coordinates = List.of(new Coordinate(0, 0), new Coordinate(-1, 1),
new Coordinate(1, 3), new Coordinate(2, 3), new Coordinate(3, 1), new Coordinate(0, 0));
final GeometryFactory factory = new GeometryFactory();
final Polygon polygon = factory.createPolygon(coordinates.toArray(new Coordinate[0]));
final Geometry envelope = polygon.getEnvelope();
Can someone give me pointers on how to split the polygon object?