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

Method doneFile

plugins/nitf/io/NitfWriter.cpp:119–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117
118
119void NitfWriter::doneFile()
120{
121 finishOutput();
122
123 std::streambuf *buf = m_oss.rdbuf();
124 std::streamoff size = buf->pubseekoff(0, m_oss.end);
125 buf->pubseekoff(0, m_oss.beg);
126
127 std::vector<char> bytes(size);
128 buf->sgetn(bytes.data(), size);
129 m_oss.clear();
130 m_nitf.wrapData(bytes.data(), size);
131 m_nitf.setBounds(reprojectBoxToDD(m_srs, header().bounds));
132
133 try
134 {
135 m_nitf.write();
136 }
137 catch (const NitfFileWriter::error& err)
138 {
139 throwError(err.what());
140 }
141}
142
143} // namespaces

Callers

nothing calls this directly

Calls 7

rdbufMethod · 0.80
wrapDataMethod · 0.80
dataMethod · 0.45
clearMethod · 0.45
setBoundsMethod · 0.45
writeMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected