#include <iostream>
#include <chrono>
#include "DM/IAddInfoLayoutFactory.hpp"
#include "DM/IQueryDescriptor.hpp"
#include "DM/Datamanager.hpp"
#include "DM/Processor/IProcessorEx.hpp"
using namespace std;
{
public:
Kernel() {
}
return new Kernel(*this);
}
cout <<
"process tile with id = " << leaf.
id() << endl;
}
void releaseLeaf() {
}
double zsum = 0;
for (unsigned n = 0; n < neighbours.sizePoint(); n++)
{
zsum += neighbours[n].z();
}
target.
info().
setInt32(0, neighbours.sizePoint());
if (neighbours.sizePoint() > 0)
{
float zmean = zsum / float(neighbours.sizePoint());
target.info().
setFloat(1, zmean);
}
return true;
}
};
void DM_spatial_processing(const char *odm)
{
if (!dm)
{
cout <<
"Unable to open ODM '" <<
odm <<
"'" << endl;
return;
}
DM::IQueryDescriptor::Vocabulary::full);
cout <<
"Ready to append attribute '_pcount' and '_zmean' to '" <<
odm <<
"'" << endl;
cout << "Number of tiles to process = " << pi->sizeLeaf();
Kernel k;
auto start = chrono::high_resolution_clock::now();
processor->runThreaded(k);
auto stop = chrono::high_resolution_clock::now();
cout << "Processing took " << chrono::duration_cast<chrono::milliseconds>(stop-start).count()/double(1000) << " [s]" << endl;
cout << "Save manager" << endl;
dm->save();
cout << "done" << endl;
}