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

Method data

io/private/las/Header.cpp:75–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75std::vector<char> Header::data() const
76{
77 size_t size = Size12;
78 if (versionMinor >= 4)
79 size = Size14;
80 else if (versionMinor == 3)
81 size = Size13;
82
83 std::vector<char> buf(size);
84 LeInserter s(buf.data(), buf.size());
85
86 s.put(magic, 4);
87 s << fileSourceId << globalEncoding;
88
89 char guidBuf[Uuid::size()];
90 projectGuid.pack(guidBuf);
91 s.put(guidBuf, Uuid::size());
92
93 s << versionMajor << versionMinor;
94 s.put(systemId, 32);
95 s.put(softwareId, 32);
96 s << creationDoy << creationYear;
97 s << headerSize << pointOffset << vlrCount;
98 s << pointFormatBits << pointSize << legacyPointCount;
99
100 for (const uint32_t& pbr : legacyPointsByReturn)
101 s << pbr;
102
103 s << scale.x << scale.y << scale.z;
104 s << offset.x << offset.y << offset.z;
105 s << bounds.maxx << bounds.minx << bounds.maxy << bounds.miny << bounds.maxz << bounds.minz;
106 if (versionMinor >= 3)
107 {
108 s << waveOffset;
109 if (versionMinor >= 4)
110 {
111 s << evlrOffset << evlrCount << ePointCount;
112 for (const uint64_t& pbr : ePointsByReturn)
113 s << pbr;
114 }
115 }
116 return buf;
117}
118
119StringList Header::validate(uint64_t fileSize) const
120{

Callers 15

readMethod · 0.45
dataPtrMethod · 0.45
HierarchyMethod · 0.45
decompressXYZFunction · 0.45
decompressRGBFunction · 0.45
decompressIntensityFunction · 0.45
getBinaryMethod · 0.45
fillHeaderMethod · 0.45
headerDataMethod · 0.45
operator()Method · 0.45
operator()Method · 0.45
walkVlrsMethod · 0.45

Calls 4

packMethod · 0.80
sizeFunction · 0.50
sizeMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected