calculate_geodetic_point
Calculate geodetic point coordinates at a specified distance and azimuth from a starting point using the GIS MCP Server for precise geospatial analysis.
Instructions
Calculate point at given distance and azimuth.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| azimuth | Yes | ||
| distance | Yes | ||
| ellps | No | WGS84 | |
| start_point | Yes |
Implementation Reference
- src/gis_mcp/pyproj_functions.py:178-196 (handler)The core handler function for the 'calculate_geodetic_point' tool, decorated with @gis_mcp.tool(). It uses pyproj.Geod.fwd to compute the destination longitude, latitude, and back azimuth from a starting point, azimuth, and distance.@gis_mcp.tool() def calculate_geodetic_point(start_point: List[float], azimuth: float, distance: float, ellps: str = "WGS84") -> Dict[str, Any]: """Calculate point at given distance and azimuth.""" try: import pyproj geod = pyproj.Geod(ellps=ellps) lon, lat = start_point lon2, lat2, back_azimuth = geod.fwd(lon, lat, azimuth, distance) return { "status": "success", "point": [lon2, lat2], "back_azimuth": back_azimuth, "ellps": ellps, "message": "Geodetic point calculated successfully" } except Exception as e: logger.error(f"Error calculating geodetic point: {str(e)}") raise ValueError(f"Failed to calculate geodetic point: {str(e)}")
- src/gis_mcp/pyproj_functions.py:32-42 (registration)Resource registration at 'gis://crs/geodetic' that lists 'calculate_geodetic_point' among available geodetic operations, aiding in tool discovery.@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" ] }