In my last post I guessed the format of some Environment Agency Lidar data. It's actually defined by the American Esri organisation and is called an Esri Grid. You can find out about that here: https://en.wikipedia.org/wiki/Esri_gridPoint. It's one of a number of formats used to store Lidar point cloud data.
I've written a simple program in the Go programming language that reads an Esri Grid file of height measurements and draws a picture of it. You can download it from here: https://github.com/goblimey/esrigrid.
The core of the program is just a bit of simple geometry. The Lidar data is a rectangular grid of height measurements. The picture format I'm using to visualise it supports 256 shades of grey numbered 0 (white) to 255 (pure black). To produce the picture, divide the heights in the data into 256 equal-height bands. Draw a picture with one pixel per grid cell and paint each cell in a shade of grey according to its band. Paint the cellsin the lowest height band white, paint the ones in in the highest band black and use the other shades for the bands in between.
This is not the most sophisticated Lidar visualisation tool and the results vary. For some data files it just produce a grey blur, but for others it works better. The 1m resolution data for map square TQ1652 gives a particularly good result with the road, railway line and River Mole showing up clearly.
The Environment Agency offers higher resolution data for that area, including a 2000X2000 cell grid at 0.5m resolution. That will produce a more detailed image, but you need a high-resolution monitor to see the difference.
Another problem with this approach is that unless the ground in the area displayed is very flat, the difference between the lowest and highest points tend to swamp any features on the surface, such as buildings.
Another way to visualise Lidar data is to draw a view of the landscape with simulated shadows. That tends to do a much much better job of accentuating small surface features. More on that later.