Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GDAL-MDIM-MOSAIC(1)		      GDAL		     GDAL-MDIM-MOSAIC(1)

NAME
     gdal-mdim-mosaic  -  Build  a mosaic, either virtual (VRT) or materialized,
     from multidimensional datasets

     Added in version 3.12.

SYNOPSIS
	Usage: gdal mdim mosaic [OPTIONS] <INPUT>... <OUTPUT>

	Build a mosaic, either virtual (VRT) or materialized, from multidimensional datasets.

	Positional arguments:
	  -i, --input <INPUT>				       Input multidimensional raster datasets [1.. values] [required]
	  -o, --output <OUTPUT> 			       Output multidimensional raster dataset (created by algorithm) [required]

	Common Options:
	  -h, --help					       Display help message and exit
	  --json-usage					       Display usage as JSON document and exit
	  --config <KEY>=<VALUE>			       Configuration option [may be repeated]
	  -q, --quiet					       Quiet mode (no progress bar or warning message) [not available in pipelines]

	Options:
	  -f, --of, --format, --output-format <OUTPUT-FORMAT>  Output format
	  --co, --creation-option <KEY>=<VALUE> 	       Creation option [may be repeated]
	  --overwrite					       Whether overwriting existing output dataset is allowed
	  --array <ARRAY>				       Name of array(s) to mosaic. [may be repeated]

	Advanced Options:
	  --oo, --open-option <KEY>=<VALUE>		       Open options [may be repeated]
	  --if, --input-format <INPUT-FORMAT>		       Input formats [may be repeated]

DESCRIPTION
     gdal mdim mosaic builds a mosaic of multidimensional array(s), from a  list
     of  input	GDAL multidimensional datasets, that can be either a virtual mo-
     saic in the Multidimensional VRT (Virtual Dataset) format,  or  in  a  more
     conventional  multidimensional  format  such as NetCDF: Network Common Data
     Form or Zarr.

     Wildcards '*', '?' or '['] of VSIGlob()  can  be  used  for  input  dataset
     names,  even  on  files  located  on  network file systems such as /vsis3/,
     /vsigs/, /vsiaz/, etc.  Alternatively if a input dataset name  is	prefixed
     by  the  @  character,  it  will  be  assumed to contain the list of actual
     dataset names (one per line) to use as input datasets.

     To create a mosaic from an array, certain structural constraints  apply  to
     all contributing arrays from the input datasets:

     * All  contributing  arrays  must	have  the same array name and path (e.g.
       "/measurements/pressure")

     * They must have the same data type and nodata value

     * They must share the same number of dimensions, in  the  same  order,  and
       with the same names.

     * each  dimension	of the array must have an associated one-dimensional nu-
       meric indexing variable.

     A typical use case is when a multidimensional array is sliced into  several
     files, and it is desired to reconstruct the full array.

     The program can support mosaicing along several axes.

     There  might be "holes" among the source datasets along the mosaiced dimen-
     sions, and possibly overlaps (but only when regularly spacing along  a  mo-
     saiced  dimension).   Holes are filled with the nodata value, if defined in
     the source arrays, or zero-initialized otherwise. In case of  overlap,  the
     order  of	the  input  list  is  used to determine priority. Files that are
     listed at the end are the ones from which the content will be fetched.

     Different typical use cases that can be addressed by this program are:

     * a 3D array is sliced along a single dimension  (for  example  a	temporal
       one) into several files with each slice having a sample along that dimen-
       sion.  In  that	use case, the timestamps of the slices do not need to be
       regularly spaced.

     * a 2D array is chunked/tiled along X and	Y  dimensions,	with  a  regular
       spacing	along  those X and Y dimensions, and where the coordinate values
       are aligned on the same grid among chunks.

     By default, a target array is created for each array with two or  more  di-
     mensions.	 This  behavior  can  be restricted to specific arrays using the
     --array option.

     The following options are available:

   Standard options
     -i, --input <INPUT>
	    Input multidimensional dataset names. Required.

	    Wildcards '*', '?' or '[']	of  VSIGlob()  can  be	used  for  input
	    dataset names, even on files located on network file systems such as
	    /vsis3/,  /vsigs/,	/vsiaz/,  etc.	Alternatively if a input dataset
	    name is prefixed by the @ character, it will be assumed  to  contain
	    the  list  of  actual  dataset  names (one per line) to use as input
	    datasets.

     -o, --output <OUTPUT>
	    Output multidimensional dataset name. Required.

     -f, --of, --format, --output-format <OUTPUT-FORMAT>
	    Select the output format. This can be a format that supports  multi-
	    dimensional  output  (such	as  NetCDF:  Network  Common  Data Form,
	    Multidimensional VRT).  When this option is not specified, the  for-
	    mat  is  guessed when possible from the extension of the destination
	    filename.

     --co, --creation-option <KEY>=<VALUE>
	    Many formats have one or more optional creation options that can  be
	    used to control particulars about the file created.

	    The  creation options available vary by format driver, and some sim-
	    ple formats have no creation options at all. A list of options  sup-
	    ported for a format can be listed with the --format command line op-
	    tion  but  the documentation for the format is the definitive source
	    of information on driver creation options.	See Raster drivers  for-
	    mat  specific documentation for legal creation options for each for-
	    mat.

	    Array-level creation options may be passed by  prefixing  them  with
	    ARRAY:.   See  GDALGroup::CopyFrom()  for  further details regarding
	    such options.

     --overwrite
	    Allow program to overwrite existing target file or dataset.   Other-
	    wise,  by default, gdal errors out if the target file or dataset al-
	    ready exists.

     --array <ARRAYS>
	    Name or full path of one or several arrays to mosaic. If not  speci-
	    fied,  a target array is created for each array with two or more di-
	    mensions.

   Advanced options
     --oo, --open-option <NAME>=<VALUE>
	    Dataset open option (format specific).

	    May be repeated.

     --if, --input-format <format>
	    Format/driver name to be attempted to open the input file(s). It  is
	    generally  not  necessary  to specify it, but it can be used to skip
	    automatic driver detection, when it fails to select the  appropriate
	    driver.   This  option can be repeated several times to specify sev-
	    eral candidate drivers.  Note that it does not force  those  drivers
	    to	open  the dataset. In particular, some drivers have requirements
	    on file extensions.

	    May be repeated.

RETURN STATUS CODE
     The program returns status code 0 in case of success, and non-zero in  case
     of  error (non-blocking errors emitted as warnings are considered as a suc-
     cessful execution).

EXAMPLES
   Example 1: Mosaic together several all netCDF files starting with slice  that
     are slices of a 3D array
	gdal mdim mosaic slice*.nc out.vrt

AUTHOR
     Even Rouault <even.rouault@spatialys.com>

COPYRIGHT
     1998-2026

				  Jun 05, 2026		     GDAL-MDIM-MOSAIC(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=gdal-mdim-mosaic&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help