Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function checkPolygonAgainstOthers(poly, geom, index) {
var polyToCheck = polygon(poly)
for (var i = index + 1; i < geom.length; i++) {
if (!booleanDisjoint(polyToCheck, polygon(geom[i]))) {
if (booleanCrosses(polyToCheck, lineString(geom[i][0]))) return false
}
}
return true
}