Closed lukasValentin closed 1 year ago
Merging #78 (63f9092) into master (239fa0d) will increase coverage by
0.12%
. The diff coverage is66.26%
.
@@ Coverage Diff @@
## master #78 +/- ##
==========================================
+ Coverage 56.81% 56.94% +0.12%
==========================================
Files 67 68 +1
Lines 5220 5265 +45
Branches 1047 1059 +12
==========================================
+ Hits 2966 2998 +32
- Misses 1957 1960 +3
- Partials 297 307 +10
Flag | Coverage Δ | |
---|---|---|
unittests | 56.94% <66.26%> (+0.12%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files | Coverage Δ | |
---|---|---|
eodal/__meta__.py | 100.00% <100.00%> (ø) |
|
eodal/core/algorithms.py | 67.07% <100.00%> (+1.68%) |
:arrow_up: |
eodal/core/band.py | 75.62% <100.00%> (+0.89%) |
:arrow_up: |
eodal/core/sensors/sentinel2.py | 61.72% <85.71%> (-0.26%) |
:arrow_down: |
eodal/mapper/mapper.py | 75.24% <50.00%> (-0.25%) |
:arrow_down: |
eodal/core/utils/__init__.py | 77.77% <77.77%> (ø) |
|
eodal/utils/geometry.py | 79.31% <0.00%> (-2.84%) |
:arrow_down: |
eodal/core/raster.py | 73.16% <38.88%> (-2.20%) |
:arrow_down: |
... and 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
This PR addresses #77 that shed some light on masking issues in EOdal. In particular, the mask of the Sentinel-2 Scene Classification layer was not propagated correctly. While debugging this issue, I found some general problems with the propagation of data types, fill and nodata values caused by inconsistencies in the code and poor type checking.
The major fixes include:
np.ma.masked_array
. If not (previous behavior) numpy would interfere a fill value that would often not be the no-data type of the raster. In the forthcoming release of EOdal, the fill-value will now equal the nodata value.RasterCollection
has been improved and extended to allINT
,FLOAT
, andCOMPLEX
data types currently supported by numpy. In the previous version, all data types were cast tonumpy.float32
or evennumpy.float64
leading to an unnecessary high consumption of memory.scale
andoffset
parameters are now correctly written to the file metadata when exporting aBand
orRasterCollection
object. In previous versions of EOdal, the information about this two attributes was not written to output. Also, the way scale and offset are applied, is now consistent withQGIS
meaning that raster files created by EOdal will be shown with correct scale and offset in QGIS (QGIS applies them on the fly when displaying the raster data)In addition, a new feature was implemented allowing to create
cloud-optimized GeoTiffs (COG)
fromRasterCollection
objects. A new keyword-argumentas_cog
has been added toRasterCollection.to_rasterio
.as_cog
is False by default. If True, a COG will be generated.