~ubuntu-branches/ubuntu/trusty/liblas/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/tutorial/ironpython.txt

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2014-01-05 17:00:29 UTC
  • mfrom: (7.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140105170029-ddtp0j63x5jvck2u
Tags: 1.7.0+dfsg-2
Fixed missing linking of system boost component.
(closes: #733282)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _ironpython:
 
2
 
 
3
*********************************************
 
4
IronPython Tutorial
 
5
*********************************************
 
6
 
 
7
This basic tutorial explains how to use libLAS to read and write 
 
8
LIDAR data encoded in LAS file format from IronPython.
 
9
 
 
10
=============================================
 
11
Hello world
 
12
=============================================
 
13
 
 
14
.. code-block:: python
 
15
 
 
16
 import System
 
17
 import System.Text
 
18
 import LibLAS
 
19
 
 
20
 class Program(object):
 
21
        def Main(self, args):
 
22
                try:
 
23
                        try:
 
24
                                lasreader = LASReader()
 
25
                                lasheader = lasreader.GetHeader()
 
26
                                laswriter = LASWriter()
 
27
                                Console.WriteLine('Number of points in file= {0}', lasheader.PointRecordsCount)
 
28
                        except LASException, e:
 
29
                                Console.WriteLine('\nLASException! Msg: {0}', e.Message)
 
30
                        except None:
 
31
                                Console.WriteLine('Unknown exception caught')
 
32
                finally:
 
33
                        Console.WriteLine('Do i need something to do?')
 
34
                Console.WriteLine('End of file')
 
35
                Console.Read()
 
36