Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
7a7cc49f
Commit
7a7cc49f
authored
Jul 05, 2016
by
Guillaume Pasero
Browse files
ENH: backward compatibility with older ossim versions
parent
f5ce4348
Changes
1
Hide whitespace changes
Inline
Side-by-side
Modules/ThirdParty/OssimPlugins/src/ossim/ossimSarSensorModel.cpp
View file @
7a7cc49f
...
...
@@ -14,6 +14,7 @@
#include
"ossimTraceHelpers.h"
#include
"ossimRangeUtilities.h"
#include
"ossimSarSensorModelPathsAndKeys.h"
#include
<ossim/base/ossimRegExp.h>
#include
<ossim/base/ossimLsrSpace.h>
#include
<boost/static_assert.hpp>
#include
<iostream>
...
...
@@ -980,7 +981,20 @@ namespace ossimplugins
try
{
get
(
kwl
,
"orbitList.nb_orbits"
,
nbOrbits
);
}
catch
(
kw_runtime_error
const
&
e
)
{
nbOrbits
=
kwl
.
getNumberOfKeysThatMatch
(
"orbitList
\\
.orbit
\\
[.*
\\
]
\\
.time"
);
nbOrbits
=
0
;
ossimRegExp
regExp
;
regExp
.
compile
(
"orbitList
\\
.orbit
\\
[.*
\\
]
\\
.time"
);
ossimKeywordlist
::
KeywordMap
::
const_iterator
i
=
kwl
.
getMap
().
begin
();
for
(;
i
!=
kwl
.
getMap
().
end
();
++
i
)
{
if
(
regExp
.
find
(
(
*
i
).
first
.
c_str
()))
{
++
nbOrbits
;
}
}
// Method getNumberOfKeysThatMatch not available in ossim 1.8.16
//nbOrbits = kwl.getNumberOfKeysThatMatch("orbitList\\.orbit\\[.*\\]\\.time");
ossimNotify
(
ossimNotifyLevel_WARN
)
<<
"WARNING: "
<<
e
.
what
()
<<
"
\n\t
Number of orbits manually counted to "
<<
nbOrbits
...
...
Write
Preview
Supports
Markdown
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