Skip to main content
Glama

GIS MCP Server

knn_weights

Generate a k-nearest neighbors spatial weights object from point data for geospatial analysis using shapefile or GeoPackage input with specified neighbor count and optional ID field.

Instructions

Create a k-nearest neighbors spatial weights (W) object from point data. - data_path: path to point shapefile or GeoPackage - k: number of nearest neighbors - id_field: optional attribute name to use as observation IDs

Input Schema

NameRequiredDescriptionDefault
data_pathYes
id_fieldNo
kYes

Input Schema (JSON Schema)

{ "properties": { "data_path": { "title": "Data Path", "type": "string" }, "id_field": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Id Field" }, "k": { "title": "K", "type": "integer" } }, "required": [ "data_path", "k" ], "title": "knn_weightsArguments", "type": "object" }

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