[pdal] Write and zip function based on PDAL
Michael P. Gerlek
mpg at flaxen.com
Thu Sep 8 19:04:09 EDT 2011
I'll post some writer code by tonight.
-mpg
From: pdal-bounces at lists.osgeo.org [mailto:pdal-bounces at lists.osgeo.org] On
Behalf Of ping yang
Sent: Thursday, September 08, 2011 2:50 PM
To: pdal at lists.osgeo.org
Subject: [pdal] Write and zip function based on PDAL
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/f56c6b61/attachment.html
More information about the pdal
mailing list