Skip to content

Commit e6d540a

Browse files
Merge pull request #2842 from IvoBiaus/earth-radius
Documented unit used for Earth's radius
2 parents 7ee0b1d + e0eefa1 commit e6d540a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/turf-helpers/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Type: ([Feature][7] | [FeatureCollection][8] | [Geometry][9] | [GeometryCollecti
4949

5050
## earthRadius
5151

52-
The Earth radius in kilometers. Used by Turf modules that model the Earth as a sphere. The [mean radius][11] was selected because it is [recommended ][12] by the Haversine formula (used by turf/distance) to reduce error.
52+
The Earth radius in meters. Used by Turf modules that model the Earth as a sphere. The [mean radius][11] was selected because it is [recommended ][12] by the Haversine formula (used by turf/distance) to reduce error.
5353

5454
Type: [number][13]
5555

packages/turf-helpers/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export type AllGeoJSON =
9797
| GeometryCollection;
9898

9999
/**
100-
* The Earth radius in kilometers. Used by Turf modules that model the Earth as a sphere. The {@link https://en.wikipedia.org/wiki/Earth_radius#Arithmetic_mean_radius mean radius} was selected because it is {@link https://rosettacode.org/wiki/Haversine_formula#:~:text=This%20value%20is%20recommended recommended } by the Haversine formula (used by turf/distance) to reduce error.
100+
* The Earth radius in meters. Used by Turf modules that model the Earth as a sphere. The {@link https://en.wikipedia.org/wiki/Earth_radius#Arithmetic_mean_radius mean radius} was selected because it is {@link https://rosettacode.org/wiki/Haversine_formula#:~:text=This%20value%20is%20recommended recommended } by the Haversine formula (used by turf/distance) to reduce error.
101101
*
102102
* @constant
103103
*/

0 commit comments

Comments
 (0)