Skip to content

Commit

Permalink
Don't use pixel_precision for calcuating window size
Browse files Browse the repository at this point in the history
  • Loading branch information
drnextgis committed Nov 16, 2021
1 parent f7c2cfa commit 4d173b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion telluric/georaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 3 additions & 1 deletion tests/test_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."


Expand Down

0 comments on commit 4d173b7

Please sign in to comment.