OnWorks favicon

gdal_merge - Online in the Cloud

Run gdal_merge in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command gdal_merge that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



gdal_merge - gdal_merge.py mosaics a set of images


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


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

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

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,

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

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

Generate verbose output of mosaicing operations as they are done.

Place each input file into a separate stacked band.

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

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

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


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 initialized to 255.

% gdal_merge.py -init "0 0 255" -o out.tif in1.tif in2.tif


Frank Warmerdam warmerdam@pobox.com, Silke Reimer silke@intevation.de

Use gdal_merge online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    A set of Python extension modules that
    wrap the cross-platform GUI classes from
    wxWidgets.. Audience: Developers. User
    interface: X Window System (X11), Win32 ...
    Download wxPython
  • 2
    This is the Total War pack file manager
    project, starting from version 1.7. A
    short introduction into Warscape
    modding: ...
    Download packfilemanager
  • 3
    A network traffic tool for measuring
    TCP and UDP performance with metrics
    around both throughput and latency. The
    goals include maintaining an active
    iperf cod...
    Download IPerf2
  • 4
    fre:ac - free audio converter
    fre:ac - free audio converter
    fre:ac is a free audio converter and CD
    ripper for various formats and encoders.
    It features MP3, MP4/M4A, WMA, Ogg
    Vorbis, FLAC, AAC, and Bonk format
    support, ...
    Download fre:ac - free audio converter
  • 5
    Write your chatbot logic once and
    connect it to one of the available
    messaging services, including Amazon
    Alexa, Facebook Messenger, Slack,
    Telegram or even yo...
    Download BotMan
  • 6
    gerbv  a Gerber (RS-274X) viewer
    gerbv a Gerber (RS-274X) viewer
    Gerbv is an open source Gerber file
    (RS-274X only) viewer. Gerbv lets you
    load several files on top of each other,
    do measurements on the displayed image,
    etc. ...
    Download gerbv a Gerber (RS-274X) viewer
  • 7
    I/O performance Analysis Tool.
    Audience: Developers, Information
    Technology, Science/Research, System
    Administrators. User interface: Win32
    (MS Windows). Progr...
    Download Iometer
  • More »

Linux commands