build_and_transform_weights
Generate and transform spatial weights for geospatial analysis using methods like queen, rook, distance band, or k-nearest neighbors. Define parameters such as threshold, ID field, and transformation type to customize spatial relationships in GIS operations.
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'
Input Schema
Name | Required | Description | Default |
---|---|---|---|
binary | No | ||
data_path | Yes | ||
id_field | No | ||
k | No | ||
method | No | queen | |
threshold | No | ||
transform_type | No | r |
Input Schema (JSON Schema)
{
"properties": {
"binary": {
"default": true,
"title": "Binary",
"type": "boolean"
},
"data_path": {
"title": "Data Path",
"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"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Threshold"
},
"transform_type": {
"default": "r",
"title": "Transform Type",
"type": "string"
}
},
"required": [
"data_path"
],
"title": "build_and_transform_weightsArguments",
"type": "object"
}