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

Method dump

tools/lasdump/Dumper.cpp:69–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67{
68
69void Dumper::dump()
70{
71 ILeStream in(m_filename);
72 if (!in.good())
73 {
74 std::cerr << "Error: Couldn't open file \"" << m_filename << "\".\n";
75 m_error = -1;
76 return;
77 }
78
79 try {
80 in >> m_header;
81 }
82 catch (Exception& ex)
83 {
84 std::cerr << "Error: " << ex << "\n";
85 m_error = -1;
86 return;
87 }
88 *m_out << m_header;
89
90 in.seek(m_header.vlrOffset());
91 for (uint32_t i = 0; i < m_header.vlrCount(); ++i)
92 {
93 Vlr vlr;
94
95 in >> vlr;
96 if (vlr.matches("laszip encoded", 22204))
97 m_zipVlr = vlr;
98 *m_out << vlr;
99 }
100 if (m_header.versionEquals(1, 0))
101 {
102 uint16_t dataStartSig;
103 in >> dataStartSig;
104 *m_out << "Data start signature: " << dataStartSig << "\n";
105 }
106
107 in.close();
108 readPoints();
109
110 // We're done if this is an extended VLR.
111 if (!m_header.versionAtLeast(1, 4))
112 return;
113
114 in.open(m_filename);
115 // Seek to start of extended VLRs and dump.
116 in.seek(m_header.eVlrOffset());
117 for (uint32_t i = 0; i < m_header.eVlrCount(); ++i)
118 {
119 EVlr vlr;
120
121 in >> vlr;
122 *m_out << vlr;
123 }
124 return;
125}
126

Callers 6

mainFunction · 0.45
outputHelpFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
getGeometryFunction · 0.45
makeFilterFunction · 0.45

Calls 10

seekMethod · 0.45
vlrOffsetMethod · 0.45
vlrCountMethod · 0.45
matchesMethod · 0.45
versionEqualsMethod · 0.45
closeMethod · 0.45
versionAtLeastMethod · 0.45
openMethod · 0.45
eVlrOffsetMethod · 0.45
eVlrCountMethod · 0.45

Tested by 4

TESTFunction · 0.36
TESTFunction · 0.36
getGeometryFunction · 0.36
makeFilterFunction · 0.36