You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
3.7 KiB
81 lines
3.7 KiB
/**
|
|
* Get the great circle distance (in meters) between two geographic coordinates.
|
|
* @param {Array} c1 Starting coordinate.
|
|
* @param {Array} c2 Ending coordinate.
|
|
* @param {number} [radius] The sphere radius to use. Defaults to the Earth's
|
|
* mean radius using the WGS84 ellipsoid.
|
|
* @return {number} The great circle distance between the points (in meters).
|
|
* @api
|
|
*/
|
|
export function getDistance(c1: any[], c2: any[], radius?: number | undefined): number;
|
|
/**
|
|
* Get the spherical length of a geometry. This length is the sum of the
|
|
* great circle distances between coordinates. For polygons, the length is
|
|
* the sum of all rings. For points, the length is zero. For multi-part
|
|
* geometries, the length is the sum of the length of each part.
|
|
* @param {import("./geom/Geometry.js").default} geometry A geometry.
|
|
* @param {SphereMetricOptions} [options] Options for the
|
|
* length calculation. By default, geometries are assumed to be in 'EPSG:3857'.
|
|
* You can change this by providing a `projection` option.
|
|
* @return {number} The spherical length (in meters).
|
|
* @api
|
|
*/
|
|
export function getLength(geometry: import("./geom/Geometry.js").default, options?: SphereMetricOptions | undefined): number;
|
|
/**
|
|
* Get the spherical area of a geometry. This is the area (in meters) assuming
|
|
* that polygon edges are segments of great circles on a sphere.
|
|
* @param {import("./geom/Geometry.js").default} geometry A geometry.
|
|
* @param {SphereMetricOptions} [options] Options for the area
|
|
* calculation. By default, geometries are assumed to be in 'EPSG:3857'.
|
|
* You can change this by providing a `projection` option.
|
|
* @return {number} The spherical area (in square meters).
|
|
* @api
|
|
*/
|
|
export function getArea(geometry: import("./geom/Geometry.js").default, options?: SphereMetricOptions | undefined): number;
|
|
/**
|
|
* Returns the coordinate at the given distance and bearing from `c1`.
|
|
*
|
|
* @param {import("./coordinate.js").Coordinate} c1 The origin point (`[lon, lat]` in degrees).
|
|
* @param {number} distance The great-circle distance between the origin
|
|
* point and the target point.
|
|
* @param {number} bearing The bearing (in radians).
|
|
* @param {number} [radius] The sphere radius to use. Defaults to the Earth's
|
|
* mean radius using the WGS84 ellipsoid.
|
|
* @return {import("./coordinate.js").Coordinate} The target point.
|
|
*/
|
|
export function offset(c1: import("./coordinate.js").Coordinate, distance: number, bearing: number, radius?: number | undefined): import("./coordinate.js").Coordinate;
|
|
/**
|
|
* Object literal with options for the {@link getLength} or {@link getArea}
|
|
* functions.
|
|
* @typedef {Object} SphereMetricOptions
|
|
* @property {import("./proj.js").ProjectionLike} [projection='EPSG:3857']
|
|
* Projection of the geometry. By default, the geometry is assumed to be in
|
|
* Web Mercator.
|
|
* @property {number} [radius=6371008.8] Sphere radius. By default, the
|
|
* [mean Earth radius](https://en.wikipedia.org/wiki/Earth_radius#Mean_radius)
|
|
* for the WGS84 ellipsoid is used.
|
|
*/
|
|
/**
|
|
* The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid.
|
|
* https://en.wikipedia.org/wiki/Earth_radius#Mean_radius
|
|
* @type {number}
|
|
*/
|
|
export const DEFAULT_RADIUS: number;
|
|
/**
|
|
* Object literal with options for the {@link getLength } or {@link getArea }
|
|
* functions.
|
|
*/
|
|
export type SphereMetricOptions = {
|
|
/**
|
|
* Projection of the geometry. By default, the geometry is assumed to be in
|
|
* Web Mercator.
|
|
*/
|
|
projection?: import("./proj.js").ProjectionLike;
|
|
/**
|
|
* Sphere radius. By default, the
|
|
* [mean Earth radius](https://en.wikipedia.org/wiki/Earth_radius#Mean_radius)
|
|
* for the WGS84 ellipsoid is used.
|
|
*/
|
|
radius?: number | undefined;
|
|
};
|
|
//# sourceMappingURL=sphere.d.ts.map
|