Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
5fc834b4
Commit
5fc834b4
authored
Feb 19, 2016
by
Guillaume Pasero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TEST: finish test and add baseline check
parent
2223f63d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
Modules/Learning/Sampling/test/CMakeLists.txt
Modules/Learning/Sampling/test/CMakeLists.txt
+3
-0
Modules/Learning/Sampling/test/otbOGRDataToClassStatisticsFilterTest.cxx
...g/Sampling/test/otbOGRDataToClassStatisticsFilterTest.cxx
+12
-12
No files found.
Modules/Learning/Sampling/test/CMakeLists.txt
View file @
5fc834b4
...
...
@@ -15,6 +15,9 @@ otb_add_test(NAME leTuOGRDataToClassStatisticsFilterNew COMMAND otbSamplingTestD
otbOGRDataToClassStatisticsFilterNew
)
otb_add_test
(
NAME leTvOGRDataToClassStatisticsFilter COMMAND otbSamplingTestDriver
--compare-ascii
${
NOTOL
}
${
BASELINE_FILES
}
/leTvOGRDataToClassStatisticsFilterOutput.txt
${
TEMP
}
/leTvOGRDataToClassStatisticsFilterOutput.txt
otbOGRDataToClassStatisticsFilter
${
INPUTDATA
}
/variousVectors.sqlite
${
TEMP
}
/leTvOGRDataToClassStatisticsFilterOutput.txt
)
Modules/Learning/Sampling/test/otbOGRDataToClassStatisticsFilterTest.cxx
View file @
5fc834b4
...
...
@@ -101,45 +101,45 @@ int otbOGRDataToClassStatisticsFilter(int argc, char* argv[])
std
::
ofstream
ofs
;
ofs
.
open
(
outputPath
.
c_str
());
ofs
<<
"# Layer 0 : polygons"
<<
std
::
endl
;
ofs
<<
"# Class
statistics ( label :
sample
C
ount
)
"
<<
std
::
endl
;
ofs
<<
"# Class sample
c
ount
s
"
<<
std
::
endl
;
for
(
itClass
=
classCount
.
begin
();
itClass
!=
classCount
.
end
()
;
++
itClass
)
{
ofs
<<
itClass
->
first
<<
"
:
"
<<
itClass
->
second
<<
std
::
endl
;
ofs
<<
"class "
<<
itClass
->
first
<<
"
=
"
<<
itClass
->
second
<<
std
::
endl
;
}
ofs
<<
"# Vector sizes
( featureId : sampleCount)
"
<<
std
::
endl
;
ofs
<<
"# Vector sizes"
<<
std
::
endl
;
for
(
itPoly
=
polySize
.
begin
()
;
itPoly
!=
polySize
.
end
()
;
++
itPoly
)
{
ofs
<<
itPoly
->
first
<<
"
:
"
<<
itPoly
->
second
<<
std
::
endl
;
ofs
<<
"feature "
<<
itPoly
->
first
<<
"
=
"
<<
itPoly
->
second
<<
std
::
endl
;
}
filter
->
SetLayerIndex
(
1
);
filter
->
Update
();
ofs
<<
"# Layer 1 : lines"
<<
std
::
endl
;
ofs
<<
"# Class
statistics ( label :
sample
C
ount
)
"
<<
std
::
endl
;
ofs
<<
"# Class sample
c
ount
s
"
<<
std
::
endl
;
for
(
itClass
=
classCount
.
begin
()
;
itClass
!=
classCount
.
end
()
;
++
itClass
)
{
ofs
<<
itClass
->
first
<<
"
:
"
<<
itClass
->
second
<<
std
::
endl
;
ofs
<<
"class "
<<
itClass
->
first
<<
"
=
"
<<
itClass
->
second
<<
std
::
endl
;
}
ofs
<<
"# Vector sizes
( featureId : sampleCount)
"
<<
std
::
endl
;
ofs
<<
"# Vector sizes"
<<
std
::
endl
;
for
(
itPoly
=
polySize
.
begin
()
;
itPoly
!=
polySize
.
end
()
;
++
itPoly
)
{
ofs
<<
itPoly
->
first
<<
"
:
"
<<
itPoly
->
second
<<
std
::
endl
;
ofs
<<
"feature "
<<
itPoly
->
first
<<
"
=
"
<<
itPoly
->
second
<<
std
::
endl
;
}
filter
->
SetLayerIndex
(
2
);
filter
->
Update
();
ofs
<<
"# Layer 2 : points"
<<
std
::
endl
;
ofs
<<
"# Class
statistics ( label :
sample
C
ount
)
"
<<
std
::
endl
;
ofs
<<
"# Class sample
c
ount
s
"
<<
std
::
endl
;
for
(
itClass
=
classCount
.
begin
();
itClass
!=
classCount
.
end
()
;
++
itClass
)
{
ofs
<<
itClass
->
first
<<
"
:
"
<<
itClass
->
second
<<
std
::
endl
;
ofs
<<
"class "
<<
itClass
->
first
<<
"
=
"
<<
itClass
->
second
<<
std
::
endl
;
}
ofs
<<
"# Vector sizes
( featureId : sampleCount)
"
<<
std
::
endl
;
ofs
<<
"# Vector sizes"
<<
std
::
endl
;
for
(
itPoly
=
polySize
.
begin
()
;
itPoly
!=
polySize
.
end
()
;
++
itPoly
)
{
ofs
<<
itPoly
->
first
<<
"
:
"
<<
itPoly
->
second
<<
std
::
endl
;
ofs
<<
"feature "
<<
itPoly
->
first
<<
"
=
"
<<
itPoly
->
second
<<
std
::
endl
;
}
ofs
.
close
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment