<div dir="ltr">Much better :-) !</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 23, 2014 at 11:40 AM, Anna Petrášová <span dir="ltr"><<a href="mailto:kratochanna@gmail.com" target="_blank">kratochanna@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Sep 23, 2014 at 8:19 AM, Newcomb, Doug <span dir="ltr"><<a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">It looks like the same patch needs to be applied to r.in.lidar main.c before line 791. So modifying to the following for both v.in.lidar and r.in.lidar  main.c should fix both?<div><br></div><div><div>if (n_returns == 1) {</div><div><br></div><div><span style="white-space:pre-wrap">           </span>switch (return_filter) {</div><div><span style="white-space:pre-wrap">         </span>case LAS_FIRST:</div><div><span style="white-space:pre-wrap">          </span>    if (return_no == 1)</div><div><span style="white-space:pre-wrap">                       </span>skipme = 0;</div><div><span style="white-space:pre-wrap">              </span>    break;</div></div><div>              }</div><div><div>if (n_returns > 1) {</div><div><br></div><div><span style="white-space:pre-wrap">         </span>switch (return_filter) {</div><div><span style="white-space:pre-wrap">         </span>case LAS_FIRST:</div><div><span style="white-space:pre-wrap">          </span>    if (return_no == 1)</div><div><span style="white-space:pre-wrap">                        </span>skipme = 0;</div><div><span style="white-space:pre-wrap">              </span>    break;</div><div><span style="white-space:pre-wrap">             </span>case LAS_LAST:</div><div><span style="white-space:pre-wrap">           </span>    if (return_no == n_returns)</div><div><span style="white-space:pre-wrap">                        </span>skipme = 0;</div><div><span style="white-space:pre-wrap">              </span>    break;</div><div><span style="white-space:pre-wrap">             </span>case LAS_MID:</div><div><span style="white-space:pre-wrap">            </span>    if (return_no > 1 && return_no < n_returns)</div><div><span style="white-space:pre-wrap">                  </span>skipme = 0;</div><div><span style="white-space:pre-wrap">              </span>    break;</div><div><span style="white-space:pre-wrap">             </span>}</div><span><font color="#888888"><div><br></div></font></span></div></div></blockquote><div><br></div></span><div>Thanks, I rewrote it but it should be hopefully the same logic:</div><span class=""><div><br></div>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">        switch (return_filter) {</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">        case LAS_FIRST:</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">            if (return_no == 1)</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">                skipme = 0;</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">            break;</font></pre>
</span><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">           case LAS_MID:</font></pre><span class="">
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">            if (return_no > 1 && return_no < n_returns)</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">                skipme = 0;</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">            break;</font></pre>
</span><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">           case LAS_LAST:</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">            if (n_returns > 1 && return_no == n_returns)</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">                skipme = 0;</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font color="#000000">            break;</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000" face="arial, helvetica, sans-serif">Committed in r62055 and backported.</font></pre><span class="HOEnZb"><font color="#888888"><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000" face="arial, helvetica, sans-serif"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000" face="arial, helvetica, sans-serif">Anna</font></pre></font></span><div><div class="h5"><pre style="margin-top:0px;margin-bottom:0px"><font color="#000000" face="arial, helvetica, sans-serif"><br></font></pre>
<div><span style="color:rgb(47,47,47)">       </span><span style="color:rgb(170,170,170)">}</span> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span><font color="#888888"><div></div><div>Doug</div><div><br></div></font></span></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 23, 2014 at 8:05 AM, Newcomb, Doug <span dir="ltr"><<a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I don't think it was intentional to drop first and only returns, but if it is the first and only return the filter for First and Last Return would both match.  <div>Putting another if statement in front along the lines of  if(n_returns == 1) set case LAS_FIRST should fix it.<div><div><br></div><div>Doug <div><br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Sep 22, 2014 at 6:54 PM, Anna Petrášová <span dir="ltr"><<a href="mailto:kratochanna@gmail.com" target="_blank">kratochanna@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr">Hi,<div><br></div><div>I want to import first return points with v.in.lidar, but I get only points where the pulse had more then one return. So it gives me trees but not ground or buildings. I looked in the code and there is an 'if' which skips points with only 1 return:</div><div><a href="http://trac.osgeo.org/grass/browser/grass/trunk/vector/v.in.lidar/main.c#L672" target="_blank">http://trac.osgeo.org/grass/browser/grass/trunk/vector/v.in.lidar/main.c#L672</a><br></div><div><br></div><div>So the behavior looks intentional but what's the reason?</div><div><br></div><div>Thanks,</div><div><br></div><div>Anna</div></div>
<br></div></div>_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><span><font color="#888888"><br></font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Doug Newcomb</div><div>USFWS</div><div>Raleigh, NC</div><div><a href="tel:919-856-4520%20ext.%2014" value="+19198564520" target="_blank">919-856-4520 ext. 14</a> <a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a></div><div>---------------------------------------------------------------------------------------------------------</div><div>The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior.   Life is too short for undocumented, proprietary data formats.</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Doug Newcomb</div><div>USFWS</div><div>Raleigh, NC</div><div><a href="tel:919-856-4520%20ext.%2014" value="+19198564520" target="_blank">919-856-4520 ext. 14</a> <a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a></div><div>---------------------------------------------------------------------------------------------------------</div><div>The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior.   Life is too short for undocumented, proprietary data formats.</div>
</div>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Doug Newcomb</div><div>USFWS</div><div>Raleigh, NC</div><div>919-856-4520 ext. 14 <a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a></div><div>---------------------------------------------------------------------------------------------------------</div><div>The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior.   Life is too short for undocumented, proprietary data formats.</div>
</div>