3
*********************************************
5
*********************************************
7
This basic tutorial explains how to use libLAS to read and write
8
LIDAR data encoded in LAS file format from C#.
10
=============================================
12
=============================================
22
static void Main(string[] args)
27
LASReader lasreader = new LASReader(@"F:\sample_in.las");
29
LASHeader lasheader = lasreader.GetHeader();
30
LASWriter laswriter = new LASWriter(@"F:\sample_out.las", lasheader, LASReadWriteMode.LASModeWrite);
31
Console.WriteLine("Number of points in file= {0}", lasheader.PointRecordsCount);
33
while (lasreader.GetNextPoint())
35
laspoint = lasreader.GetPoint();
36
//Console.WriteLine(laspoint.X + "," + laspoint.Y + "," + laspoint.Z);
37
laswriter.WritePoint(laspoint);
40
catch (LASException e)
42
Console.WriteLine("\nLASException! Msg: {0}", e.Message);
46
Console.WriteLine("Unknown exception caught");
50
Console.WriteLine("Do i need something to do?");
53
Console.WriteLine("End of file");
b'\\ No newline at end of file'