Lidar scans are usually held in a standard format called a Point Cloud. Lidar mapping equipment produces data in this format and there is a huge range of software to process and display it. You don't need to understand the details of point cloud format to use the data, but some people like to know what's going on under the covers, and it turns out that point cloud format is pretty simple. If you are one of those people, these notes are for you.
A point cloud is just a plain text file containing lots of numbers. The numbers are heights measurements across a rectangular grid. The easiest way to see this is to download one of the UK Environment Agency's data files and compare it with a paper Ordnance Survey map. With a bit of guesswork, it all becomes clear.
A Digital Surface model (DSM) and a Digital Terrain Model (DTM) can both be represented as a point cloud. The UK environment agency's public Lidar data is presented as "tiles", each covering a square area of land. You can download them for free from their website: http://environment.data.gov.uk/ds/survey/index.jsp#/survey
On the Environment Agency website you can find a file tq1352_DTM_1M.asc. The filename tells you that it's a Digital Terrain Model with one-metre resolution covering square TQ1352 of the OS map. (That's a 1Km square.) The .asc just means that it's a plain text file.
I have a paper OS map covering that area - Pathfinder 1206 1:25,000 scale, Edition A2 published 1994. It's also divided into Kilometre squares, labelled the same way. It has contour lines showing the height of the ground above sea level, so I can compare the heights on the map with the data in the file.
On the paper map, the top left corner of square TQ1352 is between 110m and 115m above sea level. The top right is between 110m and 115m, bottom left is at 105m and bottom right corner is between 110m and 115m:
110-115m 110-115m
-----------
| |
| |
| TQ1352 |
| |
| |
----------
105m 110-115m
The Environment Agency's point cloud data file is 1006 lines long. Lines 1-6 define the context of the data, lines 7-1006 contain the data itself. The first seven lines look like this (I've added line numbers):
1 ncols 1000
2 nrows 1000
3 xllcorner 513000
4 yllcorner 152000
5 cellsize 1
6 NODATA_value -9999
The file describes an grid of height measurements. Line 1 gives the number of columns in the grid, line 2 the number of rows. In this case, it's a square, 1000 points by 1000 points.
Lines 3 and 4 give the coordinates of the bottom left corner in terms of some mapping system, in this case the UK Ordnance Survey numeric form.
Line 5 gives the grid cell size in metres, in this case 1m.
The survey may not be able to measure the height at every point on the grid. Line 6 defines the "no data" value. If the survey misses a point, it marks it with the no data value.
The rest of the file (lines 7 to 1006) contain the mapping data, 1000 numbers per line.
The first few numbers on line 7 are
112.868 112.507 112.39 112.457 112.67 112.765 112.83 112.735 112.648
The last few are
116.693 116.635 116.615 116.728 116.787 116.753 116.71 116.708 116.728
Which corresponds to the heights at the top corners of the square on the paper map.
The last line is line 1006. The first few numbers are:
106.81 106.732 106.683 106.562 106.455 106.395 106.327 106.29 106.213
The last few numbers on that line are:
115.29 115.31 115.38 115.455 115.485 115.522 115.565 115.622 115.68
Which correspond fairly well to the heights at the bottom corners of the square on the paper map, but not exactly.
So the last height measurement in the file is somewhere between 115.5m and 115.8m, but the bit about spatial resolutions seems to be saying that the point on the ground could be up to 2m away from where the data says it is. Not bad for a sensor attached to a 'plane a couple of thousand feet above the ground, but not as accurate as the OS map.
Summing up, my guess is that the data in the file describes the height in metres above sea level of a grid of points at 1m intervals across a 1Km square aligned to the North, with bottom left corner at map reference (513000,152000) or TQ13000.52000. It contains 1,000 lines of measurements, each describing a 1000m by 1m strip. Line 7 describes the strip at the top of the square and the rest work their way downwards. The data in the file agrees fairly well with the OS map, but not quite. I'm guessing that the OS map is the more accurate. Concerning the disk space used, the file contains 1,000,000 numbers in all. Each number takes 8 characters, so 8 Bytes each, which means that the file takes up a little over 8MB of space.
Once you have your point cloud data file giving your grid of height measurements, there is all sorts of software available to visualise it I've attached a picture to this article which I produced using some free software from the Slovenian Research Agency. (More on that software later.)