1.. _raster.mg4lidar: 2 3================================================================ 4MG4Lidar -- MrSID/MG4 LiDAR Compression / Point Cloud View files 5================================================================ 6 7.. shortname:: MG4Lidar 8 9.. build_dependencies:: LIDAR SDK 10 11This driver provides a way to view MrSID/MG4 compressed LiDAR file as a 12raster DEM. The specifics of the conversion depend on the desired 13cellsize, filter criteria, aggregation methods and possibly several 14other parameters. For this reason, **the best way to read a MrSID/MG4 15compressed LiDAR file is by referencing it in a View (.view) file, which 16also parametrizes its raster-conversion. The driver will read an MG4 17file directly, however it uses default rasterization parameters that may 18not produce a desirable output.** The contents of the View file are 19described in the specification :ref:`MrSID/MG4 LiDAR View 20Documents <mg4lidar_view_point_cloud>`. 21 22MrSID/MG4 is a wavelet-based point-cloud compression technology. You may 23think of it like a LAS file, only smaller and with a built in spatial 24index. It is developed and distributed by Extensis. This driver supports 25reading of MG4 LiDAR files using Extensis' decoding software development 26kit (DSDK). **This DSDK is freely distributed; but, it is not open 27source software. You should contact Extensis to obtain it (see link at 28end of this page).** 29 30Example View files (from View Document specification) 31----------------------------------------------------- 32 33Simplest possible .view file 34~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35 36The simplest way to view an MG4 file is to wrap it in a View (.view) 37file like this. Here, the relative reference to the MG4 file means that 38the file must exist in the same directory as the .view file. Since we're 39not mapping any bands explicitly, we get the default, which is elevation 40only. By default, we aggregate based on mean. That is, if two (or more) 41points land on a single cell, we will expose the average of the two. 42There's no filtering here so we'll get all the points regardless of 43classification code or return number. Since the native datatype of 44elevation is "Float64", that is the datatype of the band we will expose. 45 46:: 47 48 <PointCloudView> 49 <InputFile>Tetons.sid</InputFile> 50 </PointCloudView> 51 52Crop the data 53~~~~~~~~~~~~~ 54 55This is similar to the example above but we are using the optional 56ClipBox tag to select a 300 meter North-South swatch through the cloud. 57If we wanted to crop in the East-West directions, we could have 58specified that explicitly instead of using NOFITLER for those. 59Similarly, we could also have cropped in the Z direction as well. 60 61:: 62 63 <PointCloudView> 64 <InputFile>Tetons.sid</InputFile> 65 <ClipBox>505500 505800 NOFILTER NOFILTER</ClipBox> 66 </PointCloudView> 67 68Expose as a bare earth (Max) DEM 69~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 70 71Here, we expose a single band (elevation) but we want only those points 72that have been classified as "Ground". The ClassificationFilter 73specifies a value of 2 - the ASPRS Point Class code that stipulates 74"Ground" points. Additionally, instead of the default "Mean" aggregation 75method, we specify "Max". This means that if two (or more) points land 76on a single cell, we expose the larger of the two elevation values. 77 78:: 79 80 <PointCloudView> 81 <InputFile>E:\ESRIDevSummit2010\Tetons.sid</InputFile> 82 <Band> <!-- Max Bare Earth--> 83 <Channel>Z</Channel> 84 <AggregationMethod>Max</AggregationMethod> 85 <ClassificationFilter>2</ClassificationFilter> 86 </Band> 87 </PointCloudView> 88 89Intensity image 90~~~~~~~~~~~~~~~ 91 92Here we expose an intensity image from the point cloud. 93 94:: 95 96 <PointCloudView> 97 <InputFile>Tetons.sid</InputFile> 98 <Band> 99 <!-- All intensities --> 100 <Channel>Intensity</Channel> 101 </Band> 102 </PointCloudView> 103 104RGB image 105~~~~~~~~~ 106 107Some point cloud images include RGB data. If that's the case, you can 108use a .view file like this to expose that data. 109 110:: 111 112 <PointCloudView> 113 <InputFile>Grass Lake Small.xyzRGB.sid</InputFile> 114 <Band> 115 <Channel>Red</Channel> 116 </Band> 117 <Band> 118 <Channel>Green</Channel> 119 </Band> 120 <Band> 121 <Channel>Blue</Channel> 122 </Band> 123 </PointCloudView> 124 125Writing not supported 126--------------------- 127 128This driver does not support writing MG4 files. 129 130Limitations of current implementation 131------------------------------------- 132 133Only one *<InputFile>* tag is supported. It must reference an MG4 file. 134 135The only *<InterpolationMethod>* that is supported is *<None>* 136(default). Use this to specify a NODATA value if the default (maximum 137value of the datatype) is not what you want. See View Specification for 138details. 139 140There is insufficient error checking for format errors and invalid 141parameters. Many invalid entries will likely fail silently. 142 143See Also: 144--------- 145 146- Implemented as *gdal/frmts/mrsid_lidar/gdal_MG4Lidar.cpp* 147- :ref:`MrSID/MG4 LiDAR View Document 148 Specification <mg4lidar_view_point_cloud>` 149- `Extensis web site <http://www.extensis.com/support/developers>`__ 150 151.. toctree:: 152 :maxdepth: 1 153 :hidden: 154 155 mg4lidar_view_point_cloud 156