index.d.ts 1.1 KB

1234567891011121314151617181920212223242526272829
  1. import { Coord, Feature, LineString, Units } from "@turf/helpers";
  2. /**
  3. * Creates a circular arc, of a circle of the given radius and center point, between bearing1 and bearing2;
  4. * 0 bearing is North of center point, positive clockwise.
  5. *
  6. * @name lineArc
  7. * @param {Coord} center center point
  8. * @param {number} radius radius of the circle
  9. * @param {number} bearing1 angle, in decimal degrees, of the first radius of the arc
  10. * @param {number} bearing2 angle, in decimal degrees, of the second radius of the arc
  11. * @param {Object} [options={}] Optional parameters
  12. * @param {number} [options.steps=64] number of steps
  13. * @param {string} [options.units='kilometers'] miles, kilometers, degrees, or radians
  14. * @returns {Feature<LineString>} line arc
  15. * @example
  16. * var center = turf.point([-75, 40]);
  17. * var radius = 5;
  18. * var bearing1 = 25;
  19. * var bearing2 = 47;
  20. *
  21. * var arc = turf.lineArc(center, radius, bearing1, bearing2);
  22. *
  23. * //addToMap
  24. * var addToMap = [center, arc]
  25. */
  26. export default function lineArc(center: Coord, radius: number, bearing1: number, bearing2: number, options?: {
  27. steps?: number;
  28. units?: Units;
  29. }): Feature<LineString>;