3
*********************************************
5
*********************************************
7
This basic tutorial explains how to use libLAS to read and write
8
LIDAR data encoded in LAS file format from VB.NET.
10
=============================================
12
=============================================
14
.. code-block:: python
20
Private Shared Sub Main(args As String())
22
Dim lasreader As New LASReader("F:\sample_in.las")
23
Dim laspoint As LASPoint
24
Dim lasheader As LASHeader = lasreader.GetHeader()
25
Dim laswriter As New LASWriter("F:\sample_out.las", lasheader, LASReadWriteMode.LASModeWrite)
26
Console.WriteLine("Number of points in file= {0}", lasheader.PointRecordsCount)
27
While lasreader.GetNextPoint()
28
laspoint = lasreader.GetPoint()
29
'Console.WriteLine(laspoint.X + "," + laspoint.Y + "," + laspoint.Z);
30
laswriter.WritePoint(laspoint)
32
Catch e As LASException
33
Console.WriteLine("" & Chr(10) & "LASException! Msg: {0}", e.Message)
35
Console.WriteLine("Unknown exception caught")
37
Console.WriteLine("Do i need something to do?")
39
Console.WriteLine("End of file")