Boo Tutorial

This basic tutorial explains how to use libLAS to read and write LIDAR data encoded in LAS file format from Boo.

Hello world

import System
import System.Text
import LibLAS

internal class Program:

       private static def Main(args as (string)):
                       lasreader = LASReader('F:\\sample_in.las')
                       laspoint as LASPoint
                       lasheader as LASHeader = lasreader.GetHeader()
                       laswriter = LASWriter('F:\\sample_out.las', lasheader, LASReadWriteMode.LASModeWrite)
                       Console.WriteLine('Number of points in file= {0}', lasheader.PointRecordsCount)
                       while lasreader.GetNextPoint():
                               laspoint = lasreader.GetPoint()
               except e as LASException:
                       Console.WriteLine('\nLASException! Msg: {0}', e.Message)
               except :
                       Console.WriteLine('Unknown exception caught')
                       Console.WriteLine('Do i need something to do?')
               Console.WriteLine('End of file')