Forrest logo
back to the gdalwarp tool

gdalwarp:tldr:0b083

gdalwarp: Crop a raster dataset using a vector layer.
$ gdalwarp -cutline ${path-to-area_to_cut-geojson} -crop_to_cutline ${path-to-input-tif} ${path-to-output-tif}
try on your machine

The command you provided is using the GDAL (Geospatial Data Abstraction Library) tool called gdalwarp to perform geospatial processing on raster data. Here's a breakdown of the command: gdalwarp: This is the command-line utility for GDAL that allows various operations on raster data, including warping, reprojection, resampling, and more. -cutline ${path-to-area_to_cut-geojson}: This option specifies the path to a GeoJSON file that defines the area to be used for cutting/referencing. The GeoJSON file contains vector features that define the boundary or shape of the area that you want to cut from the input raster. -crop_to_cutline: This option tells gdalwarp to crop the input raster to the boundaries defined by the cutline. ${path-to-input-tif}: This is the path to the input raster image file (in GeoTIFF format) that you want to crop. ${path-to-output-tif}: This is the path to the output raster image file (also in GeoTIFF format) that will contain the cropped portion of the input raster based on the provided cutline. In summary, this gdalwarp command takes an input raster image, clips it to the specified area defined by a GeoJSON file, and writes the cropped portion to a new raster file.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gdalwarp tool