Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Mar 16, 2018
2 parents ebb5620 + f5cb61d commit d0bfc34
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
10 changes: 8 additions & 2 deletions doc/stages/readers.las.rst
Expand Up @@ -85,12 +85,18 @@ _`extra_dims`

.. note::

The presence of an extra bytes VLR causes when reading a version 1.4 LAS file
The presence of an extra bytes VLR when reading a version
1.4 file or a version 1.0 - 1.3 file with **use_eb_vlr** set
causes this option to be ignored.

.. _LAS format: http://asprs.org/Committee-General/LASer-LAS-File-Format-Exchange-Activities.html
.. _LAS Specification: http://www.asprs.org/a/society/committees/standards/LAS_1_4_r13.pdf

_`use_eb_vlr`
If an extra bytes VLR is found in a version 1.0 - 1.3 file, use it as if it
were in a 1.4 file. This option has no effect when reading a version 1.4 file.
[Default: false]

_`compression`
May be set to "lazperf" or "laszip" to choose either the LazPerf decompressor
or the LASzip decompressor for LAZ files. PDAL must have been built with
Expand All @@ -101,7 +107,7 @@ _`compression`
_`spatialreference`
Sets the spatial reference for the file data. Overrides any spatial
reference information in the file itself. Most text-based formats of
SRS information are accepted, including WKT and proj.4.
SRS information are accepted, including WKT and proj.4. [Optional]

_`count`
Maximum number of points read [Optional]
4 changes: 3 additions & 1 deletion io/LasReader.cpp
Expand Up @@ -83,6 +83,8 @@ void LasReader::addArgs(ProgramArgs& args)
args.add("extra_dims", "Dimensions to assign to extra byte data",
m_extraDimSpec);
args.add("compression", "Decompressor to use", m_compression, "EITHER");
args.add("use_eb_vlr", "Use extra bytes VLR for 1.0 - 1.3 files",
m_useEbVlr);
args.add("ignore_vlr", "VLR userid/recordid to ignore", m_ignoreVLROption);
}

Expand Down Expand Up @@ -212,7 +214,7 @@ void LasReader::initializeLocal(PointTableRef table, MetadataNode& m)
throwError("Unsupported LAS input point format: " +
Utils::toString((int)m_header.pointFormat()) + ".");

if (m_header.versionAtLeast(1, 4))
if (m_header.versionAtLeast(1, 4) || m_useEbVlr)
readExtraBytesVlr();
setSrs(m);
MetadataNode forward = table.privateMetadata("lasforward");
Expand Down
1 change: 1 addition & 0 deletions io/LasReader.hpp
Expand Up @@ -127,6 +127,7 @@ class PDAL_DLL LasReader : public Reader, public Streamable
IgnoreVLRList m_ignoreVLRs;
std::string m_compression;
StringList m_ignoreVLROption;
bool m_useEbVlr;

virtual void addArgs(ProgramArgs& args);
virtual void initialize(PointTableRef table)
Expand Down

0 comments on commit d0bfc34

Please sign in to comment.