Skip to main content
Glama

GIS MCP Server

build_transform_and_save_weights

Generate and save spatial weights for GIS analysis by reading a shapefile, applying methods like queen, rook, or knn, transforming weights if needed, and exporting them in GAL or GWT format.

Instructions

Pipeline: Read shapefile, build spatial weights, optionally transform, and save to file. Parameters: - data_path: Path to point shapefile or GeoPackage - method: 'queen', 'rook', 'distance_band', 'knn' - id_field: Optional field name for IDs - threshold: Distance threshold (required if method='distance_band') - k: Number of neighbors (required if method='knn') - binary: True for binary weights, False for inverse distance (DistanceBand only) - transform_type: 'r', 'v', 'b', 'o', or 'd' (optional) - output_path: File path to save weights - format: 'gal' or 'gwt' - overwrite: Allow overwriting if file exists

Input Schema

NameRequiredDescriptionDefault
binaryNo
data_pathYes
formatNogal
id_fieldNo
kNo
methodNoqueen
output_pathNoweights.gal
overwriteNo
thresholdNo
transform_typeNo

Input Schema (JSON Schema)

{ "properties": { "binary": { "default": true, "title": "Binary", "type": "boolean" }, "data_path": { "title": "Data Path", "type": "string" }, "format": { "default": "gal", "title": "Format", "type": "string" }, "id_field": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Id Field" }, "k": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "K" }, "method": { "default": "queen", "title": "Method", "type": "string" }, "output_path": { "default": "weights.gal", "title": "Output Path", "type": "string" }, "overwrite": { "default": false, "title": "Overwrite", "type": "boolean" }, "threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Threshold" }, "transform_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Transform Type" } }, "required": [ "data_path" ], "title": "build_transform_and_save_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