index.d.cts 971 B

123456789101112131415161718192021222324252627
  1. import { Feature, Geometry } from 'geojson';
  2. /**
  3. * Determine whether two geometries of the same type have identical X,Y coordinate values.
  4. * See http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm
  5. *
  6. * @function
  7. * @param {Geometry|Feature} feature1 GeoJSON input
  8. * @param {Geometry|Feature} feature2 GeoJSON input
  9. * @param {Object} [options={}] Optional parameters
  10. * @param {number} [options.precision=6] decimal precision to use when comparing coordinates
  11. * @returns {boolean} true if the objects are equal, false otherwise
  12. * @example
  13. * var pt1 = turf.point([0, 0]);
  14. * var pt2 = turf.point([0, 0]);
  15. * var pt3 = turf.point([1, 1]);
  16. *
  17. * turf.booleanEqual(pt1, pt2);
  18. * //= true
  19. * turf.booleanEqual(pt2, pt3);
  20. * //= false
  21. */
  22. declare function booleanEqual(feature1: Feature<any> | Geometry, feature2: Feature<any> | Geometry, options?: {
  23. precision?: number;
  24. }): boolean;
  25. export { booleanEqual, booleanEqual as default };