diff --git a/doc/stages/writers.las.rst b/doc/stages/writers.las.rst index 028dd66735..84bc0a8533 100644 --- a/doc/stages/writers.las.rst +++ b/doc/stages/writers.las.rst @@ -159,9 +159,11 @@ extra_dims extra dimensions specified by this option. The special value 'all' can be used in place of a dimension/type list - to request - that all dimensions that can't be stored in the predefined LAS point - record get added as extra data at the end of each point record. + to request that all dimensions that can't be stored in the predefined + LAS point record get added as extra data at the end of each point record. + + Setting --verbose=Info will provide output on the names, types and order + of dimensions being written as part of the LAS extra bytes. .. _LAS format: http://asprs.org/Committee-General/LASer-LAS-File-Format-Exchange-Activities.html diff --git a/io/LasWriter.cpp b/io/LasWriter.cpp index 732e04e3a3..7bd994792a 100644 --- a/io/LasWriter.cpp +++ b/io/LasWriter.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -139,7 +140,7 @@ void LasWriter::spatialReferenceChanged(const SpatialReference&) if (++m_srsCnt > 1) log()->get(LogLevel::Error) << getName() << ": Attempting to write '" << m_filename << "' with multiple " - "point spatial references."; + "point spatial references." << std::endl; } @@ -149,6 +150,10 @@ void LasWriter::prepared(PointTableRef table) PointLayoutPtr layout = table.layout(); + // Make sure the dataformatID is set so that we can get the proper + // dimensions being written as part of the standard LAS record. + fillHeader(); + // If we've asked for all dimensions, add to extraDims all dimensions // in the layout that aren't already destined for LAS output. if (m_extraDims.size() == 1 && m_extraDims[0].m_name == "all") @@ -176,6 +181,10 @@ void LasWriter::prepared(PointTableRef table) throw pdal_error(oss.str()); } m_extraByteLen += Dimension::size(dim.m_dimType.m_type); + log()->get(LogLevel::Info) << getName() << ": Writing dimension " << + dim.m_name << + "(" << Dimension::interpretationName(dim.m_dimType.m_type) << + ") " << " to LAS extra bytes." << std::endl; } }