Raster Pyramiding Example

From fmepedia

(Redirected from RasterPyramiding Example)

The attachment 'RasterPyramidingExample.zip|attached workspace' not found shows an example of raster pyramiding using FME.

NB: If you were redirected here from another page and find there are no attachments or images then simply click the 'article' link at the top of the page.


The Workspace

image 'RasterPyramidingExample1.jpg' not found
Above: Raster Pyramiding Example Workspace.

This workspace reads a single large raster image, pyramids and tiles it, and writes the output to GeoTIFF.



image 'RasterPyramidingExample2.jpg' not found
Above: This close-up of the RasterPyramider highlights that the smallest raster will be 24x24 pixels in size.


So the first raster to be created will be resampled to be 24x24 pixels in size. Each subsequent raster will be twice the resolution giving 48x48, etc...

When the size of the original raster is reached then the pyramiding process stops.

In this example the original raster size is 1201 x 1201 pixels. The smallest raster will be 24 x 24. Therefore the raster pyramids will be...

24 x 24
48 x 48
96 x 96
192 x 192
384 x 384
768 x 768
1536 x 1536

...giving a total of seven pyramid layers.


image 'RasterPyramidingExample3.jpg' not found
Above: The feature counts show how the one image has been split into seven layers.


An ExpressionEvaluator is used to determine how many tiles to create for each pyramid layer. The RasterTiler then does the tiling. In this example we use the simple formula:

<numberOfTiles> = <totalNumberOfLayers> - <layerNumber>


image 'RasterPyramidingExample4.jpg' not found
Above: The ExpressionEvaluator Settings.


image 'RasterPyramidingExample5.jpg' not found
Above: The RasterTiler Settings.


So with:

<totalNumberOfLayers> = 7

We get:

7 - Layer 6 = 1 (i.e. 1x1 tiles)
7 - Layer 5 = 2 (i.e. 2x2 tiles)
7 - Layer 4 = 3 (i.e. 3x3 tiles)
7 - Layer 3 = 4 (i.e. 4x4 tiles)
7 - Layer 2 = 5 (i.e. 5x5 tiles)
7 - Layer 1 = 6 (i.e. 6x6 tiles)
7 - Layer 0 = 7 (i.e. 7x7 tiles)

So the total number of output files will be:

(1x1) + (2x2) + (3x3) + (4x4) + (5x5) + (6x6) + (7x7) = 140


image 'RasterPyramidingExample6.jpg' not found
Above: This number is borne out by the FME log file...


image 'RasterPyramidingExample7.jpg' not found
Above: ...and by the Feature Connection counter.



movie 'pyramiding.wmv' not found
Above: So in this animation we can see that the coarsest (first) layer has only one tile, but by the finest (seventh) layer there are 7x7 tiles.

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