diff --git a/README.md b/README.md index 0a3ba97..1886ae4 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,11 @@ Options - a_srs Assign an output SRS. Example `--a_srs EPSG:2056` - + +- no_srs + + Don't read the SLR VLRs. This is only applicable to las files. [Default: false] + - dims List of dimensions to load. X, Y and Z are always loaded. Limiting the dimensions can diff --git a/epf/Epf.cpp b/epf/Epf.cpp index 1691ed5..d0558c7 100644 --- a/epf/Epf.cpp +++ b/epf/Epf.cpp @@ -286,11 +286,14 @@ void Epf::createFileInfos(const StringList& input, std::vector& fileIn pdal::Options opts; opts.add("filename", filename); + if (driver == "readers.las") + opts.add("nosrs", m_b.opts.no_srs); s->setOptions(opts); FileInfo fi; fi.filename = filename; fi.driver = driver; + fi.no_srs = m_b.opts.no_srs; if (driver == "readers.las") { const std::vector& infos = processLas(*dynamic_cast(s), fi); diff --git a/epf/EpfTypes.hpp b/epf/EpfTypes.hpp index 879876d..3d40df6 100644 --- a/epf/EpfTypes.hpp +++ b/epf/EpfTypes.hpp @@ -48,6 +48,7 @@ struct FileInfo std::string filename; std::string driver; + bool no_srs; DimInfoList dimInfo; uint64_t numPoints; uint64_t start; diff --git a/epf/FileProcessor.cpp b/epf/FileProcessor.cpp index e1db409..e9c977c 100644 --- a/epf/FileProcessor.cpp +++ b/epf/FileProcessor.cpp @@ -133,6 +133,8 @@ void FileProcessor::run() pdal::Options opts; opts.add("filename", m_fi.filename); opts.add("count", m_fi.numPoints); + if (m_fi.driver == "readers.las") + opts.add("nosrs", m_fi.no_srs); #ifdef PDAL_LAS_START if (m_fi.driver == "readers.las") opts.add("start", m_fi.start); diff --git a/untwine/Common.hpp b/untwine/Common.hpp index 63efa29..0fb7776 100644 --- a/untwine/Common.hpp +++ b/untwine/Common.hpp @@ -49,6 +49,7 @@ struct Options StringList dimNames; bool stats; std::string a_srs; + bool no_srs; bool metadata; bool dummy; }; diff --git a/untwine/Untwine.cpp b/untwine/Untwine.cpp index ce316c6..ddd5a0c 100644 --- a/untwine/Untwine.cpp +++ b/untwine/Untwine.cpp @@ -49,6 +49,8 @@ void addArgs(pdal::ProgramArgs& programArgs, Options& options, pdal::Arg * &temp options.a_srs, ""); programArgs.add("metadata", "Write PDAL metadata to VLR output", options.metadata, false); + programArgs.add("no_srs", "PDAL readers.las.nosrs passthrough.", + options.no_srs, false); } bool handleOptions(pdal::StringList& arglist, Options& options)