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
Container Registry
Model registry
Operate
Environments
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
Main Repositories
otb
Commits
646f3c19
Commit
646f3c19
authored
13 years ago
by
Julien Malik
Browse files
Options
Downloads
Patches
Plain Diff
ENH: test file existence before asking GDALImageIO to read it
parent
67585c0a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/IO/otbTileMapImageIO.cxx
+7
-0
7 additions, 0 deletions
Code/IO/otbTileMapImageIO.cxx
with
7 additions
and
0 deletions
Code/IO/otbTileMapImageIO.cxx
+
7
−
0
View file @
646f3c19
...
...
@@ -221,6 +221,13 @@ void TileMapImageIO::GenerateTileInfo(double x, double y, int numTileX, int numT
*/
bool
TileMapImageIO
::
CanReadFromCache
(
std
::
string
filename
)
{
// Verify that the file exists and is not a directory
bool
fileExists
=
itksys
::
SystemTools
::
FileExists
(
filename
.
c_str
(),
true
);
if
(
!
fileExists
)
{
return
false
;
}
itk
::
ImageIOBase
::
Pointer
imageIO
;
imageIO
=
otb
::
GDALImageIO
::
New
();
return
imageIO
->
CanReadFile
(
filename
.
c_str
());
...
...
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