From 4d173b7ce53faab9600b14a54d2c08396c56d261 Mon Sep 17 00:00:00 2001 From: Denis Rykov Date: Tue, 16 Nov 2021 02:08:47 +0100 Subject: [PATCH] Don't use pixel_precision for calcuating window size --- telluric/georaster.py | 2 +- tests/test_collections.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/telluric/georaster.py b/telluric/georaster.py index e8d29b7c..2f341d42 100644 --- a/telluric/georaster.py +++ b/telluric/georaster.py @@ -1167,7 +1167,7 @@ def _window(self, bounds, to_round=True): else: window = self.window(*bounds) if to_round: - window = window.round_offsets(pixel_precision=0).round_shape(op='ceil') + window = window.round_offsets().round_shape(op='ceil') return window def _vector_to_raster_bounds(self, vector, boundless=False): diff --git a/tests/test_collections.py b/tests/test_collections.py index aad91de6..97122696 100644 --- a/tests/test_collections.py +++ b/tests/test_collections.py @@ -94,7 +94,9 @@ def test_convex_hull_raises_warning_with_invalid_shape(): with pytest.warns(UserWarning) as record: fcol.convex_hull - assert len(record) == 1 + # TODO: restore after migration to Shapely==1.8.0 is done + # assert len(record) = 1 + assert len(record) == 2 assert record[0].message.args[0] == "Some invalid shapes found, discarding them."