I have two sets of raster (tiff, aerial photos) which I want to merge to one raster file with FME.
The two sets have different spatial resolutions. Set A has a better resolution as B. The two set do overlap.
How can I merge these raster with FME? Requirements:
- Use Resolution (size of pixel) from set A
- Where the raster do overlap: use pixels from set A
- Optional requirement: Position of pixels from set A should not change (nor resampling of A. only resampling of B)
Example with 4 raster files from set A (blue) and 4 raster files from set B (red).
I tried to use FMEs RasterMosaiker and set the order in Navigator but I can not meet requirement 1 and 2 simultaneously:
- first A then B: I loss requirement 2
- first B then A: I loss
requirement 1
Best Answer
I don't do a lot of raster work with FME so this might not be entirely correct, but these are the general steps I would use:
Use a RasterResampler to change the Cell Sizing of Raster B. You could extract this from Raster A first and feed it into the X/Y spacing. Or, just type it in manually if you know it.
Feed the results of the above along with Raster A into a RasterMosaicker.
You could also have a look at the RasterExpressionEvaluator which can do conditional statements where the two rasters overlap.