Hi Michael and all,<div><br></div><div>I want to do more test on the writing and compressing function of the PDAL, is here someone has some code for the testing?</div><div>I looked into the C# tutorial of libLAS, </div><div>
<span class="Apple-style-span" style="color: rgb(62, 67, 73); font-family: Helvetica, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); "><pre style="overflow-x: auto; overflow-y: auto; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; background-color: rgb(238, 238, 238); color: rgb(34, 34, 34); line-height: 1.2em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(198, 201, 203); border-right-color: rgb(198, 201, 203); border-bottom-color: rgb(198, 201, 203); border-left-color: rgb(198, 201, 203); font-size: 1.2em; margin-top: 1.5em; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; -webkit-box-shadow: rgb(216, 216, 216) 1px 1px 1px; ">
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();
}
}</pre></span></div><div>However, it is not working in the PDAL. Can someone help me on this?</div><div><br></div><div>Regards</div><div><br></div><div>Ping<br clear="all"><div>------------------------</div>Ping Yang, Ph.D.<br>
Postdoctoral Research Associate<br>Idaho State University-Idaho Falls<br><a href="mailto:yangping@isu.edu">yangping@isu.edu</a><br>
</div>