Skip to main content
Glama
es3154
by es3154

interpolation_planepoint

Calculate the interpolated z-value of a point within a triangular plane using the z-values of the triangle's three vertices for spatial elevation analysis.

Instructions

计算点在三角形平面上的z值。

此功能根据三角形三个顶点的z值,计算给定点在三角形平面上的插值z值。

Args: point: 点特征 - 类型: str (JSON 字符串格式的 GeoJSON Feature) - 格式: Feature with Point geometry - 示例: '{"type": "Feature", "geometry": {"type": "Point", "coordinates": [-75.3221, 39.529]}}'

triangle: 三角形特征 - 类型: str (JSON 字符串格式的 GeoJSON Feature) - 格式: Feature with Polygon geometry (必须包含三个顶点) - 示例: '{"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[-75.1221, 39.57], [-75.58, 39.18], [-75.97, 39.86], [-75.1221, 39.57]]]}, "properties": {"a": 11, "b": 122, "c": 44}}'

Returns: str: JSON 字符串格式的z值结果 - 类型: 包含 value 的对象 - 格式: {"value": z值} - 示例: '{"value": 35.5}'

Raises: Exception: 当 JavaScript 执行失败、超时或输入数据格式错误时抛出异常

Example: >>> import asyncio >>> point = '{"type": "Feature", "geometry": {"type": "Point", "coordinates": [-75.3221, 39.529]}}' >>> triangle = '{"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[-75.1221, 39.57], [-75.58, 39.18], [-75.97, 39.86], [-75.1221, 39.57]]]}, "properties": {"a": 11, "b": 122, "c": 44}}' >>> result = asyncio.run(planepoint(point, triangle)) >>> print(result) '{"value": 35.5}'

Notes: - 输入参数 point 和 triangle 必须是有效的 JSON 字符串 - 坐标顺序为 [经度, 纬度] (WGS84 坐标系) - 三角形必须包含三个顶点,且首尾坐标相同形成闭合环 - 三角形属性'a', 'b', 'c'分别对应三个顶点的z值 - 依赖于 Turf.js 库和 Node.js 环境

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pointYes
triangleYes

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/es3154/turf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server