Terrainprofile

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Nov 7, 2026

Elevation, slope, terrain maps and 3D surfaces for any site, from global and regional DEM data.

概览

AI 生成的概览

本地桥接服务,把任意经纬度的高程、坡度、地形图与三维地形查询转发给托管的 Geospatial System 服务器。

可以做什么
  • 列出可用的高程数据集并取得 dataset id
  • 查询单个坐标的高程(米),或一次批量查询最多 100 个点
  • 获取 3x3、5x5、7x7 像素窗口内的高程与坡度统计(最小值、平均值、最大值)
  • 生成高程或坡度的范围箱线图,返回 PNG、SVG 或 PDF 图片链接
  • 生成叠加卫星影像、等高线、流向箭头与位置标记的复合地形图
  • 生成三维透视地形表面,输出 PNG 或 HTML
适用场景
适合需要场地级地形信息的场景:某点或一组点的高程、局部坡度,或某地点的地形图与三维表面可视化,无需离开助手即可完成。
运行要求
通过 npx(Node.js)或 Docker 镜像在本地运行,需要能访问托管的上游端点。可选环境变量 GEOSPATIAL_MCP_URL 覆盖端点;可选 GEOSPATIAL_API_KEY 以 Bearer Authorization 头发送。部分工具需要 Pro 或 Enterprise 密钥。
安装前请注意
桥接服务会把坐标转发给第三方托管服务,查询位置会离开本机。统计、图表、地图与三维工具需要付费的 Pro 或 Enterprise 密钥,没有密钥时这些调用会失败。API 密钥以 Authorization 头发送给上游。README 说明端点覆盖与密钥转发属于重建实现,未与原服务器核实。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Terrainprofile,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

terrainprofile

terrainprofile is a small local bridge to the hosted Geospatial System location-profile MCP server, which reads elevation data from global and regional DEM (digital elevation model) datasets. Give it a latitude and longitude plus a dataset id, and it answers with the elevation at that point, elevation and slope statistics over small neighbourhood windows, range-box charts, a composite terrain map, or a 3-D perspective surface of the site.

The bridge keeps no terrain data of its own. It serves the upstream server's tool list locally, exactly as captured from the live endpoint, and forwards each tool call upstream, returning the result untouched. The captured surface is read-only terrain data: there is no write, purchase, or account tool in it.

Tools

  • list_datasets — list all available elevation datasets on the server. Takes no arguments; call it first to get a dataset_id.
  • LP_Get_Elevation — elevation in metres at one coordinate. Required: lat, lon, dataset_id. Available on all tiers including Free.
  • LP_Get_Elevation_Batch — elevation for up to 100 points in one call. Required: queries, a list of objects with lat, lon, and dataset_id. Available on all tiers including Free.
  • LP_Get_Elevation_Stats — elevation statistics (min, average, max) for 3×3, 5×5 and 7×7 pixel windows centred on the coordinates. Required: lat, lon, dataset_id. Requires Pro or Enterprise key.
  • LP_Get_Slope_Stats — terrain slope statistics (min, average, max) in degrees for the same window sizes, WGS-84 corrected. Required: lat, lon, dataset_id. Requires Pro key.
  • LP_Get_Elevation_Chart — a range-box chart of elevation min/avg/max across the three window sizes, returned as a URL to the chart image. Required: lat, lon, dataset_id. Optional: fmt ("png" by default, also "svg" or "pdf"). Requires Pro key.
  • LP_Get_Slope_Chart — the same range-box chart for terrain slope. Required: lat, lon, dataset_id. Optional: fmt (default "png"). Requires Pro key.
  • LP_Get_Terrain_Map — a composite terrain map: satellite imagery plus smoothed contours with labels, flow-direction arrows, and a location pin, all in EPSG:3857. Required: lat, lon, dataset_id. Optional: offset (half-window pixels, default 20), n_arrows (flow arrow grid density, default 11), and fmt (default "png"). Requires Pro key.
  • LP_Get_Terrain_3D — a 3-D perspective terrain surface coloured by elevation, with a red spike pin marking the query location. Required: lat, lon, dataset_id. Optional: offset (default 20), elev_angle (camera elevation, default 45), azim_angle (camera azimuth, default 135), and fmt ("png" by default, or "html"). Requires Pro key.

Coordinates are decimal degrees in WGS-84.

Configuration

  • GEOSPATIAL_MCP_URL (optional) — override the upstream endpoint. Defaults to https://api.geospatialsystem.com/mcp. (The override hook is this rebuild's own labelled reconstruction.)
  • GEOSPATIAL_API_KEY (optional) — when set, every upstream request carries an Authorization: Bearer <key> header, for the caller's own Geospatial System key. The registry record for the original server declares a required secret Authorization header; the Bearer scheme and the forwarding from this env var are labelled reconstructions, because the original surface was captured keyless. When it is not set, no key header is sent.

Forwarding mechanics

On the first tool call the client opens a streamable HTTP session with the upstream: a JSON-RPC initialize request (protocolVersion 2025-03-26, clientInfo name terrainprofile), then a notifications/initialized notification, then the tools/call request carrying the caller's arguments unchanged. When the upstream answers initialize with an Mcp-Session-Id header, that value rides on every later request of the session, which is reused for the life of the process. Replies may arrive as plain JSON or as server-sent events; both are read.

Successful upstream results pass through verbatim, including any isError flag the upstream sets. Failures — a JSON-RPC error, a non-2xx status, an unreadable response, or a request that cannot be completed — come back as an isError result whose text starts with terrainprofile error: (this rendering is this rebuild's own labelled reconstruction).

CLI

Each tool is also a subcommand taking one JSON argument string:

bash
npx @reneturcios/terrainprofile list_datasetsnpx @reneturcios/terrainprofile LP_Get_Elevation '{"lat":37.7749,"lon":-122.4194,"dataset_id":"<id from list_datasets>"}'npx @reneturcios/terrainprofile LP_Get_Elevation_Batch '{"queries":[{"lat":37.7749,"lon":-122.4194,"dataset_id":"<id>"}]}'npx @reneturcios/terrainprofile LP_Get_Terrain_3D '{"lat":37.7749,"lon":-122.4194,"dataset_id":"<id>","fmt":"html"}'npx @reneturcios/terrainprofile --version

Exit codes: 0 on success, 1 on an isError result, 2 on a usage error.

MCP server

bash
npx -y @reneturcios/terrainprofile mcp

MCP client config:

json
{  "mcpServers": {    "terrainprofile": {      "command": "npx",      "args": ["-y", "@reneturcios/terrainprofile", "mcp"]    }  }}

Docker

bash
docker run -i ghcr.io/cloudcorprecords/terrainprofiledocker run --rm ghcr.io/cloudcorprecords/terrainprofile --version

The container's default command is mcp, so the first form is a stdio MCP server; any other arguments reach the CLI normally.

Development

bash
npm installnpm run buildnpm testnpm run dev

The test suite runs entirely against a stubbed JSON-RPC upstream — no live network calls.

License

MIT — see LICENSE.

来源:README.md,提交 0d49af4

工具

9

list_datasets

List all available elevation datasets on the Geospatial System server.

无需输入参数。

LP_Get_Elevation

Get the elevation in metres at a specific lat/lon coordinate. Available on all tiers including Free.

输入参数lat必填lon必填dataset_id必填

LP_Get_Elevation_Batch

Get elevation for up to 100 points in one call. Pass a list of objects: [{"lat":…,"lon":…,"dataset_id":…}, …] Available on all tiers including Free.

输入参数queries必填

LP_Get_Elevation_Stats

Get elevation statistics (Min, Average, Max) for 3×3, 5×5 and 7×7 pixel windows centred on the coordinates. Requires Pro or Enterprise key.

输入参数lat必填lon必填dataset_id必填

LP_Get_Slope_Stats

Get terrain slope statistics (Min, Average, Max) in degrees for 3×3, 5×5 and 7×7 pixel windows. WGS-84 corrected. Requires Pro key.

输入参数lat必填lon必填dataset_id必填

LP_Get_Elevation_Chart

Generate a range-box chart showing elevation Min/Avg/Max across three neighbourhood window sizes. Returns a URL to the chart image. Requires Pro key. Supports PNG / SVG / PDF.

输入参数fmtlat必填lon必填dataset_id必填

LP_Get_Slope_Chart

Generate a range-box chart showing terrain slope Min/Avg/Max across three neighbourhood window sizes. Returns a URL to the chart image. Requires Pro key. Supports PNG / SVG / PDF.

输入参数fmtlat必填lon必填dataset_id必填

LP_Get_Terrain_Map

Generate a composite terrain map: Google Hybrid satellite (EPSG:3857) + smoothed contours with labels + flow-direction arrows + location pin. All layers are reprojected to EPSG:3857 — no overlay mismatch. Requires Pro key. Supports PNG.

输入参数fmtlat必填lon必填offsetn_arrowsdataset_id必填

LP_Get_Terrain_3D

Generate a 3-D perspective terrain surface map (Plotly go.Surface) coloured by elevation with a red spike pin marking the query location. Requires Pro key. Supports PNG / HTML.

输入参数fmtlat必填lon必填offsetazim_angledataset_id必填elev_angle

版本历史

1
  1. v0.1.0最新Nov 4, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分