| 421 | |
| 422 | |
| 423 | void LasWriter::addMetadataVlr(MetadataNode& forward) |
| 424 | { |
| 425 | std::string json = Utils::toJSON(forward); |
| 426 | if ((json.size() > las::Vlr::MaxDataSize) && !d->header.versionAtLeast(1, 4)) |
| 427 | { |
| 428 | log()->get(LogLevel::Debug) << "pdal metadata VLR too large " |
| 429 | "to write in VLR for files < LAS 1.4"; |
| 430 | } |
| 431 | else |
| 432 | { |
| 433 | std::vector<char> data(json.begin(), json.end()); |
| 434 | addVlr(las::PdalUserId, las::PdalMetadataRecordId, "PDAL metadata", data); |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | void LasWriter::addPipelineVlr() |
| 439 | { |