#include <vector>
#include <cstdint>
#include <iostream>
#include <exception>
int main()
{
try
{
rdb.
open(
"pointcloud.rdbx", settings);
rdb,
"Update",
"Point Classifier v1.0"
);
static const uint32_t BUFFER_SIZE = 10000;
std::vector< uint64_t > bufferPointNumber(BUFFER_SIZE);
std::vector< uint16_t > bufferPointClass (BUFFER_SIZE);
select.
bindBuffer(riegl::rdb::pointcloud::RDB_RIEGL_ID, bufferPointNumber);
update.
bindBuffer(riegl::rdb::pointcloud::RDB_RIEGL_ID, bufferPointNumber);
update.
bindBuffer(riegl::rdb::pointcloud::RDB_RIEGL_CLASS, bufferPointClass);
while (
const uint32_t count = select.
next(BUFFER_SIZE))
{
for (uint32_t i = 0; i < count; i++)
{
bufferPointClass[i] = 7;
}
}
return 0;
}
{
std::cerr << error.
what() <<
" (" << error.
details() <<
")" << std::endl;
return 1;
}
catch(const std::exception &error)
{
std::cerr << error.what() << std::endl;
return 1;
}
}