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

Method readAddon

io/private/ept/TileContents.cpp:145–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143#endif // PDAL_HAVE_ZSTD
144
145void TileContents::readAddon(const Addon& addon)
146{
147 m_addonTables[addon.localId()] = nullptr;
148
149 point_count_t addonPoints = addon.points(key());
150 if (addonPoints == 0)
151 return;
152
153 // If the addon hierarchy exists, it must match the EPT data.
154 if (addonPoints != size())
155 throw pdal_error("Invalid addon hierarchy");
156
157 std::string filename = addon.dataDir() + key().toString() + ".bin";
158 const auto data(m_connector.getBinary(filename));
159
160 if (size() * Dimension::size(addon.type()) != data.size())
161 throw pdal_error("Invalid addon content length");
162
163 VectorPointTable *vpt = new VectorPointTable(addon.layout());
164 vpt->buffer() = std::move(data);
165 m_addonTables[addon.localId()] = BasePointTablePtr(vpt);
166}
167
168void TileContents::transform()
169{

Callers

nothing calls this directly

Calls 8

localIdMethod · 0.80
getBinaryMethod · 0.80
sizeFunction · 0.50
pointsMethod · 0.45
dataDirMethod · 0.45
toStringMethod · 0.45
typeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected