transformation_circle
Create circular geographic areas from center points and radius values. Generate GeoJSON polygon features for mapping and spatial analysis applications with customizable precision and measurement units.
Instructions
根据中心点和半径创建圆形区域。
此功能以指定的中心点和半径生成一个圆形多边形区域,可以控制圆形的平滑度和单位。
Args: center: 中心点 GeoJSON Point 特征或几何图形 - 类型: str (JSON 字符串格式的 GeoJSON) - 格式: 必须符合 GeoJSON Point 规范或坐标数组 - 坐标系: WGS84 (经度在前,纬度在后) - 示例: '{"type": "Point", "coordinates": [-75.343, 39.984]}' 或 '[-75.343, 39.984]'
Returns: str: JSON 字符串格式的圆形 GeoJSON Polygon 特征 - 类型: GeoJSON Feature with Polygon geometry - 格式: {"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [...]}} - 示例: '{"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[-75.35, 39.99], [-75.34, 39.99], ...]]}}'
Raises: Exception: 当 JavaScript 执行失败、超时或输入数据格式错误时抛出异常
Example: >>> import asyncio >>> center = '{"type": "Point", "coordinates": [-75.343, 39.984]}' >>> options = '{"steps": 32, "units": "miles"}' >>> result = asyncio.run(circle(center, 5.0, options)) >>> print(result) '{"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[-75.35, 39.99], [-75.34, 39.99], ...]]}}'
Notes: - 输入参数 center 和 options 必须是有效的 JSON 字符串 - 坐标顺序为 [经度, 纬度] (WGS84 坐标系) - steps 参数控制圆的平滑度,值越大圆越平滑 - 依赖于 Turf.js 库和 Node.js 环境
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| center | Yes | ||
| options | No | ||
| radius | Yes |