OTB TrainVectorClassifier

Hi there,

I am trying to use the TrainVectorClassifier accessing by Monteverdi, but I am getting the following error message:
(FATAL) TrainVectorClassifier: Caught std::exception during application execution: invalid stod argument
Could anyone help me to understand what is wrong?

Many many thanks,
Ludo

Hello,

This error means a conversion from string to float has fail (for example “abc” cannot be convert to a number)

Can you export your application parameters in an XML file (in the application window, go to Application then “Save to XML”) so we can help you with this problem ?

Maybe the problem comes from the field you chose for the classification (“Field names for training features”). This field should be an integer, not a string.

Cédric

Hi Cédric,
thank you very much, you were definitely right on the problem! I solved it and the algorithm works without any problem now.
Nevertheless, I got a new issue in the next step: the VectorClassifier algorithm does not work. If I run it accessing by Monteverdi the application crashed after few seconds, whereas if I run it on QGis I got this message in the log page:

{ ‘in’ : ‘G:/Il mio Drive/Assegno2018-19/Encroachment/Fotoint2018res2012/prova_selezione.shp’, ‘instat’ : ‘’, ‘model’ : ‘G:/Il mio Drive/Assegno2018-19/Encroachment/Fotoint2018res2012/trained_model_50’, ‘cfield’ : ‘’, ‘feat’ : ‘“meanB0 meanB1 meanB2”’, ‘confmap’ : False, ‘out’ : ‘C:/Users/Ludovica Oddi/AppData/Local/Temp/processing_fc93505550ba4179b303d55ce09feaad/b650d0d50b5942fd8ddb6f87a2e068e3/out.file’ }

****2020-01-28 11:12:57 (FATAL) VectorClassifier: itk::ERROR: Failed to open GDALDataset file G:/Il :

Could you please help me again to understand the problem?
Sorry for all this questions but I am new in this field.
I am very grateful and I wish you a nice day.

Cheers,
Ludovica

Hi Ludovica,
Can you retry from a different path, that does not contains spaces ? Looks like the files and folders cannot be accessed properly because of the name of your drive that contains space characters.