本文整理汇总了C++中dimension::IdList::size方法的典型用法代码示例。如果您正苦于以下问题:C++ IdList::size方法的具体用法?C++ IdList::size怎么用?C++ IdList::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dimension::IdList
的用法示例。
在下文中一共展示了IdList::size方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadBpfDimensions
void BpfWriter::loadBpfDimensions(PointLayoutPtr layout)
{
// Verify that we have X, Y and Z and that they're the first three
// dimensions.
Dimension::IdList dims = layout->dims();
std::sort(dims.begin(), dims.end());
if (dims.size() < 3 || dims[0] != Dimension::Id::X ||
dims[1] != Dimension::Id::Y || dims[2] != Dimension::Id::Z)
{
throw pdal_error("Missing one of dimensions X, Y or Z. "
"Can't write BPF.");
}
for (auto id : dims)
{
BpfDimension dim;
dim.m_id = id;
dim.m_label = layout->dimName(id);
m_dims.push_back(dim);
}
}
示例2: loadBpfDimensions
void BpfWriter::loadBpfDimensions(PointLayoutPtr layout)
{
Dimension::IdList dims;
if (m_outputDims.size())
{
for (std::string& s : m_outputDims)
{
Dimension::Id::Enum id = layout->findDim(s);
if (id == Dimension::Id::Unknown)
{
std::ostringstream oss;
oss << "Invalid dimension '" << s << "' specified for "
"'output_dims' option.";
throw pdal_error(oss.str());
}
dims.push_back(id);
}
}
else
dims = layout->dims();
// Verify that we have X, Y and Z and that they're the first three
// dimensions.
std::sort(dims.begin(), dims.end());
if (dims.size() < 3 || dims[0] != Dimension::Id::X ||
dims[1] != Dimension::Id::Y || dims[2] != Dimension::Id::Z)
{
throw pdal_error("Missing one of dimensions X, Y or Z. "
"Can't write BPF.");
}
for (auto id : dims)
{
BpfDimension dim;
dim.m_id = id;
dim.m_label = layout->dimName(id);
m_dims.push_back(dim);
}
}