index.d.cts 725 B

123456789101112131415161718192021
  1. import { AllGeoJSON } from '@turf/helpers';
  2. import { FeatureCollection, Point } from 'geojson';
  3. /**
  4. * Takes a feature or set of features and returns all positions as {@link Point|points}.
  5. *
  6. * @function
  7. * @param {GeoJSON} geojson input features
  8. * @returns {FeatureCollection<point>} points representing the exploded input features
  9. * @throws {Error} if it encounters an unknown geometry type
  10. * @example
  11. * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);
  12. *
  13. * var explode = turf.explode(polygon);
  14. *
  15. * //addToMap
  16. * var addToMap = [polygon, explode]
  17. */
  18. declare function explode(geojson: AllGeoJSON): FeatureCollection<Point>;
  19. export { explode as default, explode };