The Glue raster maps operation glues or merges two or more georeferenced input raster maps into one output raster map. The output map then comprises the total area of all input maps. The domains of the input maps are merged when needed. With the Glue raster maps operation, you can thus merge two or more adjacent or partly overlapping raster maps (i.e. make a mosaic) or glue smaller raster maps onto a larger one.
When the input raster maps have attribute tables, also the tables will be automatically merged; for more information see the Glue tables operation.
Input maps: In the dialog box, you can select 2, 3, or 4 input raster maps. On the command line, you can specify as many input maps as you like. The input maps may be purely adjacent to one another, partly overlapping, or totally overlapping. When the input maps are (partly) overlapping, the input maps form a pile of maps on top of each other.
Map on top: When the pile of input maps are (partly) overlapping the same area, you have to decide which map should be considered as the map on top. When for a pixel a value is found in the map on top, that value will appear in the output map. When the undefined value is found in the map on top, the operation will look in the map 'below' it. Undefined pixels thus act as being transparent and provide 'openings' to enable the operation to find a value in the map below the current one.
In the dialog box, you can select the check box 'Last Map on Top' to order the input maps as:
On the command line, you can use the Replace option to this end.
Then, for each pixel, the operation will do:
Only when no value is found at all, the output pixel will be assigned the undefined value. Mind: when the output map uses the Image domain, this means value 0; when the output map uses a Picture domain or the Color domain, this means color (0,0,0), i.e. black.
Output georeference / First input map:
If you wish, you can specify to use an existing georeference for the output map (both dialog box and command line), or you can create a new georeference corners yourself for the output map (dialog box only). Tip: When you choose an existing georeference corners or create a new georeference corners, then the output map will always be North-oriented.
When no existing georeference is specified, and when you did not create a georeference yourself, the system will, if required, automatically construct a georeference for the output map; it will be sized in such a way that all input raster maps will fit in the new georeference.
See also the section Georeference of output map below.
Domain combinations: You can always merge maps that use the same domain, and maps that use domains of the same type. In some cases, you can also merge maps of different domain types. The list below shows the possible combinations of input domain types and also shows the output domain type.
In |
In |
Out |
Image |
Image |
Image |
Image |
Value |
Value |
Image |
Color |
Color |
Value |
Value |
Value |
Value |
Color |
Color |
Class |
Image |
Color |
Class |
Value |
Color |
Class |
Class |
Class |
Class |
Color |
Color |
ID |
ID |
ID |
Picture |
Picture |
Picture |
Picture |
Color |
Color |
Color |
Color |
Color |
Bool |
Bool |
Bool |
Bit |
Bool |
Bool |
Bit |
Bit |
Bit |
For more information, see also the section Domain of output map below.
Example:
To show a certain landuse type (of a class map) on a satellite image:
Agri |
= |
iff ((landuse="agriculture") or (landuse="agriculture (irrigated)"), landuse, "?") |
Explanation: if map landuse is classified as agriculture, then have these classes remain, else assign undefined.
Fig. 1: Agricultural land use over a satellite image. The light green part is agriculture with irrigation, the dark green part is rainfed agriculture.
For presentation and printing purposes, you could of course also use the Mask Polygons operation, use as mask agri* . Then, display the output polygon map on top of the satellite image in a map window.
Input map requirements:
The domains of the input maps should be mergeable, see the list of domain combinations above.
All input raster maps must have a georeference, which is not georeference None.
Domain of output map:
The domain type for the output map can be found in the list of domain combinations above. Here some extra information will be given on how the system deals with the domains for the output maps.
Georeference of output map:
This new georeference submap, created by the system, will always use the pixel size and coordinate system of your first input map; the size of this georeference will be such that all input maps fit in it; the name of this new georeference will be the same as the name of output map.
If necessary, all input maps are resampled with the Nearest Neighbour method to the output georeference.
Usually, the input georeferences will use the same coordinate system which covers the whole area already. In case input georeferences use different but compatible coordinate systems (e.g. different projections), the coordinate system of the first input map is used for the output georef, and a coordinate transformation is performed for the other input maps.
Tips:
Note:
When merging class maps or ID maps, by default an internal domain is created for the output map to reduce the number of separately stored domains. Internal domains are stored by an output map. If you like, you can select the New Domain check box in the dialog box and specify a new name for the output domain if you want the output domain to be stored as a separate object.
For more information on internal domains and representations, refer to How to open internal domains/representations.
See also: