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

netCDF driver: simplify identification logic by just checking runtime availability of HDF4/HDF5 drivers #10742

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

rouault
Copy link
Member

@rouault rouault commented Sep 6, 2024

... ignoring their compile-time availability, which makes it more robust in the case of plugin-only builds.

Also remove the GDAL_HAS_HDF4 and GDAL_HAS_HDF5 metadata items from the metadata of the netCDF driver. They are redundant with checking for GDALGetDriverByName("HDF4" / "HDF5") != nullptr.

CC @schwehr

#endif
#ifdef HAVE_HDF5
poDriver->SetMetadataItem("GDAL_HAS_HDF5", "YES");
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if there is anything counting on these being there or absent.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

For completness, adding this in the commit message
"Also remove the GDAL_HAS_HDF4 and GDAL_HAS_HDF5 metadata items
from the metadata of the netCDF driver. They are redundant with checking
for GDALGetDriverByName("HDF4" / "HDF5") != nullptr."

… availability of HDF4/HDF5 drivers...

... ignoring their compile-time availability, which makes it more
robust in the case of plugin-only builds.

Also remove the GDAL_HAS_HDF4 and GDAL_HAS_HDF5 metadata items
from the metadata of the netCDF driver. They are redundant with checking
for GDALGetDriverByName("HDF4" / "HDF5") != nullptr.
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 69.34%. remained the same
when pulling e78d91e on rouault:netcdf_identify_hdf4_hdf5
into 8f4571f on OSGeo:master.

@rouault rouault added this to the 3.10.0 milestone Sep 6, 2024
@rouault rouault merged commit 462285a into OSGeo:master Sep 6, 2024
35 checks passed
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.

3 participants