Changeset 905
- Timestamp:
- 10/09/08 08:30:23 (3 months ago)
- Files:
-
- 1 modified
-
trunk/csharp/HelloWorldLAS/Program.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/csharp/HelloWorldLAS/Program.cs
r870 r905 1 1 using System; 2 3 2 using System.Text; 4 5 3 using LibLAS; 6 7 8 4 9 5 class Program 10 6 { 11 12 13 7 static void Main(string[] args) 14 8 { 15 16 17 9 try 18 10 { 19 LASReader lasreader = new LASReader(@"c:\las\sample_our2.las");11 LASReader lasreader = new LASReader(@"c:\las\sample_our2.las"); 20 12 21 LASPoint laspoint;13 LASPoint laspoint; 22 14 23 LASHeader lasheader = lasreader.GetHeader();24 Console.WriteLine(lasheader.SoftwareId);//25 lasheader.VersionMinor = 0;26 LASWriter laswriter = new LASWriter(@"c:\las\sample_our.las", lasheader, LASReadWriteMode.LASModeWrite);15 LASHeader lasheader = lasreader.GetHeader(); 16 Console.WriteLine(lasheader.SoftwareId);// 17 lasheader.VersionMinor = 0; 18 LASWriter laswriter = new LASWriter(@"c:\las\sample_our.las", lasheader, LASReadWriteMode.LASModeWrite); 27 19 28 Console.WriteLine("Number of points in file= {0}", lasheader.PointRecordsCount);20 Console.WriteLine("Number of points in file= {0}", lasheader.PointRecordsCount); 29 21 30 while (lasreader.GetNextPoint()) 31 { 22 while (lasreader.GetNextPoint()) 23 { 24 laspoint = lasreader.GetPoint(); 25 laspoint.X = laspoint.X + 3; 32 26 33 laspoint = lasreader.GetPoint(); 34 laspoint.X = laspoint.X + 3; 27 //Console.WriteLine(laspoint.X + "," + laspoint.Y + "," + laspoint.Z); 35 28 36 //Console.WriteLine(laspoint.X + "," + laspoint.Y + "," + laspoint.Z); 37 38 laswriter.WritePoint(laspoint); 39 40 } 41 29 laswriter.WritePoint(laspoint); 30 } 42 31 } 43 32 catch (LASException e) 44 33 { 45 34 Console.WriteLine("\nLASException! Msg: {0}", e.Message); 35 } 36 catch (SystemException e) 37 { 38 Console.WriteLine("\nException! Msg: {0}", e.Message); 46 39 } 47 40 catch … … 57 50 } 58 51 } 59
