How to use the @turf/polygon-to-line.polygonToLine function in @turf/polygon-to-line

To help you get started, we’ve selected a few @turf/polygon-to-line 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-crosses / index.ts View on Github external
function doLineStringAndPolygonCross(lineString, polygon: Polygon) {
    const line: any = polygonToLine(polygon);
    const doLinesIntersect = lineIntersect(lineString, line);
    if (doLinesIntersect.features.length > 0) {
        return true;
    }
    return false;
}

@turf/polygon-to-line

turf polygon-to-line module

MIT
Latest version published 3 years ago

Package Health Score

78 / 100
Full package analysis