unit_conversion_toWgs84
Convert Web Mercator projection coordinates (EPSG:3857) to WGS84 geographic coordinates for accurate geospatial data processing and coordinate system transformation.
Instructions
将墨卡托投影坐标转换为地理坐标。
此功能将Web墨卡托投影坐标(EPSG:3857)转换为WGS84地理坐标。
Args: geojson: GeoJSON对象 - 类型: str (JSON 字符串格式的 GeoJSON) - 格式: 任何有效的 GeoJSON 对象(墨卡托投影坐标) - 示例: '{"type": "Point", "coordinates": [-8385846.33, 4852834.51]}'
Returns: str: JSON 字符串格式的WGS84地理坐标 GeoJSON - 类型: 相同的 GeoJSON 类型,但坐标为WGS84地理坐标 - 格式: {"type": "Point", "coordinates": [lng, lat]} - 示例: '{"type": "Point", "coordinates": [-75.343, 39.984]}'
Raises: Exception: 当 JavaScript 执行失败、超时或输入数据格式错误时抛出异常
Example: >>> import asyncio >>> geojson = '{"type": "Point", "coordinates": [-8385846.33, 4852834.51]}' >>> result = asyncio.run(toWgs84(geojson)) >>> print(result) '{"type": "Point", "coordinates": [-75.343, 39.984]}'
Notes: - 输入坐标必须是Web墨卡托投影坐标(EPSG:3857) - 输出坐标为WGS84地理坐标(经度/纬度) - 常用于坐标系统转换 - 依赖于 Turf.js 库和 Node.js 环境
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| geojson | Yes |