[pdal] filter on return value
Howard Butler
howard at hobu.co
Thu Jun 4 06:11:05 PDT 2015
Luca,
Yes these two are somewhat overlapping in functionality, but the predicate filter is much more powerful in exchange for being a bit slower and definitely more complex. The intention is that filters.range is for when you can do simple attribute-based filters, and predicate/programmable are for when you want to do something with complex logic without having to write an entire filter in C++ to do it.
The problem with --last-return-only is that it is a complex expression that means, “keep points where ReturnNumber==NumberOfReturns”. You can’t do that in a single filters.range invocation. You instead would have to make a filters.range for each last return combination, and then filters.merge them altogether afterward.
See https://github.com/PDAL/PDAL/blob/master/test/data/plang/predicate-keep-last-return.xml.in for an example of how to use the predicate filter to keep last returns.
Hope this helps,
Howard
> On Jun 4, 2015, at 7:49 AM, Bradley Chambers <brad.chambers at gmail.com> wrote:
>
> Luca,
>
> I've never tried the Range filter with Return Number, but I think it should work. It will definitely work with multiple dimensions.
>
> Brad
>
> On Thu, Jun 4, 2015 at 6:40 AM Luca Delucchi <lucadeluge at gmail.com> wrote:
> On 3 June 2015 at 16:49, Connor Manning <connor at hobu.co> wrote:
> > How about the predicate filter:
> > http://www.pdal.io/stages/filters.predicate.html
> >
>
> Could filter.range be used also for this scope?
>
> http://www.pdal.io/stages/filters.range.html
>
> maybe it should be enough replace "Classification" with "ReturnNumber"
>
>
> --
> ciao
> Luca
>
> http://gis.cri.fmach.it/delucchi/
> www.lucadelu.org
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pdal
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pdal
More information about the pdal
mailing list