Closed fwfichtner closed 4 years ago
To clearify, we're opening the dataset, but don't enforce closing (but have the option). Another alternative would be using a context manager like we do with the data
class.
class Image:
def __init__(self
self.dataset = rasterio.open(path)
...
def close(self):
"""closes Image"""
self.dataset.close()
With #47 this is at least much better for the tests.
Let's really make it possible to wrap it all up in a context manager.
Agree with that.
We don't enforce closing of the dataset, and we're not even very clear about that you should do this in the documentation (even though we offer the possibility), nor do we close
img
when we're testing.We could offer using ukis-pysat as context manager or at least document this better and use it ourselves.