[pdal] Fwd: calculate CHM

Andrew Bell andrew.bell.ia at gmail.com
Mon Jun 22 05:42:36 PDT 2015


On Mon, Jun 22, 2015 at 3:20 AM, Luca Delucchi <lucadeluge at gmail.com> wrote:

> Hi devs,
>
> I'm trying to calculate CHM using filters.programmable but I have some
> problems with points close to the DTM border and so I'm not able to
> update the Z value for these points.
>
> My idea is to use  filters.predicate to remove these point outside the
> DTM and later run the filters.programmable, but I don't know
> concatenate the two filter, it seems each filter neeeds a Reader tag
> and I don't know how to tell to second filter to read the output of
> the first.
>

Filters can feed one another:

<?xml version="1.0"?>
<Pipeline version="1.0">
<Writer type="writers.las")
  <Option name="filename">out.las</Option>
  <Filter type="filters.programmable">
  <Option name="source">
import numpy as np
def myfunc(ins,outs)
  val = ins['Y']
  outs['Y'] = val * 1.05
  return True
  </Option>
  <Filter type="filters.crop>
    <Option name="bounds">
        ([1,1.1],[2,2.2])
    </Option>
    <Reader name="readers.las"
      <Option="filename">in.las</Option>
    </Reader>
  </Filter>
  </Filter>
</Writer>
</Pipeline>

(Not tested)

We're working on getting more examples written and posted in the
documentation.  Write back if you have questions.

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20150622/0352c854/attachment.html>


More information about the pdal mailing list