MCPcopy Create free account
hub / github.com/PDAL/PDAL / addDimensions

Method addDimensions

plugins/e57/io/E57Writer.cpp:167–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void E57Writer::addDimensions(PointLayoutPtr layout)
168{
169 m_extraDims.reset(new e57plugin::ExtraDims());
170 m_extraDims->parse(m_extraDimsSpec);
171 auto i = m_extraDims->begin();
172 auto supportedFields = e57plugin::supportedE57Types();
173
174 // Filter extra dimensions.
175 while (i != m_extraDims->end())
176 {
177 i->m_id = layout->findDim(i->m_name);
178 if (i->m_id == Dimension::Id::Unknown)
179 {
180 // Incomming layout donot provide any data for this dimension.
181 // It should be ignored from writing in E57.
182 log()->get(LogLevel::Warning)
183 << "Extra dimension specified in pipeline don't match in source point cloud."
184 " Ignoring pipeline-specified dimension : " << i->m_name << std::endl;
185 i = m_extraDims->deleteDim(i);
186 continue;
187 }
188
189 if (Utils::contains(supportedFields, i->m_name))
190 {
191 // This dimension is already in E57 dimensions and should not be treated as extra dimension.
192 i = m_extraDims->deleteDim(i);
193 continue;
194 }
195
196 ++i;
197 }
198}
199
200void E57Writer::ready(PointTableRef table)
201{

Callers

nothing calls this directly

Calls 10

supportedE57TypesFunction · 0.85
deleteDimMethod · 0.80
logFunction · 0.50
containsFunction · 0.50
resetMethod · 0.45
parseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findDimMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected