index.d.ts 1.1 KB

123456789101112131415161718192021222324
  1. import { Feature, Geometry } from 'geojson';
  2. /**
  3. * Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than
  4. * the maximum dimension of the two source geometries and the intersection set is interior to
  5. * both source geometries.
  6. *
  7. * Boolean-Crosses returns t (TRUE) for only multipoint/polygon, multipoint/linestring, linestring/linestring, linestring/polygon, and linestring/multipolygon comparisons.
  8. * Other comparisons are not supported as they are outside the OpenGIS Simple Features spec and may give unexpected results.
  9. *
  10. * @function
  11. * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry
  12. * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry
  13. * @returns {boolean} true/false
  14. * @example
  15. * var line1 = turf.lineString([[-2, 2], [4, 2]]);
  16. * var line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
  17. *
  18. * var cross = turf.booleanCrosses(line1, line2);
  19. * //=true
  20. */
  21. declare function booleanCrosses(feature1: Feature<any> | Geometry, feature2: Feature<any> | Geometry): boolean;
  22. export { booleanCrosses, booleanCrosses as default };