Hello,
I am trying to classify a vector layer with otb and python. In Monteverdi
all works fine. I think there must be a mistake in the code when defining
the 'cfield' and/ or the 'feat' parameters. Here is the code (also attached
as .py file):
import otbApplication
VectorClassifier =
otbApplication.Registry.CreateApplication("VectorClassifier")
VectorClassifier.SetParameterString("in", "zonals_22.shp")
VectorClassifier.SetParameterString("model", "model.txt")
#VectorClassifier.SetParameterString("cfield", "class")
#VectorClassifier.SetParameterString("feat", "area", "perimeter",
"complexity", "_mean", "_std", "pmr")
VectorClassifier.SetParameterString("out", "out4.shp")
VectorClassifier.ExecuteAndWriteOutput()
Output is: itk::ERROR: ListViewParameter(0000000001023A20): Cannot find area
Any suggestions?
E
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
import otbApplication
VectorClassifier = otbApplication.Registry.CreateApplication("VectorClassifier")
VectorClassifier.SetParameterString("in", "zonals_22.shp")
VectorClassifier.SetParameterString("model", "model.txt")
#VectorClassifier.SetParameterString("cfield", "class")
#VectorClassifier.SetParameterString("feat", "area", "perimeter", "complexity", "_mean", "_std", "pmr")
VectorClassifier.SetParameterString("out", "out5.shp")
VectorClassifier.ExecuteAndWriteOutput()
#>>> VectorClassifier = otbApplication.Registry.CreateApplication("VectorClassifier")
#>>> print VectorClassifier.GetParametersKeys()
#('in', 'instat', 'model', 'cfield', 'feat', 'confmap', 'out', 'inxml', 'outxml')