build_and_transform_weights
Construct and transform spatial weight matrices from point datasets. Supports contiguity (queen, rook), distance-based, and KNN methods with row, variance, binary, or other transformations.
Instructions
Build and transform spatial weights in one step.
Parameters:
data_path: Path to point shapefile or GeoPackage
method: 'queen', 'rook', 'distance_band', or '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'
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"data_path": "<data_path>"
},
"name": "build_and_transform_weights"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_path | Yes | ||
| method | No | queen | |
| id_field | No | ||
| threshold | No | ||
| k | No | ||
| binary | No | ||
| transform_type | No | r |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||