get_geod_info
Retrieve detailed geodetic calculation data, including ellipsoid parameters and constants, using the GIS MCP Server tool for precise geospatial analysis.
Instructions
Get information about a geodetic calculation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | No | ||
| b | No | ||
| ellps | No | WGS84 | |
| f | No |
Implementation Reference
- src/gis_mcp/pyproj_functions.py:135-154 (handler)The handler function that implements the logic for the get_geod_info tool using pyproj.Geod to retrieve ellipsoid parameters.@gis_mcp.tool() def get_geod_info(ellps: str = "WGS84", a: Optional[float] = None, b: Optional[float] = None, f: Optional[float] = None) -> Dict[str, Any]: """Get information about a geodetic calculation.""" try: import pyproj geod = pyproj.Geod(ellps=ellps, a=a, b=b, f=f) return { "status": "success", "ellps": geod.ellps, "a": geod.a, "b": geod.b, "f": geod.f, "es": geod.es, "e": geod.e, "message": "Geodetic information retrieved successfully" } except Exception as e: logger.error(f"Error getting geodetic info: {str(e)}") raise ValueError(f"Failed to get geodetic info: {str(e)}")
- src/gis_mcp/pyproj_functions.py:32-42 (registration)Resource listing that registers 'get_geod_info' as one of the available geodetic operations.@gis_mcp.resource("gis://crs/geodetic") def get_geodetic_operations() -> Dict[str, List[str]]: """List available geodetic operations.""" return { "operations": [ "get_geod_info", "calculate_geodetic_distance", "calculate_geodetic_point", "calculate_geodetic_area" ] }