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

To help you get started, we’ve selected a few @turf/boolean-equal 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 terascope / teraslice / packages / xlucene-evaluator / src / parser / functions / geo / helpers.ts View on Github external
return (fieldData: JoinGeoShape) => {
        let polygon: any;
        if (isGeoShapePoint(fieldData)) {
            return equal(searchPoint, tPoint(fieldData.coordinates));
        }

        if (isGeoShapeMultiPolygon(fieldData)) {
            polygon = multiPolygon(fieldData.coordinates);
        }

        if (isGeoShapePolygon(fieldData)) {
            polygon = tPolygon(fieldData.coordinates);
        }
        // Nothing matches so return false
        if (!polygon) return false;
        return pointInPolygon(searchPoint, polygon);
    };
}

@turf/boolean-equal

turf boolean-equal module

MIT
Latest version published 3 months ago

Package Health Score

96 / 100
Full package analysis

Popular @turf/boolean-equal functions