rio create

Create an empty dataset.

The fundamental, required parameters are: format driver name, data type, count of bands, height and width in pixels. Long and short options are provided for each of these. Coordinate reference system and affine transformation matrix are not strictly required and have long options only. All other format specific creation outputs must be specified using the –co option.

Simple north-up, non-rotated georeferencing can be set by using the –bounds option. The –transform option will assign an arbitrarily rotated affine transformation matrix to the dataset. Ground control points, rational polynomial coefficients, and geolocation matrices are not supported.

The pixel values of an empty dataset are format specific. “Smart” formats like GTiff use 0 or the nodata value if provided.

Example:

$ rio create new.tif -f GTiff -t uint8 -n 3 -h 512 -w 512
> –co tiled=true –co blockxsize=256 –co blockysize=256

The command above produces a 3-band GeoTIFF with 256 x 256 internal tiling.

Usage

rio create [OPTIONS] OUTPUT

Options

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

Output format driver.

-t, --dtype <dtype>

Output data type.

Options:

uint8 | uint8 | uint16 | uint32 | uint64 | int8 | int16 | uint32 | int32 | int64 | float16 | float32 | float64

-n, --count <count>

Number of raster bands.

-h, --height <height>

Raster height, or number of rows.

-w, --width <width>

Raster width, or number of columns.

--nodata <NUMBER|nan>

Set a Nodata value.

--crs <crs>

Coordinate reference system.

--transform <transform>

Affine transform matrix. Overrides any given bounds option.

--bounds <bounds>

Bounds: ‘left bottom right top’ or ‘[left, bottom, right, top]’.

--overwrite

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.

Arguments

OUTPUT

Required argument