Skip to main content
Glama

get_crs_info

Retrieve coordinate reference system details to understand spatial data projections and transformations for accurate geospatial analysis.

Instructions

Get information about a CRS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
crsYes

Implementation Reference

  • The primary handler function for the 'get_crs_info' tool. It takes a CRS identifier as input and returns detailed information about the CRS using the pyproj library, including name, type, axis info, geographic/projected status, datum, ellipsoid, prime meridian, and area of use.
    @gis_mcp.tool() def get_crs_info(crs: str) -> Dict[str, Any]: """Get information about a CRS.""" try: import pyproj crs_obj = pyproj.CRS(crs) return { "status": "success", "name": crs_obj.name, "type": crs_obj.type_name, "axis_info": [axis.direction for axis in crs_obj.axis_info], "is_geographic": crs_obj.is_geographic, "is_projected": crs_obj.is_projected, "datum": str(crs_obj.datum), "ellipsoid": str(crs_obj.ellipsoid), "prime_meridian": str(crs_obj.prime_meridian), "area_of_use": str(crs_obj.area_of_use) if crs_obj.area_of_use else None, "message": "CRS information retrieved successfully" } except Exception as e: logger.error(f"Error getting CRS info: {str(e)}") raise ValueError(f"Failed to get CRS info: {str(e)}")
  • MCP resource endpoint that lists the available CRS-related tool operations under 'gis://crs/info', explicitly including 'get_crs_info'.
    @gis_mcp.resource("gis://crs/info") def get_crs_info_operations() -> Dict[str, List[str]]: """List available CRS information operations.""" return { "operations": [ "get_crs_info", "get_available_crs", "get_utm_zone", "get_utm_crs", "get_geocentric_crs" ] }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mahdin75/gis-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server