[GRASS-dev] v.in.lidar return filter
Newcomb, Doug
doug_newcomb at fws.gov
Tue Sep 23 09:51:12 PDT 2014
Much better :-) !
On Tue, Sep 23, 2014 at 11:40 AM, Anna Petrášová <kratochanna at gmail.com>
wrote:
>
>
> On Tue, Sep 23, 2014 at 8:19 AM, Newcomb, Doug <doug_newcomb at fws.gov>
> wrote:
>
>> 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?
>>
>> if (n_returns == 1) {
>>
>> switch (return_filter) {
>> case LAS_FIRST:
>> if (return_no == 1)
>> skipme = 0;
>> break;
>> }
>> if (n_returns > 1) {
>>
>> switch (return_filter) {
>> case LAS_FIRST:
>> if (return_no == 1)
>> skipme = 0;
>> break;
>> case LAS_LAST:
>> if (return_no == n_returns)
>> skipme = 0;
>> break;
>> case LAS_MID:
>> if (return_no > 1 && return_no < n_returns)
>> skipme = 0;
>> break;
>> }
>>
>>
> Thanks, I rewrote it but it should be hopefully the same logic:
>
> switch (return_filter) {
>
> case LAS_FIRST:
>
> if (return_no == 1)
>
> skipme = 0;
>
> break;
>
> case LAS_MID:
>
> if (return_no > 1 && return_no < n_returns)
>
> skipme = 0;
>
> break;
>
> case LAS_LAST:
>
> if (n_returns > 1 && return_no == n_returns)
>
> skipme = 0;
>
> break;
>
>
> Committed in r62055 and backported.
>
>
> Anna
>
>
> }
>
>> Doug
>>
>>
>> On Tue, Sep 23, 2014 at 8:05 AM, Newcomb, Doug <doug_newcomb at fws.gov>
>> wrote:
>>
>>> 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.
>>> Putting another if statement in front along the lines of if(n_returns
>>> == 1) set case LAS_FIRST should fix it.
>>>
>>> Doug
>>>
>>>
>>> On Mon, Sep 22, 2014 at 6:54 PM, Anna Petrášová <kratochanna at gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> 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:
>>>>
>>>> http://trac.osgeo.org/grass/browser/grass/trunk/vector/v.in.lidar/main.c#L672
>>>>
>>>> So the behavior looks intentional but what's the reason?
>>>>
>>>> Thanks,
>>>>
>>>> Anna
>>>>
>>>> _______________________________________________
>>>> grass-dev mailing list
>>>> grass-dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/grass-dev
>>>>
>>>
>>>
>>>
>>> --
>>> Doug Newcomb
>>> USFWS
>>> Raleigh, NC
>>> 919-856-4520 ext. 14 doug_newcomb at fws.gov
>>>
>>> ---------------------------------------------------------------------------------------------------------
>>> 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.
>>>
>>
>>
>>
>> --
>> Doug Newcomb
>> USFWS
>> Raleigh, NC
>> 919-856-4520 ext. 14 doug_newcomb at fws.gov
>>
>> ---------------------------------------------------------------------------------------------------------
>> 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.
>>
>
>
--
Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newcomb at fws.gov
---------------------------------------------------------------------------------------------------------
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140923/4005728d/attachment-0001.html>
More information about the grass-dev
mailing list