toWgs84
描述
🌐 Description
将墨卡托 (EPSG:900913) GeoJSON 对象转换为 WGS84 投影
🌐 Converts a Mercator (EPSG:900913) GeoJSON object into WGS84 projection
参数
🌐 Parameters
| 名称 | 类型 | 描述 |
|---|---|---|
| geojson | GeoJSON | 位置 | 墨卡托投影的 GeoJSON 对象 |
| options? | 对象 | 可选参数 (默认 {}) |
| options.mutate? | 布尔 | 允许修改 GeoJSON 输入 (如果为 true 性能会显著提升) (默认 false) |
返回
🌐 Returns
GeoJSON 投影的 GeoJSON
示例
🌐 Examples
var pt = turf.point([-7903683.846322424, 5012341.663847514]);
var converted = turf.toWgs84(pt);
安装
🌐 Installation
$ npm install @turf/projection
import { toWgs84 } from "@turf/projection";
const result = toWgs84(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.toWgs84(...);