Monday, April 20, 2009

Convert SVY21 coordinates to latitude/longitude using FME

FME can be used to reproject points from one coordinate system to another. In this example, I'm going to show how to convert easting/northing points in SVY21 coordinate system to geographical latitude/longitude points using the FME Workbench and FME's Reprojector and 2DPointAdder transformers. The following paragraphs describe the conversion steps from the source CSV (comma separated value) file to the destination CSV file. The source CSV file looks like the Excel screen shot shown below.

  1. Run the FME Workbench and choose Comma Separated Value as shown below.



  2. Click Next

    The Locate your source data page appears.

  3. Click Browse.

    The Select source Comma Separated Value files dialog box appears.


  4. Browse and select the CSV file or enter the file name in the File name field. Click Open.

  5. Click Settings.

    The CSV Input Settings dialog box appears.


    Toggle on the Field Names On First Line option. Click OK

  6. Click Next.

    The Select your destination format page appears


  7. Choose Comma Separated Value in the drop down list. Click Next. Click Finish

    The FME Workbench application appears.

  8. Drag and drop the 2DPointAdder transformer onto the FME Workbench. Connect the source CSV to the 2DPointAdder. Open up the 2DPointAdder properties. 

    The Edit 2DPointAdder Parameters dialog box appears.


  9. In the X Value Attribute drop down list, choose Easting. In the Y Value Attribute drop down list, choose Northing. Click OK

  10. Drag and drop the Reprojector transformer onto the Workbench. Connect the output of the 2DPointAdder transformer to the input of the Reprojector transformer. Open up the Reprojector properties.

    The Edit Reprojector Parameters dialog box appears


  11. In the Source Coordinate System field, choose the SVY21 coordinate System.

    Note: by default, FME does not have the SVY21 coordinate system defined. Refer to this posting for the steps on how to add it in. 

  12. In the Destination Coordinate System drop down list , choose LL84.

    Note: LL84 refers to Latitude, Longitude on WGS84.  

  13. Click OK.

  14. Drag and drop the BoundsExtractor transformer onto the Workbench. Connect the output of the Reprojector transformer to the input of the BoundsExtractor transformer. 

  15. Connect the output of the BoundsExtractor transformer to the input of the destination CSV. Open up the destination CSV properties.

    The Feature Type Properties dialog box appears.


  16. Click the User Attributes tab. Add in two double numerical attributes: Latitude and Longitude as shown above. Click OK.

  17. In the Workbench, connect the BoundsExtractor transformers' xmin to the destination CSV's Longitude attribute. Similarly connect the ymin to the Latitude attribute.

    The Workbench should look like this at this point.

  18. Run the translation and specify the output folder.

    The CSV file is created with the SVY21 coordinates converted to latitude/longitude.

No comments:

Related Posts with Thumbnails