Skip to content
Snippets Groups Projects
Commit 351d1511 authored by Aurélien Bricier's avatar Aurélien Bricier
Browse files

TEST: enhanced double handling in VectorData field

parent 711a6b46
No related branches found
No related tags found
No related merge requests found
...@@ -121,8 +121,7 @@ int otbNDVIDataNodeFeatureFunction(int argc, char* argv[]) ...@@ -121,8 +121,7 @@ int otbNDVIDataNodeFeatureFunction(int argc, char* argv[])
const DataNodeType::Pointer currentGeometry = itVector.Get(); const DataNodeType::Pointer currentGeometry = itVector.Get();
NDVIFeatureOutputType currentResult; NDVIFeatureOutputType currentResult;
currentResult = NDVIFeatureFunction->Evaluate(*(currentGeometry.GetPointer())); currentResult = NDVIFeatureFunction->Evaluate(*(currentGeometry.GetPointer()));
std::cout << "DataNode score: " << currentResult[0] << std::endl; currentGeometry->SetFieldAsDouble("NDVI", (double)(currentResult[0]));
currentGeometry->SetFieldAsInt("NDVI", (int)(100*currentResult[0]));
outVD->GetDataTree()->Add(currentGeometry, folder); outVD->GetDataTree()->Add(currentGeometry, folder);
} }
++itVector; ++itVector;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment