Skip to main content
Glama
ava11235

DEM Terrain Analysis

by ava11235
README.md
# DEM Terrain Analysis MCP Server

AI-powered terrain analysis using deep learning super-resolution. Analyze any location on Earth for environmental risk, erosion potential, water flow patterns, and more.

## Tools

| Tool | Description |
|------|-------------|
| `analyze_terrain` | Get Site Intelligence Score and terrain metrics summary for any lat/lon |
| `get_full_terrain_data` | Get full super-resolved DEM + per-cell metric grids |
| `check_api_health` | Verify the API is running |

## What it does

Given a latitude/longitude, this MCP server:
1. Fetches 30m satellite elevation data
2. Runs AI super-resolution to produce 10m terrain (3× detail enhancement)
3. Computes 6 terrain analytics metrics including the **Site Intelligence Score**

## Metrics

- **flow_direction** — water drainage direction per cell (D8 algorithm)
- **flow_accumulation** — upstream drainage count
- **twi** — Topographic Wetness Index (saturation tendency)
- **erosion_risk** — soil erosion susceptibility [0-1]
- **runoff_potential** — surface water runoff likelihood [0-1]
- **site_intelligence_score** — composite environmental risk [0-1]

## Site Intelligence Score

A composite metric combining TWI, erosion risk, and runoff potential:
- 0.0–0.2: Low risk
- 0.2–0.4: Moderate
- 0.4–0.6: Elevated
- 0.6–0.8: High
- 0.8–1.0: Critical

## Installation

```json
{
  "mcpServers": {
    "dem-terrain": {
      "command": "uvx",
      "args": ["dem-terrain-mcp"]
    }
  }
}
```

Or run directly:
```bash
pip install dem-terrain-mcp
python -m dem_terrain_mcp
```

## Example usage

Ask your AI assistant:
> "Analyze the terrain at 48.7768, -121.8145 with a 500m bounding box"

Response includes elevation range, Site Intelligence Score with risk level, and all 6 terrain metrics.

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| latitude | float | yes | [-90, 90] |
| longitude | float | yes | [-180, 180] |
| bbox_size_m | int | no | Bounding box in meters [250-5000], default 500 |

## License

Proprietary. The terrain analysis API is a hosted service.

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation5/5

Each tool serves a distinct purpose: health check, summary analysis, and full data retrieval. No overlap in functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern: analyze_terrain, check_api_health, get_full_terrain_data.

Tool Count4/5

Three tools is reasonable for a focused terrain analysis server, covering health, summary, and full data. Could be expanded but not overly sparse.

Completeness4/5

The server covers the core workflow: health check, summary analysis, and detailed data retrieval. Missing features like listing available metrics or multiple locations, but not critical.

Maintenance

ActivityStale
ResponsivenessNo issues