FME Version
Files
-
- 50 KB
- Download
Introduction
Using the RasterMosaicker transformer, multiple source raster files may be mosaicked into a single file. Source rasters must all have the same number of bands and, in turn, the same number of palettes. In this basic example, we will mosaic four raster files with the same number of bands. Please visit the Raster Mosaicking Scenario article for a more advanced example that deals with rasters without the same number of bands.
The data used in this step-by-step tutorial is available in the Files section of this article.
Step-by-Step Instructions
In this step-by-step tutorial, you will learn how to mosaic multiple adjacent rasters together to create one image.
1. Read in Four JPEG2000 Orthophotos
Start FME Workbench, and in a blank workspace, add an OpenJPEG JPEG2000 reader. Browse to and select all four JPEG2000 files that we will mosaic together ("BCVANC15_N5_A.jp2", "BCVANC15_N5_B.jp2", "BCVANC15_N5_C.jp2", and "BCVANC15_N5_D.jp2") in the Dataset parameter. Optionally, you can read in just the .zip folder, too (ensure Archived Files is selected, or it won't add them successfully).
2. Inspect the Data
Before mosaicking, it is worth looking at the imagery and noting a few things about these files. Run the translation (please make sure Feature Caching is enabled). In Visual Preview (if it does not show, select the green magnifying glass on the reader), the rasters appear as though they are mosaicked together. Still, if you drag and select a corner of the image, you can see only a quarter of the image gets selected.
3. Mosaic the Rasters Together
Back on the canvas, add a RasterMosaicker transformer. Since the images all line up together with no gaps or overlaps and the same spacing, they can be mosaicked together with the default settings in the RasterMosaicker transformer.
4. Write Out to One GeoTIFF
Add a GeoTIFF writer and connect the Output port on the RasterMosaicker to it. Double-click the writer feature type and set the Raster File Name parameter to CoalHarbor in its parameters. Click OK to close the dialog and run the workspace. The result looks like the second image below.
Data Attribution
The data used here originates from open data made available by the City of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.
Comments
0 comments
Please sign in to leave a comment.