Commit eaa763d2 authored by Daniel Scheffler's avatar Daniel Scheffler

Suppressed another warning coming from pyresample. Updated version info.

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent bb396fd5
Pipeline #8652 passed with stages
in 1 minute and 50 seconds
......@@ -2,6 +2,12 @@
History
=======
0.3.2 (2020-05-08)
------------------
* Suppressed another warning coming from pyresample.
0.3.1 (2020-05-08)
------------------
......
......@@ -282,7 +282,12 @@ class SensorMapGeometryTransformer(object):
elif self.resamp_alg == 'bilinear':
opts = {k: v for k, v in self.opts.items() if k not in ['sigmas']}
result = resample_bilinear(data, source_geo_def, target_geo_def, **opts).astype(data.dtype)
with warnings.catch_warnings():
# suppress a UserWarning coming from pyresample v0.15.0
warnings.filterwarnings('ignore', category=UserWarning,
message='You will likely lose important projection information when converting '
'to a PROJ string from another format.')
result = resample_bilinear(data, source_geo_def, target_geo_def, **opts).astype(data.dtype)
elif self.resamp_alg == 'gauss':
opts = {k: v for k, v in self.opts.items()}
......
......@@ -22,6 +22,6 @@
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = '0.3.1'
__versionalias__ = '20200508.02'
__version__ = '0.3.2'
__versionalias__ = '20200508.03'
__author__ = 'Daniel Scheffler'
......@@ -127,7 +127,11 @@ class Test_SensorMapGeometryTransformer(TestCase):
for rsp_alg in rsp_algs:
SMGT = SensorMapGeometryTransformer(lons=self.lons,
lats=self.lats,
resamp_alg=rsp_alg)
resamp_alg=rsp_alg,
# neighbours=8,
# radius_of_influence=45,
# epsilon=0
)
# to UTM32
# dem_map_geo, dem_gt, dem_prj = SMGT.to_map_geometry(self.dem_sensor_geo, tgt_prj=32632, tgt_res=(30, 30))
......@@ -137,7 +141,8 @@ class Test_SensorMapGeometryTransformer(TestCase):
tgt_coordgrid=((0, 30), (0, 30))
)
# from geoarray import GeoArray
# GeoArray(dem_map_geo, dem_gt, dem_prj).save(os.path.join(tests_path, 'test_output', 'resampled_gdal.bsq'))
# GeoArray(dem_map_geo, dem_gt, dem_prj).save(os.path.join(tests_path, 'test_output',
# 'resampled_pyresample_bilinear_16n.bsq'))
self.assertIsInstance(dem_map_geo, np.ndarray)
self.assertEqual(dem_map_geo.shape, (366, 976))
......
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