<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 class="" style="white-space:pre">           </span>switch (return_filter) {</div><div><span class="" style="white-space:pre">           </span>case LAS_FIRST:</div><div><span class="" style="white-space:pre">            </span>    if (return_no == 1)</div><div><span class="" style="white-space:pre">                 </span>skipme = 0;</div><div><span class="" style="white-space:pre">                </span>    break;</div></div><div>              }</div><div><div>if (n_returns > 1) {</div><div><br></div><div><span class="" style="white-space:pre">           </span>switch (return_filter) {</div><div><span class="" style="white-space:pre">           </span>case LAS_FIRST:</div><div><span class="" style="white-space:pre">            </span>    if (return_no == 1)</div><div><span class="" style="white-space:pre">                  </span>skipme = 0;</div><div><span class="" style="white-space:pre">                </span>    break;</div><div><span class="" style="white-space:pre">               </span>case LAS_LAST:</div><div><span class="" style="white-space:pre">             </span>    if (return_no == n_returns)</div><div><span class="" style="white-space:pre">                  </span>skipme = 0;</div><div><span class="" style="white-space:pre">                </span>    break;</div><div><span class="" style="white-space:pre">               </span>case LAS_MID:</div><div><span class="" style="white-space:pre">              </span>    if (return_no > 1 && return_no < n_returns)</div><div><span class="" style="white-space:pre">                    </span>skipme = 0;</div><div><span class="" style="white-space:pre">                </span>    break;</div><div><span class="" style="white-space:pre">               </span>}</div><div><br></div><div>Doug</div><div><br></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:0 0 0 .8ex;border-left:1px #ccc 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 class="h5">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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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 class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><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>
</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>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>