Possible problems with Vattrinfo2
- Dominant language
- C
- Stars
- 22
- Forks
- 27
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 22
Description
Hello friends:
Im looking at what may be a bug in HDF4.2r0-Beta, downloaded 2/15/2023 from https://github.com/HDFGroup/hdf4.git and built locally on Ubuntu 22.04.
On the attached file, ./hdp dumpvg gives:
attr12: name=start_latlon type=5 count=1 size=4
0.041719
attr13: name=end_latlon type=5 count=1 size=4
-0.004751
but the correct answer is:
start_latlon = 0.04171858f, -172.38489f ;
end_latlon = -0.00475051f, 162.88487f ;
which I found using an independent library I am working on at https://github.com/JohnLCaron/cdm-kotlin (Note; work in Progress!)
Its likely Im missing something, for example what is the meaning of nfields in this interface:
```
intn Vattrinfo2(int32 vgroup_id, intn attr_index, char *attr_name, int32 *data_type, int32 *count, int32
*size, int32 *nfields, uint16 *refnum)
```
I was guessing that theres only one field in an attribute? so count should = vh.nelems * fld[0].nelems
looks like a bug where Vattrinfo2 is returning count = fld[0].nelems ??
If you are really are supporting more than one field, seem likely that there are other calls that need to be made, but I havent found them using the Vattr* API calls.
Maybe theres a workaround (that hdp is not using either)? It would be great to have a working example on how to
handle vgroup attributes in a general way.
To reproduce:
./hdp dumpvg -r 401 2006166131201_00702_CS_2B-GEOPROF_GRANULE_P_R03_E00.hdf
on this file:
[2006166131201_00702_CS_2B-GEOPROF_GRANULE_P_R03_E00.hdf.tar.gz](https://github.com/HDFGroup/hdf4/files/10994247/2006166131201_00702_CS_2B-GEOPROF_GRANULE_P_R03_E00.hdf.tar.gz)
Thanks for your help!
John
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.