<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 23, 2016 at 5:02 PM, Jason Overland <span dir="ltr"><<a href="mailto:joverland@lizardtech.com" target="_blank">joverland@lizardtech.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal">I’m trying to use PDAL’s C++ API to read BPF files and integrate it into our existing API.
<span>In our API we expose an iterator called PointIterator which is constructed from a file and a region (bounding box). Our PointIterator has a getNextPoints() method which walks the specified region of the point cloud until there are
no more points to extract. </span>To work within this existing API we would like to use a chunking/streaming/stripping/iteration mechanism, i.e. read at most n points at a time from the file, stop and return execution to our API user’s code, and then continue
where we left off on the next call to <span>getNextPoints()</span>, rinse and repeat until we’ve read all the points we’re interested in. I’ve been looking at the Streaming support as exemplified in StreamingTest.cpp but haven’t quite been
able to wrap my head around whether or not what I’m trying to achieve is currently possible.</p></div></div></blockquote><div><br></div><div>The issue is that PDAL's API works in a manner opposite to yours. PDAL expects to call your code when a point has been read, rather than the other way around. PDAL handles the point buffering and so on, relieving your code of the burden. PDAL wants to run an entire pipeline -- it's not intended as a stand-along point-by-point reader. Without seeing your processing code, I can't provide any advice on how to make it work with the existing API.</div><div><br></div><div>That said, I understand that this doesn't meet your model and your model isn't unreasonable. I don't know where doing something like this might fit in our current priority list, but it's probably not too large a task.</div><div><br></div></div>-- <br><div class="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div>
</div></div>