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
b71ab48c
Commit
b71ab48c
authored
Jun 09, 2022
by
Julien Osman
Browse files
ENH: Avoid reloading the same DEM directory
parent
b7f91e5b
Pipeline
#10851
failed with stages
in 108 minutes and 52 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Modules/IO/IOGDAL/src/otbDEMHandler.cxx
View file @
b71ab48c
...
...
@@ -211,6 +211,16 @@ void DEMHandler::OpenDEMFile(const std::string& path)
void
DEMHandler
::
OpenDEMDirectory
(
const
std
::
string
&
DEMDirectory
)
{
auto
isSameDirectory
=
[
DEMDirectory
](
std
::
string
s
)
{
return
s
==
DEMDirectory
;
};
if
(
std
::
any_of
(
std
::
begin
(
m_DEMDirectories
),
std
::
end
(
m_DEMDirectories
),
isSameDirectory
))
{
otbLogMacro
(
Info
,
<<
"Directory '"
<<
DEMDirectory
<<
"' already opened."
)
return
;
}
// Free the previous in-memory dataset (if any)
if
(
!
m_DatasetList
.
empty
())
VSIUnlink
(
DEM_DATASET_PATH
.
c_str
());
...
...
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