weights_from_shapefile
Generate spatial weights from a shapefile using queen or rook contiguity; optional ID field for observation identifiers. Supports geospatial analysis on GIS MCP Server.
Instructions
Create a spatial weights (W) from a shapefile using contiguity.
- contiguity: 'queen' or 'rook' (default 'queen')
- id_field: optional attribute name to use as observation IDs
Input Schema
Name | Required | Description | Default |
---|---|---|---|
contiguity | No | queen | |
id_field | No | ||
shapefile_path | Yes |
Input Schema (JSON Schema)
{
"properties": {
"contiguity": {
"default": "queen",
"title": "Contiguity",
"type": "string"
},
"id_field": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id Field"
},
"shapefile_path": {
"title": "Shapefile Path",
"type": "string"
}
},
"required": [
"shapefile_path"
],
"title": "weights_from_shapefileArguments",
"type": "object"
}