RasterTiler

From fmepedia

(Redirected from RasterTiler Example)

RasterTiler is a Workbench Transformer.


Table of contents


Description

Splits each input raster into a series of tiles by specifying either a tile size (Number of Columns and Number of Rows) or a number of tiles (Number of Horizontal Tiles and Number of Vertical Tiles).



Example

The attachment 'RasterTilerExample.zip|attached workspace' not found shows an example use of the RasterTiler transformer.

To tile data for Virtual Earth you should use the VirtualEarthTiler.


NB: This is actually a good illustration of working with raster data in general, and GeoTIFF data in particular, because it uses some useful functions and techniques that have a wider use and that the average user might not be aware of.


The RasterTiler

image 'RasterTilerExample1.jpg' not found
Above: RasterTiler Example Workspace.

The workspace reads a CDED format DEM, tiles it and converts to GeoTIFF.


image 'RasterTilerExample2.jpg' not found
Above: This close-up of the RasterTiler highlights there are two rows and columns to be created.


image 'RasterTilerExample3.jpg' not found
Above: The feature counts show how one image has been split into four (a 2x2 grid).


File Naming

By default the output from this process would be a series of files bearing the same name as the source data.


image 'RasterTilerExample4.jpg' not found
Above: The default output files.


However, the RasterTiler outputs a row and column number which we can combine with the Concatenator to produce a new output filename.


image 'RasterTilerExample4a.jpg' not found
Above: Concatenator settings dialog.


By default filenames are obtained from the source format attribute fme_basename using a feature type fanout on that attribute. Therefore a new filename is applied by simply changing the fanout to use the new concatenated name attribute.


image 'RasterTilerExample4b.jpg' not found
Above: Updated fanout setting.


When the fanout is applied like this the output files are named using our newly created attribute.

image 'RasterTilerExample5.jpg' not found
Above: Filenames Created from Concatenated Attribute.


Viewing the Output

The output can then be opened in the FME Viewer to be inspected.


image 'RasterTilerExample6.jpg' not found
Above: When opening multiple GeoTIFF files an option exists to divide the data up by filename.


image 'RasterTilerExample7.jpg' not found
Above: This option produces a single feature type (layer) per filename.


image 'RasterTilerExample8.jpg' not found
Above: The output shows clear evidence of being tiled into four quarters.


NB: The differences in colour range in the above images are caused by the Viewer calculating a scale separately for each raster. This only occurs because these are numeric rasters which need colour interpretation to be viewed: the underlying data is perfectly correct! Colour rasters would not exhibit the same differences because they would not need special interpretation. If you wanted to visualize this data as a continuous surface you could add a RasterInterpretationCoercer to the workspace before the RasterTiler to coerce everything into Grey8 (as opposed to Int8) - however refining the display like this would render the data useless as a DEM!

Attached Files
filesizedate
index.php------
User Comments Add a new comment