Skip to main content
Glama

get_geocentric_crs

Convert specified coordinates to a geocentric coordinate reference system (CRS) using the GIS MCP Server, enabling accurate geospatial data transformation and analysis.

Instructions

Get geocentric CRS for given coordinates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coordinatesYes

Implementation Reference

  • The handler function implementing the get_geocentric_crs tool. It uses pyproj to query the geocentric CRS based on provided coordinates and returns the CRS in WKT format.
    @gis_mcp.tool() def get_geocentric_crs(coordinates: List[float]) -> Dict[str, Any]: """Get geocentric CRS for given coordinates.""" try: import pyproj lon, lat = coordinates crs = pyproj.database.query_geocentric_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": "Geocentric CRS retrieved successfully" } except Exception as e: logger.error(f"Error getting geocentric CRS: {str(e)}") raise ValueError(f"Failed to get geocentric CRS: {str(e)}")
  • MCP resource that lists available CRS information operations, registering 'get_geocentric_crs' as one of them.
    @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