NodeGIS
服务介绍
@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 methodBD09toGCJ02: Baidu Coordinate System to Mars Coordinate SystemGCJ02toBD09: Mars Coordinate System to Baidu Coordinate SystemWGS84toGCJ02: WGS84 to Mars Coordinate SystemGCJ02toWGS84: Mars Coordinate System to WGS84BD09toWGS84: Baidu Coordinate System to WGS84WGS84toBD09: WGS84 to Baidu Coordinate SystemWebMercatortoLngLat: Web Mercator to Longitude/LatitudeLngLattoWebMercator: Longitude/Latitude to Web Mercator
longitude: Longitude valuelatitude: 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
- The accuracy of coordinate conversion depends on the quality of the original data.
- For coordinates outside mainland China, WGS84 to GCJ02 conversion will return the original coordinates directly.
- Web Mercator coordinates are typically in meters.
- Distance and area calculations use planar calculation methods after Web Mercator projection, suitable for small to medium-scale calculations.
- For very long distances or very large areas spanning continents, it is recommended to use spherical calculation methods.
- Polygon area calculation does not require manual closure; the program will automatically handle the closure.