Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Scheffler
py_tools_ds
Commits
c939beaa
Commit
c939beaa
authored
Dec 14, 2018
by
Daniel Scheffler
Browse files
Fixed faulty output validation.
parent
0e85970e
Pipeline
#3415
passed with stages
in 20 minutes and 13 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
py_tools_ds/geo/raster/reproject.py
View file @
c939beaa
...
...
@@ -748,10 +748,14 @@ class SensorMapGeometryTransformer(object):
out_gt
,
out_prj
=
self
.
_get_gt_prj_from_areadefinition
(
self
.
area_definition
)
# output validation
if
not
data_mapgeo
.
shape
==
(
self
.
area_definition
.
y_size
,
self
.
area_definition
.
x_size
):
raise
RuntimeError
(
'The computed map geometry output does not have the expected shape. '
'Expected: %s; output array shape: %s.'
%
(
self
.
area_definition
.
y_size
,
self
.
area_definition
.
x_size
),
data_mapgeo
.
shape
)
if
not
data_mapgeo
.
shape
[:
2
]
==
(
self
.
area_definition
.
y_size
,
self
.
area_definition
.
x_size
):
raise
RuntimeError
(
'The computed map geometry output does not have the expected number of rows/columns. '
'Expected: %s; output: %s.'
%
(
str
((
self
.
area_definition
.
y_size
,
self
.
area_definition
.
x_size
)),
str
(
data_mapgeo
.
shape
[:
2
])))
if
data
.
ndim
>
2
and
data_mapgeo
.
ndim
==
2
:
raise
RuntimeError
(
'The computed map geometry output only one band instead of the expected %d bands.'
%
data
.
shape
[
2
])
return
data_mapgeo
,
out_gt
,
out_prj
# type: Tuple[np.ndarray, tuple, str]
...
...
py_tools_ds/version.py
View file @
c939beaa
__version__
=
'0.14.
5
'
__versionalias__
=
'20181214_0
3
'
__version__
=
'0.14.
6
'
__versionalias__
=
'20181214_0
4
'
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment