<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I&#8217;ll post some writer code by tonight.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>-mpg<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> pdal-bounces@lists.osgeo.org [mailto:pdal-bounces@lists.osgeo.org] <b>On Behalf Of </b>ping yang<br><b>Sent:</b> Thursday, September 08, 2011 2:50 PM<br><b>To:</b> pdal@lists.osgeo.org<br><b>Subject:</b> [pdal] Write and zip function based on PDAL<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Hi Michael and all,<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>I want to do more test on the writing and compressing function of the PDAL, is here someone has some code for the testing?<o:p></o:p></p></div><div><p class=MsoNormal>I looked into the C# tutorial of libLAS,&nbsp;<o:p></o:p></p></div><div><div style='mso-element:para-border-div;border:solid #C6C9CB 1.0pt;padding:8.0pt 8.0pt 8.0pt 8.0pt;background:#EEEEEE'><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in;overflow-x: auto;overflow-y: auto;-webkit-box-shadow: rgb(216, 216, 216) 1px 1px 1px'><span style='font-size:12.0pt;color:#222222;background:white'><o:p>&nbsp;</o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>using System;<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>using System.Text;<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>using LibLAS;<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'><o:p>&nbsp;</o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>class Program<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>{<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp; static void Main(string[] args)<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'><o:p>&nbsp;</o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp; {<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LASReader lasreader = new LASReader(@&quot;F:\sample_in.las&quot;);<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LASPoint laspoint;<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LASHeader lasheader = lasreader.GetHeader();<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LASWriter laswriter = new LASWriter(@&quot;F:\sample_out.las&quot;, lasheader, LASReadWriteMode.LASModeWrite);<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(&quot;Number of points in file= {0}&quot;, lasheader.PointRecordsCount);<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'><o:p>&nbsp;</o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (lasreader.GetNextPoint())<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;laspoint = lasreader.GetPoint();<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Console.WriteLine(laspoint.X + &quot;,&quot; + laspoint.Y + &quot;,&quot; + laspoint.Z);<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; laswriter.WritePoint(laspoint);<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch (LASException e)<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(&quot;\nLASException! Msg: {0}&quot;, e.Message);<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(&quot;Unknown exception caught&quot;);<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; finally<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(&quot;Do i need something to do?&quot;);<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'><o:p>&nbsp;</o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(&quot;End of file&quot;);<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.Read();<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>&nbsp;&nbsp; }<o:p></o:p></span></pre><pre style='mso-margin-top-alt:.25in;margin-right:0in;margin-bottom:.25in;margin-left:0in;line-height:14.4pt;background:#EEEEEE;border:none;padding:0in'><span style='font-size:12.0pt;color:#222222;background:white'>}<o:p></o:p></span></pre></div></div><div><p class=MsoNormal>However, it is not working in the PDAL. Can someone help me on this?<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Regards<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Ping<br clear=all><o:p></o:p></p><div><p class=MsoNormal>------------------------<o:p></o:p></p></div><p class=MsoNormal>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><o:p></o:p></p></div></div></div></body></html>