From dd08d6a7aa3e13fab3728d6309e558478a6e5393 Mon Sep 17 00:00:00 2001 From: "Morten W. Hansen" Date: Fri, 14 Aug 2020 11:52:14 +0200 Subject: [PATCH] https://github.com/nansencenter/django-geo-spaas/pull/128 - limit to 4 decimals in get_border function --- nansat/domain.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nansat/domain.py b/nansat/domain.py index 54485d85a..b38ff0dd6 100644 --- a/nansat/domain.py +++ b/nansat/domain.py @@ -554,6 +554,8 @@ def get_border(self, n_points=10, fix_lon=True, **kwargs): y_rc_vec = Domain._get_row_col_vector(y_size, n_points) col_vec, row_vec = Domain._compound_row_col_vectors(x_size, y_size, x_rc_vec, y_rc_vec) lon, lat = self.transform_points(col_vec, row_vec) + lon = lon.round(decimals=4) + lat = lat.round(decimals=4) crosses_dateline = np.diff(lon).max() > 100 # arbitrary number, larger than a maximum step if crosses_dateline and fix_lon: