How to use @turf/boolean-clockwise - 3 common examples

To help you get started, we’ve selected a few @turf/boolean-clockwise 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-rewind / index.js View on Github external
function rewindPolygon(coords, reverse) {
    // outer ring
    if (booleanClockwise(coords[0]) !== reverse) {
        coords[0].reverse();
    }
    // inner rings
    for (var i = 1; i < coords.length; i++) {
        if (booleanClockwise(coords[i]) === reverse) {
            coords[i].reverse();
        }
    }
}
github Turfjs / turf / packages / turf-rewind / index.js View on Github external
function rewindPolygon(coords, reverse) {
    // outer ring
    if (booleanClockwise(coords[0]) !== reverse) {
        coords[0].reverse();
    }
    // inner rings
    for (var i = 1; i < coords.length; i++) {
        if (booleanClockwise(coords[i]) === reverse) {
            coords[i].reverse();
        }
    }
}
github Turfjs / turf / packages / turf-rewind / index.js View on Github external
function rewindLineString(coords, reverse) {
    if (booleanClockwise(coords) === reverse) coords.reverse();
}

@turf/boolean-clockwise

turf boolean-clockwise module

MIT
Latest version published 4 months ago

Package Health Score

97 / 100
Full package analysis

Popular @turf/boolean-clockwise functions