I have just started to use OTB in python notebooks, trying to write an example supervised classifier,
I have a TIF file and the shapefile with field "CODE’ as the classifying label.
(I have controlled the shapefile and it actually contains the mentioned field and I can access features and fields and everything seems fine.)
But running the following code returns error:
saying that itk::ERROR: ListViewParameter(0x2011370): Cannot find CODE
I have searched on internet and for the same error someone had suggested adding the line :
where I have commented in my code, yet it does not work out in my case.
It seems that I can not address that field in my shapefile to be considered as classifying label.
(As I understood if I leave sample.vfn out, by default it will be set as ‘Class’, would it be a work-around to AlterField and rename ‘CODE’ to ‘Class’ )
Thank you for any help or ideas