Skip to main content
Glama

calculate_geodetic_point

Calculate a new geographic point from a starting location using distance and direction for geospatial analysis and mapping applications.

Instructions

Calculate point at given distance and azimuth.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_pointYes
azimuthYes
distanceYes
ellpsNoWGS84

Implementation Reference

  • The core handler function for the 'calculate_geodetic_point' MCP tool. It is decorated with @gis_mcp.tool(), which registers it as an MCP tool. The function computes a new geodetic point using pyproj.Geod.fwd given a starting point, azimuth, distance, and ellipsoid parameters.
    @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)}")
  • Resource listing that advertises the availability of the 'calculate_geodetic_point' tool under the 'gis://crs/geodetic' namespace, aiding in tool discovery.
    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"
            ]
        }

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