void FauxReader::addDimensions(PointContextRef ctx) { ctx.registerDims(getDefaultDimensions()); if (m_numReturns > 0) { ctx.registerDim(Dimension::Id::ReturnNumber); ctx.registerDim(Dimension::Id::NumberOfReturns); } }
void GreyhoundReader::addDimensions(PointContextRef pointContext) { // Get Greyhound schema. exchanges::GetSchema schemaExchange(m_sessionId); m_wsClient.exchange(schemaExchange); m_dimData = schemaExchange.schema(); for (auto dim : m_dimData) { pointContext.registerDim(dim.id, dim.type); m_pointByteSize += pdal::Dimension::size(dim.type); } }
void QfitReader::addDimensions(PointContextRef ctx) { using namespace Dimension; m_size = 0; ctx.registerDim(Id::OffsetTime); ctx.registerDim(Id::Y); ctx.registerDim(Id::X); ctx.registerDim(Id::Z); ctx.registerDim(Id::StartPulse); ctx.registerDim(Id::ReflectedPulse); ctx.registerDim(Id::ScanAngleRank); ctx.registerDim(Id::Pitch); ctx.registerDim(Id::Roll); m_size += 36; if (m_format == QFIT_Format_12) { ctx.registerDim(Id::Pdop); ctx.registerDim(Id::PulseWidth); m_size += 8; } else if (m_format == QFIT_Format_14) { ctx.registerDim(Id::PassiveSignal); ctx.registerDim(Id::PassiveY); ctx.registerDim(Id::PassiveX); ctx.registerDim(Id::PassiveZ); m_size += 16; } m_size += 4; // For the GPS time that we currently discard. }
void TerrasolidReader::addDimensions(PointContextRef ctx) { m_size = 0; ctx.registerDim(Dimension::Id::Classification); ctx.registerDim(Dimension::Id::PointSourceId); ctx.registerDim(Dimension::Id::Intensity); ctx.registerDim(Dimension::Id::X); ctx.registerDim(Dimension::Id::Y); ctx.registerDim(Dimension::Id::Z); if (m_format == TERRASOLID_Format_2) { ctx.registerDim(Dimension::Id::ReturnNumber); ctx.registerDim(Dimension::Id::Flag); ctx.registerDim(Dimension::Id::Mark); } if (m_format == TERRASOLID_Format_1) m_size = 16; else if (m_format == TERRASOLID_Format_2) m_size = 20; if (m_haveTime) { ctx.registerDim(Dimension::Id::OffsetTime); m_size += 4; } if (m_haveColor) { ctx.registerDim(Dimension::Id::Red); ctx.registerDim(Dimension::Id::Green); ctx.registerDim(Dimension::Id::Blue); ctx.registerDim(Dimension::Id::Alpha); m_size += 4; } }