---
name: "gdal_merge.py"
section: "1"
platform: "linux"
package: "python-gdal"
version: "1.2.6-1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/gdal_merge.py"
---

# gdal\_merge.py(1)

mosaics a set of images

## NAME

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] [-separate] [-v] [-pct]
                     [-ul_lr ulx uly lrx lry] [-n nodata_value] [-init value]
                     [-seperate] 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.

- **-o** *out\_filename***:**

  The name of the output file to be created.

- **-of** *format***:**

  Output format, defaults to GeoTIFF (GTiff).

- **-co** *NAME=VALUE***:**

  Creation option for output file. Multiple options can be specified.

- **-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.

- **-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.

- **-init** *value***:**

  Pre-initialize the output file with this value. However, it is not marked as the nodata value in the output file.

NOTE: gdal\_merge.py is a Python script, and will only work if GDAL was built with Python support.

## AUTHORS

Frank Warmerdam \<warmerdam@pobox.com\> Silke Reimer \<silke@intevation.de\>
