1

I have a C++ script for my lidar data processing and map building. However, there is no example to set the output stream. So how should I set up the output in the calculation function? The code is structured like the following.

int main:{
pdal::StageFactory factory;
pdal::Stage *writer = factory.createStage("writers.las"); //create las writer

options.add("major_version", 1);
options.add("minor_version", 3); 
options.add("scale_x", 0.001); //edit header
options.add("scale_y", 0.001);
options.add("scale_z", 0.001);

options.add("offset_x", "auto"); 
options.add("offset_y", "auto"); 
options.add("offset_z", "auto");

writer->setOptions(options);

lidarCallBackFunction();

}

lidarCallBackFunction:{
bunchOfCalculationStuff;
PointTable table;
table.layout()->registerDim(x);
table.layout()->registerDim(y);

writer->prepare(table); //not working part
writer->execute(table);

}

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.