How to use the @turf/intersect.default function in @turf/intersect

To help you get started, we’ve selected a few @turf/intersect 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 stvno / worlda11y / calculate-eta / index.js View on Github external
var squareTasks = squares.map(square => {
    // Clip the square with the input geometry. In this way we work with a
    // smaller area..
    let workArea = intersect(adminArea, square);
    return createProcessAreaTask(workArea, poi, origins, osrm, maxTime, maxSpeed, id);
  });
github noncomputable / AgentMaps / src / buildings.js View on Github external
function noOverlaps(reference_polygon_feature, polygon_feature_array) {
	for (feature_array_element of polygon_feature_array) {
		let overlap_exists = intersect(reference_polygon_feature, feature_array_element);
		if (overlap_exists) {
			return false;
		}
	}

	return true;
}
github noncomputable / AgentMaps / tool / browserlessbuildings.js View on Github external
function noOverlaps(reference_polygon_feature, polygon_feature_array) {
	for (feature_array_element of polygon_feature_array) {
		let overlap_exists = intersect(reference_polygon_feature, feature_array_element);
		if (overlap_exists) {
			return false;
		}
	}

	return true;
}
github ngageoint / geopackage-js / lib / features / user / featureDao.js View on Github external
function verifyFeature(geometry, boundingBox) {
  try {
    if (geometry.type == 'Point') {
      return geometry;
    } else if (geometry.type == 'LineString') {
      var intersect = LineIntersect(geometry, boundingBox.toGeoJSON().geometry);
      if (intersect.features.length) {
        return geometry;
      } else if (BooleanWithin(geometry, boundingBox.toGeoJSON().geometry)) {
        return geometry;
      }
    } else if (geometry.type == 'Polygon') {
      var polyIntersect = Intersect(geometry, boundingBox.toGeoJSON().geometry);
      if (polyIntersect) {
        return geometry;
      } else if (BooleanWithin(geometry, boundingBox.toGeoJSON().geometry)) {
        return geometry;
      }
    }
  } catch (e) {}
}

@turf/intersect

turf intersect module

MIT
Latest version published 3 months ago

Package Health Score

96 / 100
Full package analysis

Popular @turf/intersect functions