Geoscience Reference
In-Depth Information
When creating the output raster, gdalwarp can alter the pixel resolution in an
attempt to match the exact extent of the clipping region. If this is not what you want,
make sure you explicitly set the target resolution ( -tr ).
8.4 gdal_merge.py
gdal_merge.py is a Python script that can resize and mosaic images. Unlike
gdalwarp , it does not permit image transformations (reprojections). The output
image covers the spatial extent of the merged input images. In the case where a
different pixel size (target resolution) is selected (option -ps ), you can assure that the
output bounding box is not smaller than the aggregated bounding box by selecting the
option -tap . In case of overlapping pixels the pixel value of the last input image on
the command line is selected, except for no-data values. Pixels within the aggregated
bounding box that are not covered by any of the input images are set to a default
value of 0 (or a value defined by the option -init ). All images should have an equal
number of bands, except when using the option -separate . In that case all input
image bands are stacked into a multi-band image.
Usage: gdal_merge.py [-o out_filename] [-of out_format] [-co
NAME=VALUE]* [-ps pixelsize_x pixelsize_y] [-tap]
[-separate] [-q] [-v] [-pct] [-ul_lr ulx uly lrx lry]
[-init"value [value...]"] [-n nodata_value] [-a_nodata
output_nodata_value] [-ot datatype] [-createonly]
input_files [--help-general]
-o out_filename
The name of the output file, which will be created if it does not already exist
(defaults to “out.tif”).
-of format
Output format, defaults to GeoTIFF (GTiff).
-co NAME=VALUE
Creation option for output file. Multiple options can be specified.
-ot datatype
Force the output image bands to have a specific type. Use type names (ie. Byte,
Int16,...).
-ps pixelsize_x pixelsize_y
Pixel size to be used for the output file. If not specified the resolution of the first
input file will be used.
-tap
(from GDAL 1.8.0) (target aligned pixels) align the coordinates of the extent of
the output file to the values of the target resolution, such that the aligned extent
includes the minimum extent.
 
 
Search WWH ::




Custom Search