[pdal] PCL filters in PDAL

Stephen Mather stephen at smathermather.com
Wed Feb 3 18:33:07 PST 2016


Ok, great leads here:

pdal translate 54001640PAN_heightasz.bpf 54001640PAN_heightasz_05-5.bpf -f
range --filters.range.limits="Height[0.5:5]"

And to include Bradley's offline example of calculating height on the fly
in order to filter:

pdal translate -i <input.bpf≥ -o <output.bpf> -f filters.height
filters.range --filters.range.limits="Height[0.5,5.0]"

And now when I run stats on it, it looks great:

pdal info --stats 54001640PAN_heightasz_05-5.bpf --dimensions "Height"

{

  "filename": "54001640PAN_heightasz_05-5.bpf",

  "pdal_version": "1.1.0 (git-version: 64c722)",

  "stats":

  {

    "statistic":

    [

      {

        "average": 1.759930532,

        "count": 612802,

        "maximum": 5,

        "minimum": 0.5,

        "name": "Height",

        "position": 0

      }

    ]

  }

}

Cheers!


On Tue, Feb 2, 2016 at 2:06 PM, Bradley Chambers <brad.chambers at gmail.com>
wrote:

> I'd recommend taking a look at the range filter for more generic
> dimensional filtering. PCL, and the PCLBlock filter in particular, lock us
> into predefined point types, where height isn't accounted for. I can send a
> more concrete example later this afternoon.
>
> Brad
>
> On Tue, Feb 2, 2016, 11:02 Stephen Mather <stephen at smathermather.com>
> wrote:
>
>> I am wondering if PCL filters in PDAL can be used on alternate
>> dimensions? In my case, Height (above ground) as calculated with the height
>> filter is the dimension in question.
>>
>> This is my passthrough JSON:
>>
>> ```
>> {
>>     "pipeline":
>>     {
>>         "name": "PassThroughExample",
>>         "filters":
>>         [
>>             {
>>                 "name": "PassThrough",
>>                 "setFilterFieldName": "Height",
>>                 "setFilterLimits":
>>                 {
>>                     "min": 0.5,
>>                     "max": 5
>>                 }
>>             }
>>         ]
>>     }
>> }
>> ```
>>
>> And I am running in docker. Here's my crude and confused BASH wrapper
>> script to which I pass all files matching a find:
>>
>> ```
>> #!/bin/bash
>> pathname="${1%/*}"
>> name=`basename $1 .bpf`
>>
>> docker run -v $pathname:/data pdal/master pdal pcl -i //data/"$name".bpf
>> -p //data/5.0.filter.json -o //data/"$name"_5.0.bpf;
>> ```
>> This will work of course if my setFilterFieldName is Z, but not Height
>> (no matter the capitalization.
>>
>> Thanks in advance,
>> Best,
>> Steve
>> _______________________________________________
>> pdal mailing list
>> pdal at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pdal
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20160203/65123fb6/attachment-0001.html>


More information about the pdal mailing list