index.d.ts 530 B

12345678910111213141516171819
  1. import { BBox } from 'geojson';
  2. /**
  3. * Takes a bounding box and calculates the minimum square bounding box that
  4. * would contain the input.
  5. *
  6. * @function
  7. * @param {BBox} bbox extent in [west, south, east, north] order
  8. * @returns {BBox} a square surrounding `bbox`
  9. * @example
  10. * const bbox = [-20, -20, -15, 0];
  11. * const squared = turf.square(bbox);
  12. *
  13. * //addToMap
  14. * const addToMap = [turf.bboxPolygon(bbox), turf.bboxPolygon(squared)]
  15. */
  16. declare function square(bbox: BBox): BBox;
  17. export { square as default, square };