Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
EnMAP
sensormapgeo
Commits
eaa763d2
Commit
eaa763d2
authored
May 08, 2020
by
Daniel Scheffler
Browse files
Suppressed another warning coming from pyresample. Updated version info.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
bb396fd5
Pipeline
#8652
passed with stages
in 1 minute and 50 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
HISTORY.rst
View file @
eaa763d2
...
...
@@ -2,6 +2,12 @@
History
=======
0.3.2 (2020-05-08)
------------------
* Suppressed another warning coming from pyresample.
0.3.1 (2020-05-08)
------------------
...
...
sensormapgeo/transformer_2d.py
View file @
eaa763d2
...
...
@@ -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
()}
...
...
sensormapgeo/version.py
View file @
eaa763d2
...
...
@@ -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.0
2
'
__version__
=
'0.3.
2
'
__versionalias__
=
'20200508.0
3
'
__author__
=
'Daniel Scheffler'
tests/test_sensormapgeo.py
View file @
eaa763d2
...
...
@@ -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
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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