OpenDataCubePipelines / eugl

Sensor acquisition data quality characterisation
Apache License 2.0
1 stars 4 forks source link

fmask output files are not in COG format #15

Open Kirill888 opened 6 years ago

Kirill888 commented 6 years ago

See output of rio info command below.

Note "tiled": false, COGs ought to be tiled. Also nodata=0 is not ideal, I would consider value 0 as valid data -- classified by fmask as "unassigned", I would suggest 255 as nodata value.

rio info --indent 1 s3://datahub-level2/AODH/level2/1991-06-02/LT50890801991153ASA00/QA/LT50890801991153ASA00_FMASK.TIF
{
 "bounds": [
  366885.0,
  -3296415.0,
  603015.0,
  -3084885.0
 ],
 "colorinterp": [
  "palette"
 ],
 "compress": "deflate",
 "count": 1,
 "crs": "EPSG:32656",
 "descriptions": [
  "Layer_1"
 ],
 "driver": "GTiff",
 "dtype": "uint8",
 "height": 7051,
 "indexes": [
  1
 ],
 "interleave": "band",
 "lnglat": [
  152.84571445393462,
  -28.84343921394409
 ],
 "mask_flags": [
  [
   "nodata"
  ]
 ],
 "nodata": 0.0,
 "res": [
  30.0,
  30.0
 ],
 "shape": [
  7051,
  7871
 ],
 "tiled": false,
 "transform": [
  30.0,
  0.0,
  366885.0,
  0.0,
  -30.0,
  -3084885.0,
  0.0,
  0.0,
  1.0
 ],
 "units": [
  null
 ],
 "width": 7871
}
Kirill888 commented 6 years ago

Missing tiling parameters here:

https://github.com/OpenDataCubePipelines/eugl/blob/2d5f43f2ee31a3a03979bd1b0dfdfccde2ea2fff/eugl/fmask.py#L220-L236

Kirill888 commented 6 years ago

Same applies to Sentinel NRT service

rio info --indent 1 s3://dea-public-data/L2/sentinel-2-nrt/S2MSIARD/2018-09-02/S2A_OPER_MSI_ARD_TL_EPAE_20180902T021709_A016687_T54KVF_N02.06/QA/S2A_OPER_MSI_ARD_TL_EPAE_20180902T021709_A016687_T54KVF_N02.06_FMASK.TIF

It would be nice for this to be addressed, are files for nrt service produced by this repo @ASVincent?