How to use the @turf/boolean-contains.default function in @turf/boolean-contains

To help you get started, we’ve selected a few @turf/boolean-contains 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 simonepri / geojson-geometries-lookup / index.js View on Github external
const dim = this.D[d];
      if (dim.lookup === null) {
        continue;
      }

      const bbox = tbbox(geometry);
      const bboxs = dim.lookup.search({
        minX: bbox[0],
        minY: bbox[1],
        maxX: bbox[2],
        maxY: bbox[3]
      });

      for (let i = 0, len = bboxs.length; i < len; i++) {
        const geom = dim.list[bboxs[i].id];
        if (!tcontains(geom, geometry)) {
          continue;
        }

        func(geom, count);
        count++;
        if (options.limit > 0 && options.limit === count) {
          return count;
        }
      }
    }

    return count;
  }
github geosolutions-it / MapStore2 / web / client / utils / CoordinatesUtils.js View on Github external
    isBboxCompatible: (extent1, extent2) => overlap(extent1, extent2) || contains(extent1, extent2) || contains(extent2, extent1)
github geosolutions-it / MapStore2 / web / client / utils / CoordinatesUtils.js View on Github external
isPointInsideExtent: (point = {lat: 1, lng: 1}, extent) => {
        return contains(getPolygonFromExtent(extent), toPoint([point.lng, point.lat]));
    },
    isBboxCompatible: (extent1, extent2) => overlap(extent1, extent2) || contains(extent1, extent2) || contains(extent2, extent1)

@turf/boolean-contains

turf boolean-contains module

MIT
Latest version published 4 months ago

Package Health Score

94 / 100
Full package analysis

Popular @turf/boolean-contains functions