diff --git a/io/LasWriter.cpp b/io/LasWriter.cpp index 43ea4501f3..6d4bdea9e8 100644 --- a/io/LasWriter.cpp +++ b/io/LasWriter.cpp @@ -96,7 +96,8 @@ void LasWriter::addArgs(ProgramArgs& args) decltype(m_dataformatId)(3)); args.add("format", "Point format", m_dataformatId, decltype(m_dataformatId)(3)); - args.add("global_encoding", "Global encoding byte", m_globalEncoding); + args.add("global_encoding", "Global encoding byte", m_globalEncoding, + decltype(m_globalEncoding)(0)); args.add("project_id", "Project ID", m_projectId); args.add("system_id", "System ID", m_systemId, decltype(m_systemId)(m_lasHeader.getSystemIdentifier())); diff --git a/test/unit/io/LasWriterTest.cpp b/test/unit/io/LasWriterTest.cpp index 1f5a4c1b8a..5164f1a5b2 100644 --- a/test/unit/io/LasWriterTest.cpp +++ b/test/unit/io/LasWriterTest.cpp @@ -346,7 +346,7 @@ TEST(LasWriterTest, forward) EXPECT_EQ(n1.findChild("filesource_id").value(), 0); // Global encoding doesn't match because 4_1.las has a bad value, so we // get the default. - EXPECT_EQ(n1.findChild("global_encoding").value(), 0); + EXPECT_EQ(n1.findChild("global_encoding").value(), 0); EXPECT_EQ(n1.findChild("project_id").value(), Uuid()); EXPECT_EQ(n1.findChild("system_id").value(), ""); EXPECT_EQ(n1.findChild("software_id").value(), "TerraScan");