本文整理汇总了C++中PointBuffer::getSpatialBounds方法的典型用法代码示例。如果您正苦于以下问题:C++ PointBuffer::getSpatialBounds方法的具体用法?C++ PointBuffer::getSpatialBounds怎么用?C++ PointBuffer::getSpatialBounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointBuffer
的用法示例。
在下文中一共展示了PointBuffer::getSpatialBounds方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateBounds
void InPlaceReprojection::updateBounds(PointBuffer& buffer)
{
const Bounds<double>& oldBounds = buffer.getSpatialBounds();
double minx = oldBounds.getMinimum(0);
double miny = oldBounds.getMinimum(1);
double minz = oldBounds.getMinimum(2);
double maxx = oldBounds.getMaximum(0);
double maxy = oldBounds.getMaximum(1);
double maxz = oldBounds.getMaximum(2);
try
{
m_reprojectionFilter.transform(minx, miny, minz);
m_reprojectionFilter.transform(maxx, maxy, maxz);
}
catch (pdal::pdal_error&)
{
return;
}
Bounds<double> newBounds(minx, miny, minz, maxx, maxy, maxz);
buffer.setSpatialBounds(newBounds);
return;
}
示例2:
boost::uint32_t ByteSwap::processBuffer(PointBuffer& dstData, const PointBuffer& srcData) const
{
const Schema& dstSchema = dstData.getSchema();
schema::index_by_index const& dstDims = dstSchema.getDimensions().get<schema::index>();
dstData.setSpatialBounds(srcData.getSpatialBounds());
dstData.copyPointsFast(0, 0, srcData, srcData.getNumPoints());
dstData.setNumPoints(srcData.getNumPoints());
for (boost::uint32_t i = 0; i != dstData.getNumPoints(); ++i)
{
boost::uint8_t* data = dstData.getData(i);
std::size_t position = 0;
for (boost::uint32_t n = 0; n < dstDims.size(); ++n)
{
const Dimension& d = dstSchema.getDimension(n);
std::size_t size = d.getByteSize();
boost::uint8_t* pos = data + position;
SWAP_ENDIANNESS_N(*pos, size);
position = position + size;
}
}
return dstData.getNumPoints();
}
示例3: setNumPoints
Reader::Reader(const Options& options, const PointBuffer& buffer)
: pdal::Reader(options)
, m_buffer(buffer)
{
setNumPoints(buffer.getNumPoints());
setBounds(buffer.getSpatialBounds());
setSchema(buffer.getSchema());
setPointCountType(PointCount_Fixed);
return;
}