Skip to main content
I have many (100's) of Aerial orthographic images which all have the normal borders containing flight information and compass needle etc. I need to remove these border and mosaic the raster images into one large image without overlaps. Could anyone offer a good, well thought out method of doing this with fme?
Hi,

Assume that the sizes of the template raster and all the ortho photo rasters are identical.
  1. Create a donut which represents the common border area from the template raster, and normalize its extents (e.g. move the left-bottom corner to (0,0)).
  2. After normalizing the extents of each ortho photo raster to fit the normalized extents of the donut, clip them by the donut with the Clipper.
  3. Pick the resulting rasters from the Outside port of the Clipper, restore their original extents, and then mosaic them with the RasterMosaicker.
  4. Create a polygon represents the extents of the merged photo area with the RasterExtentsCoercer (Extents Type: Data Extents), and clip the mosaicked raster by the polygon to remove the most outer border area.
Notes:
  1. The way to create the donut in the step 1 is different depending on the properties of the template.
  2. The BoundsExtractor (or the RasterPropertyExtractor) and Offseter (e.g. X Offset: -xmin, Y Offset: -ymin) can be used to normalize extents of rasters, and another Offseter (e.g. X Offset: xmin, Y Offset: ymin) can be used to restore the original extents.
  3. If the original ortho photo rasters don't have Nodata definition, you have to define a preferable Nodata with the RasterBandNodataSetter before clipping in the step 2.
Hope this helps,

Takashi

Reply