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,


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.


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.


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.


I am trying to use the pansharpening algorithm in QGIS, and it generates the following error:

(FATAL) Pansharpening: itk::ERROR: LmvmPanSharpeningFusionImageFilter(0000025ECBE54A20): Inputs do not occupy the same physical space!

Googling they mention that I must first use the “Superimpose” algorithm, but when I run it I have the following problem:

(FATAL) Superimpose: Caught std :: exception during application execution: (InvalidSRDescriptionException) FromEPSG (4326)

As per Cédric’s answer it means you can’t convert strings to float, I would like to know how to solve it.

Thank you very much in advance

Dear @CastanoFernando,
The error you get is different from the one Cedric is addressing in this discussion. I doubt you problem comes from a conversion from string to integer.
Could you share with us the parameters you used as input for the Superimpose application?

Dear @julienosman, thank you for answering my question. It’s true, I hadn’t realized it was another problem. I am using OTB through QGIS, the parameters used are as follows:

{'inr' : 'D:/Servidor/REM_SENS/PAN.tif', 
 'inm' : 'D:/Servidor/REM_SENS/XS.tif',
 'out' : 'TEMPORARY_OUTPUT', 'elev.dem' : '',
 'elev.geoid' : '',
 'elev.default' : 0,
 'lms' : 4,
 'fv' : 0,
 'mode' : 'default',
 'interpolator' : 'bco',
 'interpolator.bco.radius' : 2,
 'outputpixeltype' : 5 }

I don’t see any problem here. What do you obtain when you try gdalinfo ? You can run gdalinfo from QGIS (GDAL/Raster miscellaneous/Raster information), or from the command line:
gdalinfo D:/Servidor/REM_SENS/PAN.tif
gdalinfo D:/Servidor/REM_SENS/XS.tif

I managed to solve the problem by reprojecting both rasters to another coordinate system, but I would not know why it does not accept that the inputs are in EPSG: 4326.

Thank you very much for having answered my question.

1 Like