Monday, August 22, 2011

Export ground points from a LAS file to ASCII CSV file using FME

This is one of the typical LiDAR file conversion task - converting a LAS (*.las) file to an ASCII XYZ or CSV (*.csv) file. It can be done with any number of free and commercial software. It is a simple matter to define a workspace using the FME Workbench from SAFE to do the job. Here are the steps that I used to export out only ground points from a LAS file into an output ASCII CSV file.

  1. Start the FME Workbench. Create a blank workspace.
  2. Select Readers | Add Reader. In the Format field, choose ASPRS Lidar Data Exchance Format (LAS). Choose a dataset e.g. C:\data\lub_tile1.las. Click OK.

  3. Select Writers | Add Writer. In the Format field, choose Comma Separated Value (CSV). Choose an output dataset e.g. C:\Temp\.

  4. Click Parameters. If necessary, change the extension from the default csv. Choose another Separator Character if comma is not wanted. Click OK.

  5. Click OK again.

    The prompt appears.
  6. Click Yes.

    The Feature Type Properties dialog box appears.
  7. In the Feature Type Name field, type in the output CSV file name e.g. outascii.
  8. Click the User Attributes tab. Define number attributes for the X,Y,Z values as shown below. Click OK.

  9. From the Transformer Gallery, drag and drop the PointCloudCoercer, CoordinateExtractor, and Tester transformers onto the workspace.
  10. Connect up the source, transformers and destination as shown below.

  11. Open the PointCloudCoercer Parameters. Change the Output Geometry to Point. Click the Point Components to Preserve button and select all. Click OK.

  12. Open the Tester Parameters. Define a Test Clause as shown below to allow only ground points (class=2). Click OK.

  13. Run the translation.

    The output ASCII CSV file is created.

No comments:

Related Posts with Thumbnails