diff --git a/NEWS.md b/NEWS.md index 9bfc293..e2a356b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ - Fix: build failure with GCC 4.x - Fix: gcc-asan signed integer overflow. +- Fix: when reading an non supported extra bytes attribute rlas used to print a warning message. It now throws a real warning. - Change: use `tinytest` instead of `testthat` - New: `read.lasheader()` now reads the extended variable length record (EVLR) - New: `write.las()` now writes all GeoKeyDirectoryTag + GeoAsciiParamsTag + GeoDoubleParamsTag diff --git a/src/rlasstreamer.cpp b/src/rlasstreamer.cpp index 888fd98..3a7d6cb 100644 --- a/src/rlasstreamer.cpp +++ b/src/rlasstreamer.cpp @@ -325,7 +325,10 @@ void RLASstreamer::allocation() extra_bytes_attr.push_back(extrabyte); } else - Rprintf("WARNING: data type %d of attribute %d not implemented.\n", extrabyte.data_type, extrabyte.id); + { + std::string msg = std::string("data type ") + std::to_string(extrabyte.data_type) + std::string(" of extra bytes attribute ") + std::to_string(extrabyte.id) + std::string(" is deprecated and not supported by rlas."); + Rf_warningcall(R_NilValue, msg.c_str()); + } } } }