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

Method done

plugins/tiledb/io/TileDBWriter.cpp:582–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

580}
581
582void TileDBWriter::done(PointTableRef table)
583{
584 for (auto& dimBuffer : m_buffers)
585 {
586 dimBuffer->resizeBuffer(m_current_idx);
587 }
588 if (flushCache())
589 {
590 if (!m_args->m_append)
591 {
592 if (!getSpatialReference().empty() &&
593 table.spatialReferenceUnique())
594 {
595 // The point view takes on the spatial reference of that stage,
596 // if it had one.
597 getMetadata().add("spatialreference",
598 Utils::toString(getSpatialReference()));
599 }
600
601 MetadataNode node = table.metadata();
602
603 // serialize metadata
604 std::string m = pdal::Utils::toJSON(node);
605 m_array->put_metadata("_pdal", TILEDB_UINT8, m.length() + 1,
606 m.c_str());
607 // add tiledb pointcloud tag
608 std::string datasetType = "pointcloud";
609 m_array->put_metadata("dataset_type", TILEDB_STRING_UTF8,
610 datasetType.size(), datasetType.data());
611 }
612 m_array->close();
613 }
614 else
615 {
616 throwError("Unable to flush points to TileDB array");
617 }
618}
619
620bool TileDBWriter::flushCache()
621{

Callers

nothing calls this directly

Calls 10

toJSONFunction · 0.85
getMetadataFunction · 0.50
toStringFunction · 0.50
resizeBufferMethod · 0.45
emptyMethod · 0.45
addMethod · 0.45
lengthMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected