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 產生的概覽

本機橋接服務,把任意經緯度的高程、坡度、地形圖與 3D 地形查詢轉送到託管的 Geospatial System 伺服器。

可以做什麼
  • 列出可用的高程資料集並取得 dataset id
  • 查詢單一座標的高程(公尺),或一次批次查詢最多 100 個點
  • 取得 3x3、5x5、7x7 像素視窗內的高程與坡度統計(最小值、平均值、最大值)
  • 產生高程或坡度的範圍箱型圖,回傳 PNG、SVG 或 PDF 圖片連結
  • 產生疊加衛星影像、等高線、流向箭頭與位置標記的複合地形圖
  • 產生 3D 透視地形表面,輸出 PNG 或 HTML
適用情境
適合需要場址地形資訊的情境:某點或一組點的高程、局部坡度,或某地點的地形圖與 3D 表面視覺化,不必離開助理即可完成。
執行需求
透過 npx(Node.js)或 Docker 映像在本機執行,需要能連線到託管的上游端點。選用環境變數 GEOSPATIAL_MCP_URL 可覆寫端點;選用 GEOSPATIAL_API_KEY 會以 Bearer Authorization 標頭送出。部分工具需要 Pro 或 Enterprise 金鑰。
安裝前請注意
橋接服務會把座標轉送給第三方託管服務,查詢位置會離開本機。統計、圖表、地圖與 3D 工具需要付費的 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 分