[pdal] Write and zip function based on PDAL

ping yang pingyang.whu at gmail.com
Thu Sep 8 17:50:15 EDT 2011


Hi Michael and all,

I want to do more test on the writing and compressing function of the PDAL,
is here someone has some code for the testing?
I looked into the C# tutorial of libLAS,

using System;
using System.Text;
using LibLAS;

class Program
{
   static void Main(string[] args)

   {
       try
       {
           LASReader lasreader = new LASReader(@"F:\sample_in.las");
           LASPoint laspoint;
           LASHeader lasheader = lasreader.GetHeader();
           LASWriter laswriter = new LASWriter(@"F:\sample_out.las",
lasheader, LASReadWriteMode.LASModeWrite);
           Console.WriteLine("Number of points in file= {0}",
lasheader.PointRecordsCount);

           while (lasreader.GetNextPoint())
           {
               laspoint = lasreader.GetPoint();
               //Console.WriteLine(laspoint.X + "," + laspoint.Y + ","
+ laspoint.Z);
               laswriter.WritePoint(laspoint);
           }
       }
       catch (LASException e)
       {
           Console.WriteLine("\nLASException! Msg: {0}", e.Message);
       }
       catch
       {
           Console.WriteLine("Unknown exception caught");
       }
       finally
       {
           Console.WriteLine("Do i need something to do?");
       }

       Console.WriteLine("End of file");
       Console.Read();
   }
}

However, it is not working in the PDAL. Can someone help me on this?

Regards

Ping
------------------------
Ping Yang, Ph.D.
Postdoctoral Research Associate
Idaho State University-Idaho Falls
yangping at isu.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pdal/attachments/20110908/d0034a5a/attachment.html


More information about the pdal mailing list