[pdal] PointBuffer.getData format

Howard Butler hobu.inc at gmail.com
Thu Feb 7 17:54:38 PST 2013


On Feb 7, 2013, at 6:10 PM, Michael Weisman <mweisman at opengeo.org> wrote:

> Hi,
> 
> Just curious what exactly is in the raw byte data accessible with myPointBuffer.getData(0)? Postgres pointcloud's basic validation is not complaining if I insert a hex-encoded version of this, but the values all seem a bit off when I query the resulting db table.

It should be the front of the array, offset to the given index when the index is given as a point number.

There is no method for just setting the data for a PointBuffer yourself, and I don't see any reason why there can't be. Feel free to cook a pull request that copies in your data into the scoped_array of PointBuffer. We could make the m_data element something better, though at one time we wanted PointBuffer to be copy-constructable, which mean shying away from a heap-allocated, shared_ptr-managed entity. Maybe we can go back to this.

> 
> Alternatively, is there a better way to grab what I need from a PointBuffer and re-pack it into a hex-encoded binary myself?

PointBuffer::getData(0) should be the front of the array as dumb bytes.





More information about the pdal mailing list