diff --git a/Modules/Applications/AppClassification/app/otbVectorClassifier.cxx b/Modules/Applications/AppClassification/app/otbVectorClassifier.cxx index 7fd0efa838a4af62aeedaadf7f1b307d6079b234..042c4f450434c96de5367033f2c42ccde851dfe8 100644 --- a/Modules/Applications/AppClassification/app/otbVectorClassifier.cxx +++ b/Modules/Applications/AppClassification/app/otbVectorClassifier.cxx @@ -210,7 +210,7 @@ private: const int nbFeatures = GetSelectedItems("feat").size(); input->SetMeasurementVectorSize(nbFeatures); - + otb::ogr::Layer::const_iterator it = layer.cbegin(); otb::ogr::Layer::const_iterator itEnd = layer.cend(); for( ; it!=itEnd ; ++it) @@ -219,7 +219,11 @@ private: mv.SetSize(nbFeatures); for(int idx=0; idx < nbFeatures; ++idx) { - mv[idx] = (*it)[GetSelectedItems("feat")[idx]].GetValue<double>(); + // Beware that itemIndex differs from ogr layer field index + unsigned int itemIndex = GetSelectedItems("feat")[idx]; + std::string fieldName = GetChoiceNames( "feat" )[itemIndex]; + + mv[idx] = (*it)[fieldName].GetValue<double>(); } input->PushBack(mv); } diff --git a/Modules/ThirdParty/SiftFast/src/CMakeLists.txt b/Modules/ThirdParty/SiftFast/src/CMakeLists.txt index d96230c769a1286c55d4e6e9fe8390de445b53cd..1abbc940165ffd0a42284fdcf464357e78a266ec 100644 --- a/Modules/ThirdParty/SiftFast/src/CMakeLists.txt +++ b/Modules/ThirdParty/SiftFast/src/CMakeLists.txt @@ -51,8 +51,6 @@ if( CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX ) message(FATAL_ERROR "Impossible to compile libsiftfast. Contact OTB development team") endif() set(OTB_DISABLE_FAST_FUNCTIONS_VALUE 1) - else() - message(STATUS "Try to compile libsiftfast.cpp done.") endif() set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g")