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

Method fetchSrsVlrs

io/CopcReader.cpp:456–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454
455
456las::VlrList CopcReader::fetchSrsVlrs(const las::VlrCatalog& catalog)
457{
458 las::VlrList vlrs;
459
460 auto fetchVlr = [&catalog, &vlrs] (const std::string userId, uint16_t recordId) {
461 if (!catalog.exists(userId, recordId))
462 return;
463
464 las::Vlr vlr(userId, recordId);
465 vlr.dataVec = catalog.fetchWithDescription(userId, recordId, vlr.description);
466 vlrs.push_back(std::move(vlr));
467 };
468
469 fetchVlr(las::TransformUserId, las::LASFWkt2recordId);
470 fetchVlr(las::PdalUserId, las::PdalProjJsonRecordId);
471 fetchVlr(las::TransformUserId, las::WktRecordId);
472
473 // User told us to ditch them
474 if (m_args->nosrs)
475 vlrs.clear();
476 return vlrs;
477}
478
479
480las::Vlr CopcReader::fetchEbVlr(const las::VlrCatalog& catalog)

Callers

nothing calls this directly

Calls 3

fetchWithDescriptionMethod · 0.80
existsMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected