rio merge
Copy valid pixels from input files to an output file.
All files must have the same number of bands, data type, and coordinate reference system. Rotated rasters cannot be merged.
Input files are merged in their listed order using the reverse painter’s algorithm. If the output file exists, its values will be overwritten by input values.
Geospatial bounds and resolution of a new output file in the units of the input file coordinate reference system may be provided and are otherwise taken from the first input file.
Note: –res changed from 2 parameters in 0.25.
rio merge [OPTIONS] INPUTS... OUTPUT
Options
- -o, --output <output>
Path to output file (optional alternative to a positional arg).
- -f, --format, --driver <driver>
Output format driver.
- --bounds <bounds>
Bounds: ‘left bottom right top’ or ‘[left, bottom, right, top]’.
- -r, --res <res>
Output dataset resolution in units of coordinate reference system. Pixels assumed to be square if this option is used once, otherwise use: –res pixel_width –res pixel_height.
- --resampling <resampling>
Resampling method.
- Default:
'nearest'
- Options:
nearest | bilinear | cubic | cubic_spline | lanczos | average | mode | gauss
- --method <method>
Merging strategy.
- Default:
'first'
- Options:
first | last | min | max | sum | count
- --nodata <NUMBER|nan>
Set a Nodata value.
- -t, --dtype <dtype>
Output data type.
- Options:
ubyte | uint8 | uint16 | int16 | uint32 | int32 | float32 | float64
- -b, --bidx <bidx>
Indexes of input file bands.
- --overwrite
Always overwrite an existing output file.
- --precision <precision>
Unused, deprecated, and will be removed in 2.0.0.
- --target-aligned-pixels, --no-target-aligned-pixels
Align the output bounds based on the resolution.
- --mem-limit <mem_limit>
Limit on memory used to perform calculations, in MB.
- --use-highest-res, --use-first-res
Use the highest resolution of sources or the resolution of the first source argument.
- --co, --profile <NAME=VALUE>
Driver specific creation options. See the documentation for the selected output driver for more information.
Arguments
- INPUTS... OUTPUT
Required argument(s)