Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gdal_merge(1) [debian man page]

gdal_merge(1)						      General Commands Manual						     gdal_merge(1)

NAME
gdal_merge - gdal_merge.py mosaics a set of images SYNOPSIS
gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]* [-ps pixelsize_x pixelsize_y] [-tap] [-separate] [-v] [-pct] [-ul_lr ulx uly lrx lry] [-n nodata_value] [-init "value [value...]"] [-ot datatype] [-createonly] input_files DESCRIPTION
This utility will automatically mosaic a set of images. All the images must be in the same coordinate system and have a matching number of bands, but they may be overlapping, and at different resolutions. In areas of overlap, the last image will be copied over earlier ones. -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: (GDAL >= 1.8.0) (target aligned pixels) align the coordinates of the extent of the output file to the values of the -tr, such that the aligned extent includes the minimum extent. -ul_lr ulx uly lrx lry: The extents of the output file. If not specified the aggregate extents of all input files will be used. -v: Generate verbose output of mosaicing operations as they are done. -separate: Place each input file into a separate stacked band. -pct: Grab a pseudocolor table from the first input image, and use it for the output. Merging pseudocolored images this way assumes that all input files use the same color table. -n nodata_value: Ignore pixels from files being merged in with this pixel value. -a_nodata output_nodata_value: (GDAL >= 1.9.0) Assign a specified nodata value to output bands. -init 'value(s)': Pre-initialize the output image bands with these values. However, it is not marked as the nodata value in the output file. If only one value is given, the same value is used in all the bands. -createonly: The output file is created (and potentially pre-initialized) but no input image data is copied into it. NOTE: gdal_merge.py is a Python script, and will only work if GDAL was built with Python support. EXAMPLE
Create an image with the pixels in all bands initialized to 255. % gdal_merge.py -init 255 -o out.tif in1.tif in2.tif Create an RGB image that shows blue in pixels with no data. The first two bands will be initialized to 0 and the third band will be initalized to 255. % gdal_merge.py -init "0 0 255" -o out.tif in1.tif in2.tif AUTHORS
Frank Warmerdam warmerdam@pobox.com, Silke Reimer silke@intevation.de GDAL
Tue Sep 18 2012 gdal_merge(1)

Check Out this Related Man Page

rgb2pct(1)						      General Commands Manual							rgb2pct(1)

NAME
rgb2pct - rgb2pct.py Convert a 24bit RGB image to 8bit paletted SYNOPSIS
rgb2pct.py [-n colors | -pct palette_file] [-of format] source_file dest_file DESCRIPTION
This utility will compute an optimal pseudo-color table for a given RGB image using a median cut algorithm on a downsampled RGB histogram. Then it converts the image into a pseudo-colored image using the color table. This conversion utilizes Floyd-Steinberg dithering (error diffusion) to maximize output image visual quality. -n colors: Select the number of colors in the generated color table. Defaults to 256. Must be between 2 and 256. -pct palette_file: Extract the color table from palette_file instead of computing it. Can be used to have a consistant color table for multiple files. The palette_file must be a raster file in a GDAL supported format with a palette. -of format: Format to generated (defaults to GeoTIFF). Same semantics as the -of flag for gdal_translate. Only output formats supporting pseudocolor tables should be used. source_file: The input RGB file. dest_file: The output pseudo-colored file that will be created. NOTE: rgb2pct.py is a Python script, and will only work if GDAL was built with Python support. EXAMPLE
If it is desired to hand create the palette, likely the simpliest text format is the GDAL VRT format. In the following example a VRT was created in a text editor with a small 4 color palette with the RGBA colors 238/238/238/255, 237/237/237/255, 236/236/236/255 and 229/229/229/255. % rgb2pct.py -pct palette.vrt rgb.tif pseudo-colored.tif % more < palette.vrt <VRTDataset rasterXSize="226" rasterYSize="271"> <VRTRasterBand dataType="Byte" band="1"> <ColorInterp>Palette</ColorInterp> <ColorTable> <Entry c1="238" c2="238" c3="238" c4="255"/> <Entry c1="237" c2="237" c3="237" c4="255"/> <Entry c1="236" c2="236" c3="236" c4="255"/> <Entry c1="229" c2="229" c3="229" c4="255"/> </ColorTable> </VRTRasterBand> </VRTDataset> AUTHOR
Frank Warmerdam warmerdam@pobox.com GDAL
Tue Sep 18 2012 rgb2pct(1)
Man Page