rasterio / rasterio-wheels

MIT License
11 stars 16 forks source link

HDF5 prints errors/warnings to terminal #39

Closed sgillies closed 4 years ago

sgillies commented 4 years ago

This ticket replaces https://github.com/mapbox/rasterio/issues/1847. We may be overlooking some HDF5 build or config option.

$ rio info http://download.osgeo.org/gdal/data/hdf5/vlstr_metadata.h5
HDF5-DIAG: Error detected in HDF5 (1.10.2) thread 0:
  #000: H5Adeprec.c line 193 in H5Aopen_name(): can't open attribute: '_FillValue'
    major: Attribute
    minor: Can't open object
  #001: H5Aint.c line 455 in H5A_open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #002: H5Oattribute.c line 528 in H5O_attr_open_by_name(): can't locate attribute: '_FillValue'
    major: Attribute
    minor: Object not found
/home/sean/.virtualenvs/sat/lib/python3.6/site-packages/rasterio/__init__.py:219: NotGeoreferencedWarning: Dataset has no geotransform set. The identity matrix may be returned.
  s = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)
{"bounds": [0.0, 1673.0, 3024.0, 0.0], "colorinterp": ["undefined"], "count": 1, "crs": null, "descriptions": [null], "driver": "HDF5Image", "dtype": "uint8", "height": 1673, "indexes": [1], "mask_flags": [["all_valid"]], "nodata": null, "res": [1.0, -1.0], "shape": [1673, 3024], "tiled": false, "transform": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0], "units": [null], "width": 3024}
NikosAlexandris commented 4 years ago

Are these errors/warnings safe to ignore? Is the problem only not opening the attribute: '_FillValue'? If they don't affect other attributes, can they be optionally suppressed?

sgillies commented 4 years ago

@NikosAlexandris I am not a regular HDF5 user and am not sure about that. I will need some help from users more experienced with that format.

sgillies commented 4 years ago

This looks like a GDAL HDF5 driver bug to me. I've reported it at https://github.com/OSGeo/gdal/issues/2480 and will close this issue.

sgillies commented 4 years ago

Fixed in GDAL: https://github.com/OSGeo/gdal/issues/2480. I'm going to patch our 2.4.4 accordingly.

rouault commented 4 years ago

I'm going to patch our 2.4.4 accordingly.

no upgrade to 3.0 or 3.1 instead ?