Skip to content
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

Ensure that pixel_crop produces correct size for lazy rasters #105

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

astrojuanlu
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Aug 6, 2018

Codecov Report

Merging #105 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #105      +/-   ##
=========================================
+ Coverage   89.09%   89.1%   +<.01%     
=========================================
  Files          30      30              
  Lines        4164    4167       +3     
=========================================
+ Hits         3710    3713       +3     
  Misses        454     454
Impacted Files Coverage Δ
telluric/georaster.py 92.36% <ø> (ø) ⬆️
tests/test_merge_all.py 94.6% <100%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2dcbce0...f45c881. Read the comment docs.

@@ -999,8 +999,8 @@ def pixel_crop(self, bounds, xsize=None, ysize=None, window=None):
else:
window = window or rasterio.windows.Window(bounds[0],
bounds[1],
bounds[2] - bounds[0] + 1,
bounds[3] - bounds[1] + 1)
bounds[2] - bounds[0],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guydou proposed

max(bounds[2] - bounds[0], 1)

but it would be better to first discuss what are we trying to avoid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants