New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove reference to rasterio.path
.
#1255
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1255 +/- ##
===========================================
- Coverage 93.61% 93.60% -0.01%
===========================================
Files 129 129
Lines 13146 13145 -1
===========================================
- Hits 12306 12305 -1
Misses 840 840
Continue to review full report at Codecov.
|
@@ -165,8 +164,7 @@ def open(self) -> Iterator[GeoRasterReader]: | |||
|
|||
try: | |||
_LOG.debug("opening %s", self.filename) | |||
with rasterio.DatasetReader(rasterio.path.parse_path(str(self.filename)), | |||
sharing=False) as src: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sharing=False
is important for Dask use-case, can't just drop it. Pretty sure you can pass it on to .open
. Keep in mind that .open
does extra checks with respect to GDAL environment and AWS settings and in the past that caused significant slow-downs. rasterio
promised to keep supporting direct access to DatasetReader
, plan is to allow string inputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added sharing=False
to the .open
call and everything seems to still work.
DatasetReader appears not accept string inputs as of 1.2.10.
Rasterio have expressed regret at publishing
rasterio.path
in their public API and intend to deprecate it. See #1246@Kirill888 said this was trivial, and indeed it was. I can't shake the feeling that I'm missing something, but the tests pass.
docs/about/whats_new.rst
for all changes