Skip to main content
Glama

get_utm_crs

Convert geographic coordinates to UTM CRS (Coordinate Reference System) for precise geospatial analysis. Input coordinates to retrieve the accurate UTM projection.

Instructions

Get UTM CRS for given coordinates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coordinatesYes

Implementation Reference

  • The handler function for the 'get_utm_crs' tool. It takes a list of coordinates [lon, lat], queries pyproj database for the appropriate UTM CRS based on WGS84 datum and the area of interest defined by the point, extracts the WKT representation of the CRS, and returns it in a structured dictionary with status and message.
    @gis_mcp.tool() def get_utm_crs(coordinates: List[float]) -> Dict[str, Any]: """Get UTM CRS for given coordinates.""" try: import pyproj lon, lat = coordinates crs = pyproj.database.query_utm_crs_info( datum_name="WGS84", area_of_interest=pyproj.aoi.AreaOfInterest( west_lon_degree=lon, south_lat_degree=lat, east_lon_degree=lon, north_lat_degree=lat ) )[0].to_wkt() return { "status": "success", "crs": crs, "message": "UTM CRS retrieved successfully" } except Exception as e: logger.error(f"Error getting UTM CRS: {str(e)}") raise ValueError(f"Failed to get UTM CRS: {str(e)}")
  • Resource listing that registers 'get_utm_crs' as one of the available CRS information operations under gis://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" ] }

Other Tools

Related Tools

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