CoordinateSystemSetter
From fmepedia
CoordinateSystemSetter is a Workbench Transformer.
| Table of contents |
Sets the Coordinate System of an object. Note that this does not reproject the object, nor does it change the geometry. For that, you will need a Reprojector. This transformer can be useful in cases where you know which coordinate system the data is in, but FME doesn't.
Example
The attached workspace shows an example use of the CoordinateSystemSetter transformer.
In this example data is being read from an Excel spreadsheet, converted to spatial data and written to a Google Earth KML file. The data is a list of Munros (http://en.wikipedia.org/wiki/Munro) - Scottish Mountains over 3000 feet.
KML format requires a coordinate system of LL84. This is set in the destination dataset parameters.
However, FME cannot reproject the data without knowing the coordinate system of the source features. Excel format doesn't support a coordinate system so it cannot tell us. Also, because the source data is non-spatial, it seems illogical to set it on the source dataset parameters.
Therefore, once spatial features are created (using the 2DPointReplacer), the CoordinateSystemSetter is employed to tag the newly created point features with the correct coordinate system.
Workspace Screenshot
Notice that a Custom Transformer is being used to apply an offset to the source according to the OS grid square - the transformer used is the OSGridSquareConverter.
Output Screenshot
This is the output as seen in Google Earth. Notice how the KMLStyler transformer has been used to turn the point features into red triangles. Ben Nevis (http://en.wikipedia.org/wiki/Ben_Nevis) - the highest mountain in the UK - has been queried. To it's right (east) are Aonach Mhor and the Grey Corries range. To the foreground are the Mamores (http://en.wikipedia.org/wiki/Mamores).
Acknowledgements
Thanks to peakbagging.com (http://www.peakbagging.com/) for providing a list of current munros.
