Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
arosics
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
Daniel Scheffler
arosics
Commits
3d797200
Commit
3d797200
authored
6 years ago
by
Daniel Scheffler
Browse files
Options
Downloads
Patches
Plain Diff
Implemented changes from the current branch of geoarray (feature/improve_metadata_handling).
parent
23cd8ab3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#3085
failed
6 years ago
Stage: test
Stage: cleanup
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
arosics/CoReg.py
+2
-22
2 additions, 22 deletions
arosics/CoReg.py
arosics/CoReg_local.py
+1
-1
1 addition, 1 deletion
arosics/CoReg_local.py
with
3 additions
and
23 deletions
arosics/CoReg.py
+
2
−
22
View file @
3d797200
...
...
@@ -430,34 +430,15 @@ class COREG(object):
if
not
self
.
q
:
print
(
"
Equalizing pixel grids and projections of reference and target image...
"
)
# noinspection PyProtectedMember
def
apply_subset_bandnames_metadata
(
geoArr_cr
):
# TODO: replace that function with geoArr.get_subset(zslice=slice(band4match, band4match+1))
# TODO: as soon as all metadata are passed through get_subset()
zslice
=
slice
(
geoArr_cr
.
band4match
,
geoArr_cr
.
band4match
+
1
)
if
geoArr_cr
.
_bandnames
:
geoArr_cr
.
bandnames
=
list
(
np
.
array
(
list
(
geoArr_cr
.
_bandnames
))[
zslice
])
if
geoArr_cr
.
_metadata
is
not
None
:
geoArr_cr
.
metadata
=
\
geoArr_cr
.
_metadata
[
list
(
np
.
array
(
range
(
len
(
geoArr_cr
.
_metadata
.
columns
)))[
zslice
])].
copy
()
return
geoArr_cr
if
self
.
grid2use
==
'
ref
'
:
# resample target image to reference image
self
.
shift
.
arr
=
self
.
shift
[:,
:,
self
.
shift
.
band4match
]
# resample the needed band only
self
.
shift
=
apply_subset_bandnames_metadata
(
self
.
shift
)
self
.
shift
.
get_subset
(
zslice
=
slice
(
self
.
shift
.
band4match
,
self
.
shift
.
band4match
+
1
))
self
.
shift
.
reproject_to_new_grid
(
prototype
=
self
.
ref
,
CPUs
=
self
.
CPUs
)
self
.
shift
.
band4match
=
0
# after resampling there is only one band in the GeoArray
else
:
# resample reference image to target image
# FIXME in case of different projections this will change the projection of the reference image!
self
.
ref
.
arr
=
self
.
ref
[:,
:,
self
.
ref
.
band4match
]
# resample the needed band only
self
.
ref
=
apply_subset_bandnames_metadata
(
self
.
ref
)
self
.
ref
.
get_subset
(
zslice
=
slice
(
self
.
ref
.
band4match
,
self
.
ref
.
band4match
+
1
))
self
.
ref
.
reproject_to_new_grid
(
prototype
=
self
.
shift
,
CPUs
=
self
.
CPUs
)
self
.
ref
.
band4match
=
0
# after resampling there is only one band in the GeoArray
...
...
@@ -608,7 +589,6 @@ class COREG(object):
PLT
.
subplot_3dsurface
(
scps
.
astype
(
np
.
float32
))
def
_get_opt_winpos_winsize
(
self
):
# type: (tuple,tuple) -> None
"""
Calculates optimal window position and size in reference image units according to DGM, cloud_mask and
trueCornerLonLat.
...
...
This diff is collapsed.
Click to expand it.
arosics/CoReg_local.py
+
1
−
1
View file @
3d797200
...
...
@@ -318,7 +318,7 @@ class COREG_LOCAL(object):
def
CoRegPoints_table
(
self
):
"""
Returns a GeoDataFrame with the columns
'
geometry
'
,
'
POINT_ID
'
,
'
X_IM
'
,
'
Y_IM
'
,
'
X_UTM
'
,
'
Y_UTM
'
,
'
X_WIN_SIZE
'
,
'
Y_WIN_SIZE
'
,
'
X_SHIFT_PX
'
,
'
Y_SHIFT_PX
'
,
'
X_SHIFT_M
'
,
'
Y_SHIFT_M
'
,
'
ABS_SHIFT
'
and
'
ANGLE
'
containing all
information containing all the results frm coregistration for all points in the tie point grid.
information containing all the results fr
o
m coregistration for all points in the tie point grid.
"""
return
self
.
tiepoint_grid
.
CoRegPoints_table
...
...
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