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

Method readV1

io/BpfHeader.cpp:162–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162bool BpfHeader::readV1(ILeStream& stream)
163{
164 m_log->get(LogLevel::Debug) << "BPF: Reading V1\n";
165
166 stream >> m_len;
167 stream >> m_version;
168
169 stream >> m_numPts >> m_numDim >> m_coordType >> m_coordId >> m_spacing;
170
171 if (m_version == 1)
172 m_pointFormat = BpfFormat::DimMajor;
173 else if (m_version == 2)
174 m_pointFormat = BpfFormat::PointMajor;
175 else
176 return false;
177
178 // Dimensions should include X, Y, and Z
179 m_numDim += 3;
180
181 BpfDimension xDim;
182 BpfDimension yDim;
183 BpfDimension zDim;
184
185 xDim.m_label = "X";
186 yDim.m_label = "Y";
187 zDim.m_label = "Z";
188
189 stream >> xDim.m_offset >> yDim.m_offset >> zDim.m_offset;
190 stream >> xDim.m_min >> xDim.m_max;
191 stream >> yDim.m_min >> yDim.m_max;
192 stream >> zDim.m_min >> zDim.m_max;
193
194 m_staticDims.resize(3);
195 m_staticDims[0] = xDim;
196 m_staticDims[1] = yDim;
197 m_staticDims[2] = zDim;
198 return (bool)stream;
199}
200
201
202bool BpfHeader::write(OLeStream& stream)

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected