Skip to main content
Glama

weights_from_shapefile

Generate spatial weights matrices from shapefiles using contiguity methods for geographic analysis. Specify queen or rook adjacency and optional observation IDs to calculate spatial relationships between geographic features.

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

TableJSON Schema
NameRequiredDescriptionDefault
shapefile_pathYes
contiguityNoqueen
id_fieldNo

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