-
Mosaic: Mosaic and join layers
Access this help text as a web page: Mosaic
Presentation and options
Given a set of layers that cover a determined region, for example a set of sheets of a certain cartographic cut, the program generates a resulting layer by combining the original layers. The layers can be rasters in IMG format (of any type and either RLE compressed or not) or JPG format, non-structured VEC or structured files PNT, ARC, POL and NOD. Mosaic node files are meaningless without corresponding arc files. However, it is possible to select from the MiraMon display interface the nodes of a layer (or some of them) and generate a VEC file of points, with the GRAPHIC_ID as an attribute in case you want to retrieve it (via physical join with MiraDades or with GestBD) or link (via GeM+) the alphanumeric attributes of the nodes in a PNT file (converting the VEC to PNT with VECPNT). From this way it is therefore possible to mosaic the points corresponding to the nodes of various layers. To make a mosaic of vector layers of VEC type, the use of the application UnirVEC is recommended.
All input files must be of the same format and type. The output file format is the same as the input file except for a VEC file mosaic, which gives an ARC file (use LinArc 1 to convert it to VEC) and the NOD file mosaic, which results in a PNT file. For easer use, the list of files to be mosaicked can be given set out as a sequence of file names in a command line (last parameter) or as a plain text file with each file name in a line. The list file can have any extension other than a layer, although .txt or .lst is preferable. Important note for raster mosaics: In case of cell spatial matching, the last file in the list file is the one that will give the value in the final raster, already that the mosaic is made by adding to the result the values of the input files, consecutively from the first, unless the value is a NoData, in which case the value is ignored; in other words, if this last raster file has a NoData value, it will be the next file starting at the end (penultimate) that will give the value, and so on. For historical reasons, and of symmetry with other software, this criterion is the opposite of what applies to the [CVR (,)] transparent function of the CalcImg application, where the first of the two arguments imposes its values, unless in that position it contains a NoData. In the Mosaic it is the last to arrive who imposes, unless it contains a NoData.
The program can automatically determine the geographical extent of the set of layers. It is also possible to specify a clip region (coordinates X minimum, X maximum, y minimum and Y maximum) or an irregular mask file (only for vectors). In this case the program examines each file to be mosaicked and uses the useful part for the specified region. When a file is completely outside the region it is not considered. A typical application is to create a new overlaying layer with four sheets of a cartographic series. When using very large cartographic series cut into sheets, you can have a single list listing all the sheets and select the region that you want to explore each time in order to extract the zone of interest quicker. The program have several options:
Option 1:
The region to Mosaic includes the whole region of all the SourceFiles indicated.
Option 2:
The region to Mosaic is indicated by the parameters Xminimum Xmaximum Yminimum Ymaximum.
Option 3:
The region to Mosaic is indicated by an irregular MaskFile (only for vectorial files). The objects outside the mask are eliminated.
Option 4:
The region to Mosaic is indicated by the extend of the EnvFile.
Option 9:
Generates a binary list (file '{') from a text list. A binary list is useful to accelerate the Mosaic process.
In the case of superposition, the program acts differently for rasters and vectors. In the case of rasters, if the metadata of the preexisting files indicate that they contain a NoData, this value is not written in the destination file. This allows images that contain areas outside the region to be overlaid correctly. In the same way, when overlaying consists of values that are not background, the program DOES NOT make sure that they are equal: the values of the last file that affects the region will be the ones used.·It is possible to specify the value of the NoData of the output image. If it is not specified this will be the value of the NoData of the first image. In the case of vectors, superposing is more delicate because one sheet does not dominate over another. In the case of superposed objects where the sheets do not coincide exactly, the result could be a duplication, discontinuity in the lines, or double borders in the case of polygons.
Given that the program does not interpolate any values, the cell sides of all source files have to be equal; the destination file will have the same cell side. At the same time, all source files have to be coregistered, that is, they must have x minimum coordinates that are an exact multiple of the cell side apart. The same applies for the y minima. If the output coordinates requested by the user do not fulfill this requirement they are adapted to it, the coordinates that are finally used include those requested, so that no fragment of the territory requested is lost. This capacity to adapt is regulated by a tolerance parameter. This parameter only applies for rasters. To make vectorial objects fit between sheets it is necessary to use LinArc with advanced tolerances.
In general, the metadata is based heavily on the metadata from the first layer. As an example, for categorical raster images, the description of the legend categories is also taken from the first file read.
When mosaicking raster files with the palette indicated in the REL, the palette is inherited for the output file. This also works with multiband files in which each band has its own palette.
Dialog box of the application
Syntax
Syntax:
- Mosaic 1 DestinationFile SourceFiles [/NODATA] [/TOLERANCIA] [/IMATGE_BUIDA] [/VORA] [/RLE] [/LLINATGE] [/SIMPLIFICA_VERTEXS] [/ALGORISME] [/TITOL] [/PATRO_DEST]
- Mosaic 2 DestinationFile Xmin Xmax Ymin Ymax SourceFiles [/NODATA] [/TOLERANCIA] [/IMATGE_BUIDA] [/VORA] [/RLE] [/LLINATGE] [/SIMPLIFICA_VERTEXS] [/ALGORISME] [/TITOL] [/PATRO_DEST]
- Mosaic 3 DestinationFile MaskFile SourceFiles [/NODATA] [/TOLERANCIA] [/IMATGE_BUIDA] [/VORA] [/RLE] [/LLINATGE] [/SIMPLIFICA_VERTEXS] [/ALGORISME] [/TITOL] [/PATRO_DEST]
- Mosaic 4 DestinationFile BBoxFile SourceFiles [/NODATA] [/TOLERANCIA] [/IMATGE_BUIDA] [/VORA] [/RLE] [/LLINATGE] [/SIMPLIFICA_VERTEXS] [/ALGORISME] [/TITOL] [/PATRO_DEST]
- Mosaic 9 File [/NODATA] [/TOLERANCIA] [/IMATGE_BUIDA] [/VORA] [/RLE] [/LLINATGE] [/SIMPLIFICA_VERTEXS] [/ALGORISME] [/TITOL] [/PATRO_DEST]
Options:
- 1:
The region to Mosaic includes the whole region of all the SourceFiles indicated
- 2:
The region to Mosaic is indicated by the parameters Xminimum Xmaximum Yminimum Ymaximum.
- 3:
The region to Mosaic is indicated by an irregular MaskFile (only for vectorial files). The objects outside the mask are eliminated.
- 4:
The region to Mosaic is indicated by the extend of the EnvFile.
- 9:
Generates a binary list (file '{') from a text list. A binary list is useful to accelerate the Mosaic proces.
Parameters:
- DestinationFile
(Destination file -
Output parameter): Is the name of the file resulting from the mosaic.
- SourceFiles
(Source files -
Input parameter): Is a list of files written one after another in a command line or a text file that contains the names of the preexisting files to use.
- Xmin
(X minimum -
Input parameter): X minimum coordinate of the output region. If these coordinates do not fit the pixel matrix defined by the first source image, they are adapted for excess.
- Xmax
(X maximum -
Input parameter): X maximum coordinate of the output region. If these coordinates do not fit the pixel matrix defined by the first source image, they are adapted for excess.
- Ymin
(Y minimum -
Input parameter): Y minimum coordinate of the output region. If these coordinates do not fit the pixel matrix defined by the first source image, they are adapted for excess.
- Ymax
(Y maximum -
Input parameter): Y maximum coordinate of the output region. If these coordinates do not fit the pixel matrix defined by the first source image, they are adapted for excess.
- MaskFile
(Mask file -
Input parameter): is the name of a VEC file that defines an irregular polygon (only for vectors). In this case, there is the option to indicate a set of parameters that define the selection with the suffix "_MASCARA" (p.ex: /COND1_CAMP_MASCARA=). To find out more about the values of these parameters there is more iformation in the document general syntax
- BBoxFile
(Bounding box file -
Input parameter): Is the file name where the extend will be extracted that will be used to cut the DestinationFile. Most of MiraMon formats are suported.
- File
(List file -
Output parameter): File containing a list of files.
Modifiers:
/NODATA= (NoData) Is the value used to fill in zones without data in any of the preexisting files; it has to be an integer (p.ex. 0). In the case that it is not indicated, the value of the first file on the list is used. (Input parameter) /TOLERANCIA= (Tolerance) Is the tolerance factor when adapting the coordinates of the cell matrices defined for each raster, to those of the first image. (Input parameter) /IMATGE_BUIDA= (Empty image) What the program does if an empty image is generated (constant value or NoData) - 0: erase the image if all the values are equal or if they are NoData.
- 1: erase if the image has all the values as NoData or if it is completely outside the region.
- 2: generate an empty image even if it is entirely NoData or if it is outside the region.
- if this parameter is not indicated images outside the region are not generated.
(Input parameter) /VORA= (Limit) In the raster mosaics this indicates that it is necessary to ignore an 'n' cells wide border of each of the original images (Input parameter) /RLE (Compress and index IMG) When the output file is an IMG file, this file will be compressed and indexed. (Input parameter) /LLINATGE= (Lineage) Pattern for the name of an additional raster file (actually one for each band) that indicates the source file index (starting from 0) that has contributed to each pixel of the output image. This file can help you understand the source of the data in each pixel of the output image. (Input parameter) /SIMPLIFICA_VERTEXS (Simplify the intermediate vertices) Simplify the intermediate vertices of the arcs, as long as this does not mean a change in topology. (Input parameter) /ALGORISME= (Algorithm) This parameter is used to determine the type of algorithm that the application will use to cut the vectors in the topological structure.- ESCOMBRATGE Based on the intersection of segments Bentley-Ottmann.
- DIRECTE: Based on the exploration of all segments against all segments to determine the intersections between Victor by the topological structure.
- AUTOMATIC: MiraMon automatically decides which of the two algorithms used.
(Input parameter) /TITOL= (Title) Output file title (Input parameter) /PATRO_DEST= (Pattern for result files) Common pattern for result files in case of multiband files. (Input parameter)