[Liblas-devel] Reading N points
Michael P. Gerlek
mpg at flaxen.com
Mon Jan 17 11:28:35 EST 2011
Fellow liblas-devels:
It would be Good Thing to have a ReadPoints function, which would have
the ability to return N points at once. For some workflows, this would
be arguably more efficient and cleaner than calling ReadPoint N times
manually.
Hobu suggests this should be called ReadPointsAt(), which first does a
seek for you to wherever you want to go today. That makes sense.
A deeper question, though, is this: what does the function return?
* Hobu suggests returning a const_iterator, to allow you to walk all
the points yourself without having to allocate a huge amount of memory.
* mpg suggests returning a Point[] array, or perhaps a
std::vector<Point>, of a length that is passed in to the function.
I think these two approaches are looking at the problem in different
ways, but are functionally equivalent. Also, Hobu's idea is more modern
C++ fashion, while my idea is more friendly to swig interfaces.
[although I agree swig should not be a primary design goal]
What do others think of blocked read support?
-mpg
More information about the Liblas-devel
mailing list