10 lines
513 B
TypeScript
10 lines
513 B
TypeScript
import { Feature, LineString, Polygon } from "geojson";
|
|
import { CartesianPoint } from "../common";
|
|
/**
|
|
* Calculates the centroid of a GeoJSON Polygon or LineString in Web Mercator
|
|
|
|
* @param {Feature<Polygon | LineString>} feature - The GeoJSON Feature containing either a Polygon or LineString
|
|
* @returns {{ x: number, y: number }} The centroid of the polygon or line string in Web Mercator coordinates.
|
|
*/
|
|
export declare function webMercatorCentroid(feature: Feature<Polygon | LineString>): CartesianPoint;
|