本文整理汇总了C++中PointLayoutPtr::dimTypes方法的典型用法代码示例。如果您正苦于以下问题:C++ PointLayoutPtr::dimTypes方法的具体用法?C++ PointLayoutPtr::dimTypes怎么用?C++ PointLayoutPtr::dimTypes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointLayoutPtr
的用法示例。
在下文中一共展示了PointLayoutPtr::dimTypes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
XMLSchema::XMLSchema(const PointLayoutPtr& layout, MetadataNode m,
Orientation orientation) : m_orientation(orientation), m_metadata(m)
{
DimTypeList dimTypes = layout->dimTypes();
for (DimType& d : dimTypes)
m_dims.push_back(XMLDim(d, layout->dimName(d.m_id)));
}
示例2: prepared
// Build the list of dimensions for the output schema.
// Placing this here allows validation of dimensions before execution begins.
void DbWriter::prepared(PointTableRef table)
{
using namespace Dimension;
PointLayoutPtr layout = table.layout();
if (m_outputDims.empty())
{
for (auto& dimType : layout->dimTypes())
m_dbDims.push_back(XMLDim(dimType, layout->dimName(dimType.m_id)));
return;
}
DimTypeList dims;
for (std::string& s : m_outputDims)
{
DimType dt = layout->findDimType(s);
if (dt.m_id == Id::Unknown)
{
std::ostringstream oss;
oss << "Invalid dimension '" << s << "' specified for "
"'output_dims' option.";
throw pdal_error(oss.str());
}
m_dbDims.push_back(XMLDim(dt, layout->dimName(dt.m_id)));
}
}
示例3: Read
ReadCompressed::ReadCompressed(
PointViewPtr view,
const PointLayoutPtr layout,
const std::string& sessionId,
int offset,
int count)
: Read(view, layout, sessionId, true, offset, count)
, m_decompressionThread()
, m_compressionStream()
, m_decompressor(m_compressionStream, layout->dimTypes())
, m_done(false)
, m_doneCv()
, m_doneMutex()
, m_mutex()
{ }
示例4: prepared
void LasWriter::prepared(PointTableRef table)
{
FlexWriter::validateFilename(table);
PointLayoutPtr layout = table.layout();
// Make sure the dataformatID is set so that we can get the proper
// dimensions being written as part of the standard LAS record.
fillHeader();
// If we've asked for all dimensions, add to extraDims all dimensions
// in the layout that aren't already destined for LAS output.
if (m_extraDims.size() == 1 && m_extraDims[0].m_name == "all")
{
m_extraDims.clear();
Dimension::IdList ids = m_lasHeader.usedDims();
DimTypeList dimTypes = layout->dimTypes();
for (auto& dt : dimTypes)
{
if (!Utils::contains(ids, dt.m_id))
m_extraDims.push_back(
ExtraDim(layout->dimName(dt.m_id), dt.m_type));
}
}
m_extraByteLen = 0;
for (auto& dim : m_extraDims)
{
dim.m_dimType.m_id = table.layout()->findDim(dim.m_name);
if (dim.m_dimType.m_id == Dimension::Id::Unknown)
throwError("Dimension '" + dim.m_name + "' specified in "
"'extra_dim' option not found.");
m_extraByteLen += Dimension::size(dim.m_dimType.m_type);
log()->get(LogLevel::Info) << getName() << ": Writing dimension " <<
dim.m_name <<
"(" << Dimension::interpretationName(dim.m_dimType.m_type) <<
") " << " to LAS extra bytes." << std::endl;
}
}
示例5: dimTypes
DimTypeList DbWriter::dimTypes(PointTableRef table)
{
using namespace Dimension;
PointLayoutPtr layout = table.layout();
if (m_outputDims.empty())
return layout->dimTypes();
DimTypeList dims;
for (std::string& s : m_outputDims)
{
DimType dt = layout->findDimType(s);
if (dt.m_id == Id::Unknown)
{
std::ostringstream oss;
oss << "Invalid dimension '" << s << "' specified for "
"'output_dims' option.";
throw pdal_error(oss.str());
}
dims.push_back(dt);
}
return dims;
}