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
arosics
Commits
71100a69
Commit
71100a69
authored
May 08, 2021
by
Daniel Scheffler
Browse files
Caught a warning in case the footprint polygon has disjunct polygons.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
242bdb5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
arosics/CoReg.py
View file @
71100a69
...
...
@@ -110,7 +110,7 @@ class GeoArray_CoReg(GeoArray):
else
:
# footprint_poly is calculated automatically by GeoArray
if
not
CoReg_params
[
'q'
]:
print
(
'Calculating actual data corner coordinates for %s...'
%
self
.
imName
)
print
(
'Calculating
footprint polygon and
actual data corner coordinates for %s...'
%
self
.
imName
)
self
.
calc_mask_nodata
(
fromBand
=
self
.
band4match
)
# this avoids that all bands have to be read
...
...
@@ -543,7 +543,12 @@ class COREG(object):
CRS
.
from_user_input
(
self
.
shift
.
prj
).
name
))
def
_get_overlap_properties
(
self
)
->
None
:
overlap_tmp
=
get_overlap_polygon
(
self
.
ref
.
poly
,
self
.
shift
.
poly
,
self
.
v
)
with
warnings
.
catch_warnings
():
# already warned in GeoArray_CoReg.__init__()
warnings
.
filterwarnings
(
"ignore"
,
category
=
RuntimeWarning
,
message
=
".*disjunct.*"
)
overlap_tmp
=
get_overlap_polygon
(
self
.
ref
.
poly
,
self
.
shift
.
poly
,
self
.
v
)
self
.
overlap_poly
=
overlap_tmp
[
'overlap poly'
]
# has to be in reference projection
self
.
overlap_percentage
=
overlap_tmp
[
'overlap percentage'
]
self
.
overlap_area
=
overlap_tmp
[
'overlap area'
]
...
...
@@ -1374,7 +1379,7 @@ class COREG(object):
# get the corresponding matchWin data
matchWinData
=
self
.
matchWin
[:]
# check if shapes of two images are equal (due to bug (?), in some cases otherWin_deshift_geoArr does not have
# check if shapes of two images are
un
equal (due to bug (?), in some cases otherWin_deshift_geoArr does not have
# the exact same dimensions as self.matchWin -> maybe bounds are handled differently by gdal.Warp)
if
not
self
.
matchWin
.
shape
==
otherWin_deshift_geoArr
.
shape
:
# FIXME this seems to be already fixed
warnings
.
warn
(
'SSIM input array shapes are not equal! This issue seemed to be already fixed.. '
)
...
...
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