| 374 | } |
| 375 | |
| 376 | void GDALWriter::readyTable(PointTableRef table) |
| 377 | { |
| 378 | // Add these as GDAL metadata |
| 379 | if(m_writePDALMetadata) |
| 380 | { |
| 381 | MetadataNode m = table.metadata(); |
| 382 | std::string json = Utils::toJSON(m); |
| 383 | std::vector<uint8_t> metadata(json.begin(), json.end()); |
| 384 | std::string b64 = Utils::base64_encode(metadata.data(), metadata.size()); |
| 385 | if (m_GDAL_metadata.size()) |
| 386 | m_GDAL_metadata += ","; |
| 387 | |
| 388 | m_GDAL_metadata += "pdal_metadata=" + b64; |
| 389 | |
| 390 | std::ostringstream ostr; |
| 391 | PipelineWriter::writePipeline(this, ostr); |
| 392 | json = ostr.str(); |
| 393 | std::vector<uint8_t> pipeline(json.begin(), json.end()); |
| 394 | b64 = Utils::base64_encode(pipeline.data(), pipeline.size()); |
| 395 | m_GDAL_metadata += ",pdal_pipeline=" + b64; |
| 396 | } |
| 397 | |
| 398 | } |
| 399 | |
| 400 | |
| 401 | } // namespace pdal |
nothing calls this directly
no test coverage detected