clip_raster_with_shapefile
Extract and save a specific area from a raster dataset using polygons in a shapefile. Automatically adjusts coordinate systems to ensure compatibility between the raster and shapefile.
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.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
destination | Yes | ||
raster_path_or_url | Yes | ||
shapefile_path | Yes |
Input Schema (JSON Schema)
{
"properties": {
"destination": {
"title": "Destination",
"type": "string"
},
"raster_path_or_url": {
"title": "Raster Path Or Url",
"type": "string"
},
"shapefile_path": {
"title": "Shapefile Path",
"type": "string"
}
},
"required": [
"raster_path_or_url",
"shapefile_path",
"destination"
],
"title": "clip_raster_with_shapefileArguments",
"type": "object"
}