Tuesday, August 4, 2009

Create a GeoTiff image from shape file using FME

I thought I'd try out using FME to create GeoTiff images from vector geometries. It is actually quite straightforward and the trick is to make sure that the fme_color attribute is set to some rgb value either explicitly or through the PenColorSetter transformer. In this simple example, I convert a polygon geometry shape file to a GeoTiff image file.
  1. Using the FME Workbench, create a Shape file to GeoTiff translation workflow as shown in the figure below. Add in the PenColorSetter and ImageRasterizer transformers and connect them up accordingly.



  2. Open up the PenColorSetter Parameters. Define a Pen Color, e.g. red.



  3. Open up the ImageRasterizer Parameters.

  4. In the Rows/Columns or Cell Size field, choose RowsColumns (if you want to set the GeoTiff image file dimensions by cell size, then choose CellSize and define the X and Y Cell Spacing).

  5. In the Number of columns field, enter the horizontal pixel dimensions e.g. 1000.

  6. In the Number of rows field, enter the vertical pixel dimensions e.g. 800.

    The ImageRasterizer Parameters may look like this at this point.


  7. Close the ImageRasterizer Parameters dialog box.

  8. The source and destination coordinate system should be set if you want to create a geo-referenced GeoTiff image file. In the Navigator pane, define the source dataset coordinate system, e.g. LL84 for geographic WGS84.


  9. In the Navigation pane's destination coordinate system parameter, define the destination GeoTiff dataset's coordinate system, e.g. LL84.

  10. Run the translation.

    The GeoTiff image file is generated.
The resultant GeoTiff image file can be opened up in any GIS application software like GeoMedia or Global Mapper as shown below.




No comments:

Post a Comment