Tuesday, September 15, 2009

Lidar LAS file conversion to Tiff using FME

I tried out using Safe FME to convert a Lidar LAS file to a grayscale TIFF image file and I was reasonably successful doing it. I'm not quite completely happy with it ( for instance, it would be more correct to filter out all returns except the first return) but here are the steps that I took.
  1. From the FME Workbench, create a translation using the translation wizard. Choose ASFPRS Lidar Data Exchange Format (LAS) as the source dataset. Click Next.

  2. When prompted to specify the location of the source data, browse and select the input LAS file, e.g. Serpent Mound LAS Data.las. Click Next.

  3. When prompted to Select Destination Format, choose GeoTIFF (Georeferenced Tagged Image File Format). Click Next.

  4. In the Select Feature Types dialog box, toggle off header and variable_length_header feature types if you like because we are only interested in the point feature type. Click OK.

  5. Within the workbench, drag and drop the transformers ExpressionEvaluator, Concatenator, and ImageRasterizer onto the workbench. Connect them up with the source and destination datasets as shown in the figure below.

  6. Open up the ExpressionEvaluator transformer's Properties. In the Expression field, type in @Value(Intensity). Click OK.

    Note: the output from this transformer is the attribute _result by default.

  7. Open up the Concatenator transformer's Settings dialog box. Form the string "_result, _result, _result" in the Concatenated Items box. In the Destination Attribute field, change the text to fme_color. Click OK.

    Note: in this step, we are forming the rgb string. Since intensity images are grayscale, we simply repeat the same intensity value in the red, green, and blue parts of the output fme_color string.

  8. Open up the ImageRasterizer transformer's Parameters dialog box.

  9. In the Rows/Columns or Cell Size field, choose CellSize.

  10. In the X Cell Spacing and Y Cell Spacing fields, type in the desired TIFF pixel size e.g. 1 m.

  11. In the Interpretation Type field, choose Gray8. Click OK.

  12. Run the translation.

    The intensity image is created from the source LAS file.

    The resultant intensity image isn't too bad but as I said earlier, the process can be improved. Maybe next time...


Anonymous said...


I'm happy to see you find our software useful. One change you might consider making to your workspace is to replace the ImageRasterizer with a RasterDEMGenerator.

While the ImageRasterizer simply uses the value of a single point within the pixel boundary to set the pixel value, the RasterDEMGenerator will build a TIN from the source points and interpolate the elevation at the pixel center to create the output raster DEM.

In areas where the returns are sparser than the pixel size, the ImageRasterizer will leave empty pixels, while the the RasterDEMGenerator will fill these pixels with interpolated values.

To create the DEM from only the first returns, you can add a Tester before the RasterDEMGenerator to filter all the points whose Return_Number is greater than 1.


Dave Campanas
Product Specialist
Safe Software Inc.

d0min0c said...


Great suggestion! You are right, one of the other thing that bothered me was the look of the pixels when i view it closely. As you rightly pointed out, it would be better to TIN it first.

Peter said...

This is one of the best blog I read about Lidar. Thank you for posting this one dude. It will help in my thesis about Lidar Thanks again.

Lothar said...

That's nice and you become successful on what you are doing. Just read your blog and I gather lot of information and Thank you for posting this one. Keep it up !!!Lidar Technology is the best !!!

frontyardchicken said...

You can do the same with las2dem (with TIN rasterization) and lasgrid (with gridding) of LAStools.

Related Posts with Thumbnails