[libpc] Chipper notes
Michael P. Gerlek
mpg at flaxen.com
Wed Mar 23 19:14:59 EDT 2011
[from pastebin, here for posterity]
Step 1:
- chipper stage is connected to LAS reader stage
- for each point P, read in order by an iterator, do
. point P is recorded in chipper's memory as the tuple {point index
number, X, Y, Z}
Step 2:
- chipper groups all the tuples into blocks of tuples [no libPC/stage
action here?]
Step 3:
- for each chipper block B, do
. open a new Oracle blob
. for each tuple item T in block B do
- get point P from T.index
- write P to the blob
. close the blob
SequentialIterator # what we have now
- skip(count) # count is a positive, relative value
- bool atEnd()
- read(buffer) # reads N points [curIndex .. curIndex+N)
RandomIterator # what Mr Chips wants
- seek(pos) # pos is a positive, absolute value
- read(buffer) # reads N points [curIndex .. curIndex+N)
virtual bool Stage::supportsSequentialIterators() = 0
virtual SequentialIterator* Stage::createSequentialIterator() = 0
virtual bool Stage::supportsRandomIterators() = 0
virtual RandomIterator* Stage::createRandomIterator() = 0
SeqentialIterators only read "forwards", but RandomIterators can jump
around. But both iterators will respond with a contiguous block of points
from a read() call, which implies that even with a RandomIterator you have
some notion of sequencing.
It makes sense to keep these two kinds of iterators separate (as opposed to
adding a seek() method to the current, sequential iterator) because some
file formats (like LAZ) and some stages (like crop) have no reasonably way
to move their cursor to a given index position.
More information about the pdal
mailing list