File: boo.txt

package info (click to toggle)
liblas 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,888 kB
  • ctags: 4,614
  • sloc: cpp: 31,630; xml: 4,195; python: 2,928; ansic: 2,439; cs: 2,411; sh: 143; makefile: 37
file content (42 lines) | stat: -rwxr-xr-x 1,180 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.. _boo:

*********************************************
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
=============================================

.. code-block:: python

 import System
 import System.Text
 import LibLAS
 

 [module]
 internal class Program:
 
 	private static def Main(args as (string)):
 		try:
 			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()
 				laswriter.WritePoint(laspoint)
 		except e as LASException:
 			Console.WriteLine('\nLASException! Msg: {0}', e.Message)
 		except :
 			Console.WriteLine('Unknown exception caught')
 		ensure:
 			Console.WriteLine('Do i need something to do?')
 		Console.WriteLine('End of file')
  		Console.Read()