clip_raster_with_shapefile
Use polygons from a shapefile to clip a raster dataset and write the output. Automatically converts the shapefile's coordinate system to match the raster's if they differ.
Instructions
Clip a raster dataset using polygons from a shapefile and write the result. Converts the shapefile's CRS to match the raster's CRS if they are different.
Parameters:
raster_path_or_url: local path or HTTPS URL of the source raster.
shapefile_path: local filesystem path to a .shp file containing polygons.
destination: local path where the masked raster will be written.
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": {
"raster_path_or_url": "<raster_path_or_url>",
"shapefile_path": "<shapefile_path>",
"destination": "<destination>"
},
"name": "clip_raster_with_shapefile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raster_path_or_url | Yes | ||
| shapefile_path | Yes | ||
| destination | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||