12345678910111213141516171819202122232425262728293031323334353637 |
- import { AllGeoJSON, Position } from "@turf/helpers";
- /**
- * Converts a WGS84 GeoJSON object into Mercator (EPSG:900913) projection
- *
- * @name toMercator
- * @param {GeoJSON|Position} geojson WGS84 GeoJSON object
- * @param {Object} [options] Optional parameters
- * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
- * @returns {GeoJSON} Projected GeoJSON
- * @example
- * var pt = turf.point([-71,41]);
- * var converted = turf.toMercator(pt);
- *
- * //addToMap
- * var addToMap = [pt, converted];
- */
- export declare function toMercator<G = AllGeoJSON | Position>(geojson: G, options?: {
- mutate?: boolean;
- }): G;
- /**
- * Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection
- *
- * @name toWgs84
- * @param {GeoJSON|Position} geojson Mercator GeoJSON object
- * @param {Object} [options] Optional parameters
- * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
- * @returns {GeoJSON} Projected GeoJSON
- * @example
- * var pt = turf.point([-7903683.846322424, 5012341.663847514]);
- * var converted = turf.toWgs84(pt);
- *
- * //addToMap
- * var addToMap = [pt, converted];
- */
- export declare function toWgs84<G = AllGeoJSON | Position>(geojson: G, options?: {
- mutate?: boolean;
- }): G;
|