NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: zero length attrributes...

NOTE: The netcdf-hdf mailing list is no longer active. The list archives are made available for historical reasons.

Hi Ed,

> Quincey Koziol <koziol@xxxxxxxxxxxxx> writes:
> 
> >     What I was planning to do was to create empty dataspaces the same way we
> > create scalar dataspaces:
> >     scalar_space_id=H5Screate(H5S_SCALAR);  /* Create a scalar dataspace */
> > 
> > only use a new constant:
> >     empty_space_id=H5Screate(H5S_EMPTY);    /* Create an empty dataspace */
> > 
> >     Additionally, I think it would be a good idea to have two dataspaces 
> > that
> > are created by the library: H5S_SPACE_SCALAR and H5S_SPACE_EMPTY, which 
> > would
> > avoid the need for users to create these dataspaces (as outlined above) and
> > could be used directly in creating datasets or attributes:
> > 
> >     
> > dataset_id=H5Dcreate(fid,"/Dataset",H5T_NATIVE_INT,H5S_SPACE_EMPTY,H5P_DEFAULT);
> > 
> >     This would need support in the tools, the FORTRAN & C++ APIs, etc...
> > 
> >     Quincey
> > 
> > > Make sure that selections work sensibly:
> > > 
> > >     EMPTY AND SPACE = ??
> > >     EMPTY OR SPACE = ??
> > >     SPACE - EMPTY = SPACE
> > >     EMPTY - SPACE = ??
> > > 
> > > etc. 
> >     Hmm, you can't operate between two dataspaces, so these don't make any
> > sense.  Also, since there are no elements in the dataspace, there is no way
> > to perform I/O on an empty dataspace.
> > 
> >     Quincey
> 
> Quincey,
> 
> It sounds terrific to me, but don't forget that we also need to use
> this space for creating attributes, which currently are more
> restrictive than dataspaces.
    Yes, it'll work for attributes also.

        Quincey

  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-hdf archives: