Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
b53e30e7
Commit
b53e30e7
authored
13 years ago
by
Aurélien Bricier
Browse files
Options
Downloads
Patches
Plain Diff
BUG: fixed default behavior
parent
5743c777
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CartographicDBValidation/otbVectorDataDSValidation.cxx
+29
-14
29 additions, 14 deletions
CartographicDBValidation/otbVectorDataDSValidation.cxx
with
29 additions
and
14 deletions
CartographicDBValidation/otbVectorDataDSValidation.cxx
+
29
−
14
View file @
b53e30e7
...
...
@@ -29,18 +29,18 @@ namespace otb
{
int
VectorDataDSValidation
::
Describe
(
ApplicationDescriptor
*
descriptor
)
{
descriptor
->
SetName
(
"Vector data validation
parser function
"
);
descriptor
->
SetDescription
(
"Vector data validation."
);
descriptor
->
AddOption
(
"InputShapeFileName"
,
"Input Shape file name"
,
"in"
,
1
,
true
,
ApplicationDescriptor
::
FileName
);
descriptor
->
AddOption
(
"OutputShapeFileName"
,
"Output Shape file name"
,
"out"
,
1
,
true
,
ApplicationDescriptor
::
FileName
);
descriptor
->
SetName
(
"Vector data validation"
);
descriptor
->
SetDescription
(
"Vector data validation
using Clasifier fusion
."
);
descriptor
->
AddOption
(
"InputShapeFileName"
,
"Input Shape file name"
,
"in"
,
1
,
true
,
ApplicationDescriptor
::
FileName
);
descriptor
->
AddOption
(
"OutputShapeFileName"
,
"Output Shape file name"
,
"out"
,
1
,
true
,
ApplicationDescriptor
::
FileName
);
descriptor
->
AddOptionNParams
(
"Hypothesis"
,
"Hypothesis (default: NDVI, RADIOM)"
,
"hyp"
,
false
,
ApplicationDescriptor
::
StringList
);
descriptor
->
AddOption
(
"DescriptorsModelFileName"
,
"Fuzzy descriptors model xml file (default: NDVI(0.25, 0.5, 0.75, 0.99) / RADIOM(0.25, 0.5, 0.75, 0.90))"
,
"descMod"
,
1
,
false
,
ApplicationDescriptor
::
FileName
);
descriptor
->
AddOption
(
"CriterionFormula"
,
"Criterion formula expression (default: ((Belief + Plausibility)/2) >= 0.5)"
,
"exp"
,
1
,
false
,
ApplicationDescriptor
::
FileName
);
descriptor
->
AddOption
(
"DescriptorsModelFileName"
,
"Fuzzy descriptors model xml file (default: NDVI(0.25, 0.5, 0.75, 0.99) / RADIOM(0.25, 0.5, 0.75, 0.90))"
,
"descMod"
,
1
,
true
,
ApplicationDescriptor
::
FileName
);
descriptor
->
AddOption
(
"CriterionFormula"
,
"Criterion formula expression (default: ((Belief + Plausibility)/2) >= 0.5)"
,
"exp"
,
1
,
false
,
ApplicationDescriptor
::
FileName
);
return
EXIT_SUCCESS
;
}
...
...
@@ -73,10 +73,19 @@ int VectorDataDSValidation::Execute(otb::ApplicationOptionsResult* parseResult)
// Load the hypothesis
LabelSetType
hypothesis
;
unsigned
int
nbOfHypo
=
parseResult
->
GetNumberOfParameters
(
"Hypothesis"
);
for
(
unsigned
int
i
=
0
;
i
<
nbOfHypo
;
i
++
)
if
(
parseResult
->
IsOptionPresent
(
"Hypothesis"
))
{
unsigned
int
nbOfHypo
=
parseResult
->
GetNumberOfParameters
(
"Hypothesis"
);
for
(
unsigned
int
i
=
0
;
i
<
nbOfHypo
;
i
++
)
{
hypothesis
.
insert
(
parseResult
->
GetParameterString
(
"Hypothesis"
,
i
));
}
}
else
{
hypothesis
.
insert
(
"NDVI"
);
hypothesis
.
insert
(
"RADIOM"
);
hypothesis
.
insert
(
"DBOVERLAP"
);
}
// Process
...
...
@@ -84,8 +93,14 @@ int VectorDataDSValidation::Execute(otb::ApplicationOptionsResult* parseResult)
filter
->
SetInput
(
vdReader
->
GetOutput
());
filter
->
SetDescriptorModels
(
descMod
);
filter
->
SetHypothesis
(
hypothesis
);
filter
->
SetCriterionFormula
(
parseResult
->
GetParameterString
(
"CriterionFormula"
));
if
(
parseResult
->
IsOptionPresent
(
"CriterionFormula"
))
{
filter
->
SetCriterionFormula
(
parseResult
->
GetParameterString
(
"CriterionFormula"
));
}
else
{
filter
->
SetCriterionFormula
(
parseResult
->
GetParameterString
(
"((Belief + Plausibility)/2.)"
));
}
// Write the output
VectorDataWriterType
::
Pointer
vdWriter
=
VectorDataWriterType
::
New
();
vdWriter
->
SetFileName
(
parseResult
->
GetParameterString
(
"OutputShapeFileName"
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment