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.
- 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.
- Open up the PenColorSetter Parameters. Define a Pen Color, e.g. red.
- Open up the ImageRasterizer Parameters.
- 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).
- In the Number of columns field, enter the horizontal pixel dimensions e.g. 1000.
- In the Number of rows field, enter the vertical pixel dimensions e.g. 800.
The ImageRasterizer Parameters may look like this at this point. - Close the ImageRasterizer Parameters dialog box.
- 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.
- In the Navigation pane's destination coordinate system parameter, define the destination GeoTiff dataset's coordinate system, e.g. LL84.
- Run the translation.
The GeoTiff image file is generated.
No comments:
Post a Comment