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

Use rasterio to save geotiffs when available #252

Merged
merged 5 commits into from Apr 16, 2018

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Apr 14, 2018

This refactors the geotiff writer in a couple new ways:

  1. Replace floating_point with dtype which expects a numpy dtype and will figure everything else out after that.
  2. Adds a check to see if rasterio is available and if so use the XRImage.save method for better performance.
  • Tests added
  • Tests passed
  • Passes git diff origin/develop **/*py | flake8 --diff

@djhoese djhoese added enhancement code enhancements, features, improvements component:writers optimization labels Apr 14, 2018
@djhoese djhoese added this to the v0.9 milestone Apr 14, 2018
@djhoese djhoese self-assigned this Apr 14, 2018
@djhoese djhoese requested a review from mraspaud April 14, 2018 19:51
fill_value = np.nan

try:
import rasterio
Copy link
Contributor

Choose a reason for hiding this comment

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

F401 'rasterio' imported but unused

@coveralls
Copy link

coveralls commented Apr 14, 2018

Coverage Status

Coverage increased (+0.07%) to 63.967% when pulling 4e7a699 on feature-geotiff-refactor into 1fe7e8c on develop.

@codecov-io
Copy link

codecov-io commented Apr 14, 2018

Codecov Report

Merging #252 into develop will decrease coverage by 2.58%.
The diff coverage is 71.01%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #252      +/-   ##
===========================================
- Coverage    63.89%   61.31%   -2.59%     
===========================================
  Files          112      111       -1     
  Lines        13858    13704     -154     
===========================================
- Hits          8855     8402     -453     
- Misses        5003     5302     +299
Impacted Files Coverage Δ
satpy/tests/writer_tests/test_geotiff.py 94.33% <ø> (ø) ⬆️
satpy/writers/geotiff.py 72.22% <71.01%> (+8.74%) ⬆️
satpy/composites/viirs.py 0% <0%> (-78.7%) ⬇️
satpy/readers/viirs_sdr.py 80.72% <0%> (-0.1%) ⬇️
satpy/tests/compositor_tests/__init__.py 98.46% <0%> (-0.03%) ⬇️
satpy/composites/crefl_utils.py 0% <0%> (ø) ⬆️
satpy/tests/compositor_tests/test_viirs.py

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 1fe7e8c...4e7a699. Read the comment docs.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

LGTM

@djhoese djhoese merged commit 2d1b12c into develop Apr 16, 2018
@djhoese djhoese deleted the feature-geotiff-refactor branch April 16, 2018 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:writers enhancement code enhancements, features, improvements optimization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants