Hello,
as part of my resolution experiments with the open data from England [1] I had looked at how space efficient various raster format store a typical raster DEM (e.g. a DSM, a DTM, or a CHM). All LAStools can on-the-fly-convert ASC or BIL rasters to points on a grid. Then we can apply LASzip and compress these points without loss. If we use lasgrid as the decompressor we decompress directly to a desired raster format. Here are the results:
98,954,758 --- sj6504_DSM_25cm.asc
26,991,757 --- sj6504_DSM_25cm.asc.zip
64,000,306 --- sj6504_DSM_25cm.bil (incl blw/hdr)
25,895,861 --- sj6504_DSM_25cm.bil.zip (incl blw/hdr)
62,449,640 --- sj6504_DSM_25cm.img
37,540,593 --- sj6504_DSM_25cm.tif (incl tfw)
11,363,324 --- sj6504_DSM_25cm.laz
11,079,214 --- sj6504_DSM_25cm_sort.laz
This raster is 4000 by 4000 = 16,000,000 pixels of which 522,316 are empty. It seems especially for download services of large amounts of raster data it would make a lot of sense to use LAZ over zipped ASC or TIF.
It would be rather easy to write a little open source "demzip.exe" program that can compress and decompress raster grids from and to LAZ (adding a small VLR that stores the information about the original format, resolution, and bounding box). By adding an (optional) point reordering into a space filling curve would also allow I/O efficient area-of-interest queries.
What is the most compact open (or closed) raster format you are aware of?
Regards,
Martin @rapidlasso
PS: Below the command lines that were used. The elevation values of the DSM 'sj6504_DSM_25cm.asc' downloaded from England's Environment Agency were
first reduced from femtometer to centimeter resolution as described here [1] and then used as input below.
laszip -i sj6504_DSM_25cm.asc ^
-rescale 0.001 0.001 0.01 ^
-o sj6504_DSM_25cm.laz
lassort -i sj6504_DSM_25cm.laz ^
-bucket_size 125 ^
-odix _sort -olaz
lasgrid -i sj6504_DSM_25cm.laz ^
-step 0.25 ^
-o sj6504_DSM_25cm.bil
lasgrid -i sj6504_DSM_25cm.laz ^
-step 0.25 ^
-o sj6504_DSM_25cm.tif
lasgrid -i sj6504_DSM_25cm.laz ^
-step 0.25 ^
-o sj6504_DSM_25cm.img