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.
- From the FME Workbench, create a translation using the translation wizard. Choose ASFPRS Lidar Data Exchange Format (LAS) as the source dataset. Click Next.
- 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.
- When prompted to Select Destination Format, choose GeoTIFF (Georeferenced Tagged Image File Format). Click Next.
- 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.
- 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.
- 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.
- 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.
- Open up the ImageRasterizer transformer's Parameters dialog box.
- In the Rows/Columns or Cell Size field, choose CellSize.
- In the X Cell Spacing and Y Cell Spacing fields, type in the desired TIFF pixel size e.g. 1 m.
- In the Interpretation Type field, choose Gray8. Click OK.
- 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...
Hi,
ReplyDeleteI'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.
Regards,
Dave Campanas
Product Specialist
Safe Software Inc.
Dave,
ReplyDeleteGreat 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.
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.
ReplyDeleteThat'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 !!!
ReplyDeleteYou can do the same with las2dem (with TIN rasterization) and lasgrid (with gridding) of LAStools.
ReplyDelete