Changed the edge intersection algorithm in PolygonSearch