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
dg
dg
Commits
a81555ff
Commit
a81555ff
authored
Sep 20, 2017
by
Valentin Vallaeys
Browse files
geoTiff: add fatal error if out of bound
parent
6fd5ca98
Pipeline
#2433
failed with stages
in 31 minutes and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
modules/slimFunction/slimPreEvaluatorGeoTIFF.cpp
View file @
a81555ff
...
...
@@ -122,6 +122,8 @@ double slimPreEvaluatorGeoTIFF::evaluate(double x, double y, double z) {
}
if
(
!
GTIFPCSToImage
(
_gtif
,
&
x
,
&
y
))
return
0
;
if
(
x
<
0
||
x
>
_sizex
||
y
<
0
||
y
>
_sizey
)
Msg
::
Fatal
(
"error reading tiff file, out of boundary
\n
"
);
int
x0
=
std
::
min
(
_sizex
-
1
,
std
::
max
(
0
,
(
int
)
floor
(
x
)));
int
x1
=
std
::
min
(
_sizex
-
1
,
std
::
max
(
0
,
(
int
)
ceil
(
x
)));
int
y0
=
std
::
min
(
_sizey
-
1
,
std
::
max
(
0
,
(
int
)
floor
(
y
)));
...
...
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