rio clip

Clips a raster using projected or geographic bounds.

The values of –bounds are presumed to be from the coordinate reference system of the input dataset unless the –geographic option is used, in which case the values may be longitude and latitude bounds. Either JSON, for example “[west, south, east, north]”, or plain text “west south east north” representations of a bounding box are acceptable.

If using –like, bounds will automatically be transformed to match the coordinate reference system of the input.

Datasets with non-rectilinear geo transforms (i.e. with rotation and/or shear) may not be cropped using this command. They must be processed with rio-warp.


$ rio clip input.tif output.tif –bounds xmin ymin xmax ymax

$ rio clip input.tif output.tif –like template.tif



-o, --output <output>

Path to output file (optional alternative to a positional arg).

--bounds <bounds>

Bounds: “left bottom right top” or “[left, bottom, right, top]”.

--like <like>

Raster dataset to use as a template for bounds

-f, --format, --driver <driver>

Output format driver

--nodata <NUMBER|nan>

Set a Nodata value.


Bounds in geographic coordinates.


Bounds in input’s own projected coordinates (the default).


Always overwrite an existing output file.

--co, --profile <NAME=VALUE>

Driver specific creation options. See the documentation for the selected output driver for more information.

--with-complement, --without-complement

Include the relative complement of the raster in the given bounds (giving a larger result), else return results only from the intersection of the raster and the bounds (the default).



Required argument(s)