Raster Mosaicking Scenario
Overview
How to select tiles for an area of interest and use RasterMosaicker transformer to create one image combining all the source rasters. Also how to update tiles when newer data is available.
Note that the following scenario is as close to real life as possible, and as such, it operates with large raster datasets.
The full set of raster data you'll have to download in order to reproduce this demo is about 330 Mb. If you would like to try a 'light version' of this scenario, use workspaces with 'Resampled' prefix. In this case, you will have to resample the original datasets with two extra workspaces DOQQResampler.fmw and 6InchResampler.fmw.
Note that the resampled example uses GeoTIFF rasters instead of MrSID. Resampled data can be uploaded to FTP. Please send us your requests.
This scenario assumes that a user has an advanced level of FME knowledge. We would like to get your feedback on this scenario. Send your comments and questions to dmitri.bagh@safe.com
The scenario assumes you work at a small company located in Austin, Texas and need high resolution imagery for your everyday work. Time has been rolled back: the scenario is set in the year 2005.
Downloading data
One of the greatest sources of high resolution imagery is NAIP (National Agriculture Imagery Program) led by the United States Department of Agriculture, USDA. The author of this article participated in creating some portions of this data in 2003 and 2004, actively using FME for all kinds of tasks from loading boundaries and photo centers into MicroStation to preparing delivery metadata.
NAIP data is freely available and can be downloaded from many websites. For our example, go to
http://data.tnris.org/datadownload/download.jsp, and in “Quad Name,” type ‘Austin East’, then press the Search button:
On the returned page, scroll down to “Austin East DOQQ Imagery”, and download four 2004-NAIP 1m quarter quad (DOQQ) archives:

Repeat these steps for Austin West, Oak Hill, and Montopolis. Extract the images from the archives into separate folders as shown below:

Your final dataset will include the following 16 DOQQs shown below:
DOQQs are color infrared images with one meter per pixel resolution. DOQQs are provided in the UTM coordinate system. The DOQQs you have downloaded are in UTM Zone 14 (UTM83-14) and are in MrSID format:
However, your company works with data in GeoTIFF format in the popular State Plane projection and uses survey feet (TX83-CF). Besides, your company also uses local Austin city grid (download the grid shapefile from
ftp://ftp.ci.austin.tx.us/GIS-Data/Regional/grids/200grid.zip).
This means that in order to use this data you have to accomplish three things:
-
reproject
-
retile
-
rewrite the data to a different format
Processing Images
First, you must select the tiles that are covered by the area of interest. The boundary information for the area your company is interested in was provided by another department and was provided in Latitude/Longitude (LL-83), in MapInfo TAB format - download boundary.zip from this page (the area boundary and tiles were reprojected to the State Plane projection in the following picture):
At the beginning, you have to select tiles that are covered by the area of interest. As a first step add the Austin City Grid shapefile (downloaded from the website link mentioned above) and boundary TAB to a workspace and reproject the boundary to TX83-CF using the Reprojector transformer. After that both datasets are in the same coordinate space and can be compared spatially against each other with a SpatiaFilter (route the boundary to the BASE input port and the grid to CANDIDATE). Those tiles that are intersected by the area will be output via the PASSED port, the rest won’t participate in further processing:
You also have to add to the workspace the folder containing DOQQ images in UTM projection:
Route all the images to a RasterMosaicker transformer to create one image combining all the source rasters. With the next step change UTM projection of the raster to State Plane (TX83-CF; use the Reprojector), and after that you are ready for clipping the big image into City Grid tiles with a Clipper transformer (connect the output from the SpatialFilter PASSED port to the CLIPPER input port and the output from the Reprojector to CLIPPEE). In order to give the clipped images the same names as the corresponding City Grid tiles, set "Merge Attributes" to "Yes" on the Clipper.
Note that both the SpatialFilter and the Clipper have a "Bases (or Clippers) first" option. This option speeds up the translation; however this makes important the order of the datasets reading. Make sure that MapInfo tab is being read first, shapefile is the second, and the rasters are read the last.
After clipping, the new images are ready to be written to GeoTIFF format. Use TILE_NAME as a fanout attribute, this will name the output TIFFs according to original Austin City Grid tile names:
The next screenshot shows the workspace (See attached: AustinMosaic.fmwt) described above:
Note: In order to run the attached sample workspace, you will need to download the raster datasets and grid shapefile from the previously mentioned links. Also note that this example can take several minutes to run (~3-10) for a smaller workspace to test, use the files included in Resampled.zip.