How to use the @turf/boolean-crosses function in @turf/boolean-crosses

To help you get started, we’ve selected a few @turf/boolean-crosses examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Turfjs / turf / packages / turf-boolean-valid / index.ts View on Github external
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
}

@turf/boolean-crosses

turf boolean-crosses module

MIT
Latest version published 3 months ago

Package Health Score

96 / 100
Full package analysis

Popular @turf/boolean-crosses functions