Skip to main content
Glama

voronoi

Generate Voronoi diagrams from point data to analyze spatial patterns and regions, enabling precise geospatial analysis for decision-making.

Instructions

Create a Voronoi diagram from points.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geometryYes

Implementation Reference

  • The handler function for the 'voronoi' MCP tool. It parses input WKT geometry (points), computes Voronoi diagram using shapely.ops.voronoi_diagram, returns WKT result or raises error.
    @gis_mcp.tool() def voronoi(geometry: str) -> Dict[str, Any]: """Create a Voronoi diagram from points.""" try: from shapely import wkt from shapely.ops import voronoi_diagram geom = wkt.loads(geometry) result = voronoi_diagram(geom) return { "status": "success", "geometry": result.wkt, "message": "Voronoi diagram created successfully" } except Exception as e: logger.error(f"Error creating Voronoi diagram: {str(e)}") raise ValueError(f"Failed to create Voronoi diagram: {str(e)}")
  • Resource listing that includes 'voronoi' as an available advanced operation, indicating its registration in the MCP toolset.
    @gis_mcp.resource("gis://operations/advanced") def get_advanced_operations() -> Dict[str, List[str]]: """List available advanced operations.""" return { "operations": [ "triangulate_geometry", "voronoi", "unary_union_geometries" ] }

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