# NodeGIS
## 基本信息
- Slug: `nodegis-geo-mcp-server`
- Source: modelscope
- Publisher: @NodeGIS/geo-mcp-server
- Categories: location-services / data-platforms
- Hosted: No
- License: MIT License
- Source URL: https://www.modelscope.cn/mcp/servers/@NodeGIS/geo-mcp-server
## 简介
暂无描述。
## MCP Server 详情

# @zealgeo/mcp-geo-server
This is a geographic processing tool server based on the Model Context Protocol (MCP), providing spatial analysis functions such as coordinate system conversion, distance calculation, and area calculation.

## Installation

json
"geo-mcp-server": {
  "type": "stdio",
  "command": "npx",
  "args": [
    "-y",
    "@zealgeo/mcp-geo-server"
  ]
}


## Features
Supports conversion between the following coordinate systems:
- BD09 (Baidu Coordinate System)
- GCJ02 (Mars Coordinate System)
- WGS84 (GPS Coordinate System)
- Web Mercator (Web Mercator Projection)

Supported conversion methods:
- BD09 to/from GCJ02
- WGS84 to/from GCJ02
- BD09 to/from WGS84
- Web Mercator to/from Longitude/Latitude

Supported spatial calculations:
- Polyline distance calculation (supports meters, kilometers)
- Polygon area calculation (supports square meters, square kilometers, hectares)
- Supports multiple input coordinate systems (WGS84, GCJ02, BD09)

## MCP Tools

### mcp_geo_convert
A coordinate system conversion tool. Supports mutual conversion between BD09, GCJ02, WGS84, and Web Mercator.

Parameters:
- `method`: Conversion method
  - `BD09toGCJ02`: Baidu Coordinate System to Mars Coordinate System
  - `GCJ02toBD09`: Mars Coordinate System to Baidu Coordinate System
  - `WGS84toGCJ02`: WGS84 to Mars Coordinate System
  - `GCJ02toWGS84`: Mars Coordinate System to WGS84
  - `BD09toWGS84`: Baidu Coordinate System to WGS84
  - `WGS84toBD09`: WGS84 to Baidu Coordinate System
  - `WebMercatortoLngLat`: Web Mercator to Longitude/Latitude
  - `LngLattoWebMercator`: Longitude/Latitude to Web Mercator
- `longitude`: Longitude value
- `latitude`: Latitude value

### mcp_geo_calculate_distance
Calculates polyline distance. Performs planar distance calculation based on Web Mercator projection.

Parameters:
- `coordinates`: Array of polyline coordinate points `[[lon1,lat1], [lon2,lat2],...]`
- `unit`: Length unit (`meters` [default], `kilometers`)
- `coordType`: Input coordinate type (`WGS84` [default], `GCJ02`, `BD09`)

### mcp_geo_calculate_area
Calculates polygon area. Performs planar area calculation based on Web Mercator projection.

Parameters:
- `coordinates`: Array of polygon coordinate points `[[lon1,lat1], [lon2,lat2],...]`
- `unit`: Area unit (`square_meters` [default], `square_kilometers`, `hectares`)
- `coordType`: Input coordinate type (`WGS84` [default], `GCJ02`, `BD09`)

## Coordinate System Description

### BD09 (Baidu Coordinate System)
The coordinate system used by Baidu Maps, which is further encrypted based on GCJ02.

### GCJ02 (Mars Coordinate System)
A geographic information system coordinate system formulated by the National Administration of Surveying, Mapping, and Geoinformation of China, which is an encrypted version of WGS84.

### WGS84
The original GPS coordinate system, currently widely used in the GPS global satellite positioning system.

### Web Mercator
A projection coordinate system used for web maps, converting spherical coordinates to planar coordinates. It provides more accurate results when used for distance and area calculations.

## Notes
1. The accuracy of coordinate conversion depends on the quality of the original data.
2. For coordinates outside mainland China, WGS84 to GCJ02 conversion will return the original coordinates directly.
3. Web Mercator coordinates are typically in meters.
4. Distance and area calculations use planar calculation methods after Web Mercator projection, suitable for small to medium-scale calculations.
5. For very long distances or very large areas spanning continents, it is recommended to use spherical calculation methods.
6. Polygon area calculation does not require manual closure; the program will automatically handle the closure.

