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

Method initialize

plugins/arrow/io/ArrowWriter.cpp:273–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271{}
272
273void ArrowWriter::initialize()
274{
275 std::string ext = Utils::tolower(FileUtils::extension(filename()));
276 if (Utils::iequals("feather", m_formatString) || ext == ".feather")
277 m_formatType = arrowsupport::Feather;
278 if (Utils::iequals("parquet", m_formatString) || ext == ".parquet")
279 m_formatType = arrowsupport::Parquet;
280
281 if (m_formatType == arrowsupport::Unknown)
282 throwError("Unknown format '" + m_formatString + "' provided. Unable to write array");
283
284 auto result = arrow::io::FileOutputStream::Open(filename(), /*append=*/false);
285 if (result.ok())
286 m_file = result.ValueOrDie();
287 else
288 throwError("Unable to open '" + filename() + "' for arrow output with error " +
289 result.status().ToString());
290}
291
292
293bool ArrowWriter::processOne(PointRef& point)

Callers

nothing calls this directly

Calls 3

tolowerFunction · 0.85
extensionFunction · 0.85
iequalsFunction · 0.85

Tested by

no test coverage detected