[GRASS-dev] Fwd: v.in.lidar return filter

Newcomb, Doug doug_newcomb at fws.gov
Tue Sep 23 11:39:17 PDT 2014


Bringing a side conversation on testing the filtering features  v.in.lidar
and r.in.lidar  into the dev list.

 As I recall, Hamish had something similar working in r.in.xyz with regard
to filtering by z value, but analyzing another variable.

Doug


---------- Forwarded message ----------
From: Newcomb, Doug <doug_newcomb at fws.gov>
Date: Tue, Sep 23, 2014 at 1:30 PM
Subject: Re: [GRASS-dev] v.in.lidar return filter
To: Markus Neteler <neteler at osgeo.org>


Markus,
Here is the result of subtracting the max elevation from the dsm created
from the first returns using v.surt.rst (Height are in feet) . The raster
resolution is 20ft, but I generated the dsm with a 3 ft minimum point
distance.  I would expect the max height to be higher in most cases.

It looks like the 1st returns are being filtered correctly.


Doug


On Tue, Sep 23, 2014 at 12:57 PM, Newcomb, Doug <doug_newcomb at fws.gov>
wrote:

> Working with a test lidar data set from NC mountains ( better quality) .
> Imported 2.6million points using v.in.lidar for all points .  Then went
> back and just imported first returns.  Got a reasonable number , so I'm
> creating a DSM from the 1st returns and will compare it to same resolution
> r.in.lidar for max.
>
> Filtering by return number and processing for intensity on first, mid, and
> last returns seems to do a good job on contrasting coniferous vs deciduous
> at the top of canopy, midstory, and groundcover look interesting too!
>
> When I tried to filter  for Z value of elevation 2000-7000 ft, I got
> nodata on the entire layer.  When I changed the Z range to 50 - 200 , I got
> some data with some nodata.
>
>  I'm guessing that the Z value filter is working on the intensity values
> instead of the Z values.
>
> Doug
>
>
>
> On Tue, Sep 23, 2014 at 11:33 AM, Markus Neteler <neteler at osgeo.org>
> wrote:
>
>> Anna just fixed it in trunk.
>> Please try...
>>
>>
>>
>> On Tue, Sep 23, 2014 at 4:51 PM, Newcomb, Doug <doug_newcomb at fws.gov>
>> wrote:
>> > not yet, I was just speculating from looking at the  source.  I will
>> try to
>> > compile from edits to svn this afternoon.   If it works, I'll send a
>> diff.
>> >
>> > Doug
>> >
>> >
>> >
>> > On Tue, Sep 23, 2014 at 10:18 AM, Markus Neteler <neteler at osgeo.org>
>> wrote:
>> >>
>> >> Did you modify your local file? If yes, could you pls send me a diff
>> >> against SVN or the full file? Then merging is easier...
>> >>
>> >> thanks
>> >> Markus
>> >>
>> >> On Tue, Sep 23, 2014 at 2:19 PM, 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;
>> >> > }
>> >> >
>> >> > 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.
>> >> >
>> >> > _______________________________________________
>> >> > 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.



-- 
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/ddd2ed01/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subtracting_max_r.in.lidar_from_1st_return_dsm.png
Type: image/png
Size: 401575 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140923/ddd2ed01/attachment-0001.png>


More information about the grass-dev mailing list