Syntax FACTORY_DEF RasterMosaicFactory [FACTORY_NAME ] [INPUT FEATURE_TYPE [ ]* []*]* [COUNT_ATTRIBUTE ] [ACCUMULATE_ATTRIBUTES (yes|no|none|all|one)] [LIST_NAME {}] [LIST_ATTRS_TO_INCLUDE []* ] [LIST_ATTRS_TO_INCLUDE_MODE (ALL|SELECTED)] [GROUP_BY []+]* [FLUSH_WHEN_GROUPS_CHANGE (Yes|No)] [NODATA_OVERWRITE (yes|no)] [INTERPOLATION_TYPE_NAME (nearestneighbor|bilinear| bicubic|average4|average16)] [OVERLAPPING_VALUES (last|min|max|average|sum|composite_using_alpha)] [COMPOSITE_USING_ALPHA_BAND (yes|no)] [SNAPPING_TYPE (resample|offset)] [MERGE_PALETTES (yes|no)] [REJECT_INVALID_FEATURES (yes|no)] [OUTPUT MOSAICKED FEATURE_TYPE [ ]* []*]* Overview This factory is used to mosaic a collection of input raster features into a single raster feature. The factory accepts a number of input raster features, each of which has one or more bands. The selected bands are removed from the input features and mosaicked to form a new band in the single output raster feature. The order of the input features and the order of the selected bands of the input features both determine the order of the bands and the set of bands being mosaicked in the output feature. For example, there are two rasters - R1 and R2: R1 has four bands - B11, B12, B13, and B14 - but only B12 and B14 are selected R2 has three bands - B21, B22, and B23 - but only B21 and B22 are selected The output raster will therefore have two mosaicked bands: the first one consists of B12 and B21, and the second one consists of B14 and B22. Furthermore, if R1 is the first feature going into the factory and R2 is the second, and if they overlap each other, then R2 will be on top of R1. B12 and B21 are a set of bands and B14 and B22 are another set of bands. The input features may be partitioned into groups based on attribute values using the GROUP_BY clause and one raster feature is produced for each group. If the GROUP_BY clause is not specified, then all input features will be processed together and a single raster feature will be produced. If the GROUP_BY clause is specified, FLUSH_WHEN_GROUPS_CHANGE (when set to Yes) will cause the factory to process and output the current group immediately when an attribute that does not belong to the current group is encountered. If the optional COUNT_ATTRIBUTE clause is given, a new attribute will be created on every output feature, containing the number of input features that were combined to form the output. If grouped, the output feature's count attribute will have the number of input features mosaicked within its group. If yes or all is specified for the ACCUMULATE_ATTRIBUTES clause, the attributes of each input feature are merged onto the feature being output. If grouped, the attributes of each input feature within a group are merged onto the group's output feature. If no or none is specified for the clause, no user attributes will be carried across from the input features to the output features. The optional LIST_NAME clause is used to associate attributes with incoming feature. When the output feature is created, all attributes of each feature joining the output are added as members of the specified attribute list. The index in the list corresponds to the index of the feature's geometry in the aggregate. The optional LIST_ATTRS_TO_INCLUDE_MODE will specify if ALL attributes should be added to a list, or if only the SELECTED attributes (specified with the LIST_ATTRS_TO_INCLUDE clause) should be added to the list. If this value is not specified, it defaults to ALL. The OVERLAPPING_VALUES option specifies how output cell values will be calculated when multiple rasters overlap. * last - The last value. * min - The minimum value. * max - The maximum value. * average - The average of all values. * sum - The sum of all values. * composite_using_alpha - Values will be blended based on the alpha band. If this option is selected, all input rasters must have exactly one alpha band, and the values from these alpha bands will be used to blend all the other bands' values in areas where overlap occurs, effectively achieving transparency. An alpha value of 0 means complete transparency, and an alpha value of 1 means complete opacity. Note that the average, sum, and composite_alpha options are not compatible with palettes. The COMPOSITE_USING_ALPHA_BAND option is equivalent to setting OVERLAPPING_VALUES = composite_using_alpha. When OVERLAPPING_VALUES = last, the option NODATA_OVERWRITE determines whether a nodata value can overwrite a real data value when rasters overlap. If this option is set to no, the nodata value on top will be skipped and the real data value underneath will be preserved. If this option is set to yes, the nodata value on top will overwrite any real data value underneath. The SNAPPING_TYPE option specifies how an unaligned raster will be snapped to the underlying reference grid. If the option is set to RESAMPLE, the raster will be resampled using the chosen INTERPOLATION_TYPE_NAME. If the option is set to OFFSET, the raster's origin will be offsetted to match the reference grid. Note: If the raster's X Cell Spacing or Y Cell Spacing is different from the reference grid, resampling will occur no matter what option is selected. The MERGE_PALETTES option specifies how palettes will be treated when present. When set to Yes, selected palettes in each input band set will be merged to create a single palette for the output band. When set to No, selected palettes in each input band set will be accumulated on the output band without modification. The option INTERPOLATION_TYPE_NAME gives five different interpolation choices ranging from high performance to high accuracy. The nearestneighbor interpolation method yields the highest performance with the least accuracy. The bicubic interpolation method yields the highest accuracy but may take longer to process the data. The bilinear interpolation method yields a medium result. The average4 and average16 interpolation methods have a performance similar to bilinear and can be useful for numeric rasters such as DEMs. Although the RasterMosaicFactory has a few different options, it also imposes the following restrictions: Only features that have raster geometries are supported. All raster features must be in the same coordinate system. When the raster geometries have different spacings or are not aligned properly, this factory will resample and/or snap the raster geometries. All rasters must have the same number of selected bands. When there are no selected palettes or MERGE_PALETTES is No, each band in a set must have the same band interpretation and nodata value. When there are selected palettes and MERGE_PALETTES is Yes, each band must have one selected palette, and all palettes must have the same value interpretation. When using the COMPOSITE_USING_ALPHA_BAND option, each raster must have exactly one alpha band selected. All alpha bands must also have the same interpretation. Palettes are not supported when using this option. The limitations seem to be very strict; however, many other factories and functions can be combined to ease the use of this factory. The REJECT_INVALID_FEATURES clause specifies whether the factory will fail upon being supplied invalid features or output them to the port. Output Tags The RasterMosaicFactory supports the following output tag. MOSAICKED The output feature created by mosaicking the input features. The output feature that is deemed to be invalid input for any of the following reasons: - The feature has incompatible geometry - The feature has too many palettes - The rasters have mismatched band interpretations - The rasters have mismatched Nodata values - The rasters have mismatched palette interpretations - No palette has an overlapping option - A Raster has more than one alpha band