sjoin_nearest_gpd
Perform nearest neighbor spatial join between two geospatial datasets with optional max distance. Specify join type and save results directly for efficient geospatial analysis.
Instructions
Nearest neighbor spatial join using geopandas.sjoin_nearest.
Args:
left_path: Path to the left geospatial file.
right_path: Path to the right geospatial file.
how: Type of join ('left', 'right').
max_distance: Optional maximum search distance.
output_path: Optional path to save the result.
Returns:
Dictionary with status, message, and output info.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
how | No | left | |
left_path | Yes | ||
max_distance | No | ||
output_path | No | ||
right_path | Yes |
Input Schema (JSON Schema)
{
"properties": {
"how": {
"default": "left",
"title": "How",
"type": "string"
},
"left_path": {
"title": "Left Path",
"type": "string"
},
"max_distance": {
"default": null,
"title": "Max Distance",
"type": "number"
},
"output_path": {
"default": null,
"title": "Output Path",
"type": "string"
},
"right_path": {
"title": "Right Path",
"type": "string"
}
},
"required": [
"left_path",
"right_path"
],
"title": "sjoin_nearest_gpdArguments",
"type": "object"
}