Commit fedaae86 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

feature added for parsing of input metadata (does not yet support global metadata domain)

components.CoReg_local.COREG_LOCAL:
- __init__(): changed default tie point filter level to 3

components.DeShifter.DESHIFTER:
- correct_shifts(): input metadata in band domain is now parsed to output data

updated __version__
parent 39943c16
......@@ -9,7 +9,7 @@ from .components import utilities
from .components import geometry
__author__ = 'Daniel Scheffler'
__version__= '2017-02-21_01'
__version__= '2017-02-23_01'
__all__=['COREG',
'COREG_LOCAL',
......
......@@ -30,7 +30,7 @@ class COREG_LOCAL(object):
def __init__(self, im_ref, im_tgt, grid_res, max_points=None, window_size=(256,256), path_out=None, fmt_out='ENVI',
out_crea_options=None, projectDir=None, r_b4match=1, s_b4match=1, max_iter=5, max_shift=5,
tieP_filter_level=2, align_grids=True, match_gsd=False, out_gsd=None, target_xyGrid=None,
tieP_filter_level=3, align_grids=True, match_gsd=False, out_gsd=None, target_xyGrid=None,
resamp_alg_deshift='cubic', resamp_alg_calc='cubic', footprint_poly_ref=None, footprint_poly_tgt=None,
data_corners_ref=None, data_corners_tgt=None, outFillVal=-9999, nodata=(None, None), calc_corners=True,
binary_ws=True, mask_baddata_ref=None, mask_baddata_tgt=None, CPUs=None, progress=True,
......
......@@ -259,10 +259,15 @@ class DESHIFTER(object):
self.arr_shifted = self.im2shift[:,:,self.band2process] \
if self.band2process is not None else self.im2shift[:]
self.GeoArray_shifted = GeoArray(self.arr_shifted, self.updated_gt, self.updated_projection)
out_geoArr = GeoArray(self.arr_shifted, self.updated_gt, self.updated_projection, q=self.q)
out_geoArr.nodata = self.nodata # equals self.im2shift.nodata after __init__()
out_geoArr.metadata = self.im2shift.metadata[[self.band2process]] \
if self.band2process is not None else self.im2shift.metadata
self.GeoArray_shifted = out_geoArr
if self.path_out:
GeoArray(self.arr_shifted,self.updated_gt,self.updated_projection).save(self.path_out,fmt=self.fmt_out)
out_geoArr.save(self.path_out,fmt=self.fmt_out)
else: # FIXME equal_prj==False ist noch NICHT implementiert
"""RESAMPLING NEEDED"""
......@@ -336,17 +341,20 @@ class DESHIFTER(object):
progress = self.progress,
q = self.q)
out_geoArr = GeoArray(out_arr, out_gt, out_prj, q=self.q)
out_geoArr.nodata = self.nodata # equals self.im2shift.nodata after __init__()
out_geoArr.metadata = self.im2shift.metadata[[self.band2process]] \
if self.band2process is not None else self.im2shift.metadata
self.arr_shifted = out_arr
self.updated_gt = out_gt
self.updated_projection = out_prj
self.updated_map_info = geotransform2mapinfo(out_gt,out_prj)
self.GeoArray_shifted = GeoArray(self.arr_shifted, self.updated_gt, self.updated_projection)
self.GeoArray_shifted = out_geoArr
self.is_shifted = True
self.is_resampled = True
if self.path_out:
out_geoArr = GeoArray(out_arr, out_gt, out_prj, q=self.q)
out_geoArr.nodata = self.nodata # equals self.im2shift.nodata after __init__()
out_geoArr.save(self.path_out,fmt=self.fmt_out, creationOptions=self.out_creaOpt)
# validation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment