[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20050922:DODS/THREDDS confusion
On Mar 9, 2006, at 9:00 AM, John Caron wrote:
Hi David:
This looks great, a few comments aboyut what i did in the netcdf-
java library which reads opendap:
David Wojtowicz wrote:
OK,
Here's what I have come up with concerning the discussion in this
thread. Thanks for considering these potential changes. A
pointer to the patch is at the end of this message.
***** Summary of Modified Functionality:
1) All containerized attributes are now "flattened" into the flat
namespace. A colon seperates the container name from the
contained attribute name. Since all container attributes are
removed by this process, the netCDF API no longer chokes from
encountering one, and the former contents of the containers are
now available to access in flat namespace if the user cares to do so.
I did the same in netcdf-java library, but it uses a "." instead of
a ":" to seperate the container name(s)
David, Would you mind if I changed your code to match the behavior of
John's library?
James
2) Because containerized attributes containing strings, are not
quoted, the code that removes the quotes is modified to ignore the
case where there is no quotes.
3) In the case of arrays of strings, the array is translated to an
array of characters of the next higher rank, with the extra
dimension's size and name being determine as follows:
a) If DODS:strlen attribute exists (or varname:DODS:strlen in the
case of translated structures) it supplies the size and
DODS:dimName supplies the name
or
b) otherwise, the STRING_ARRAY_SIZE constant is used as the size
and varname-chars is used as the dim name.
The extra dimension is added to the global dimension list (if not
already existing). If the name already exists for some reason,
but with a different size, an alternate name is used.
4) Single scalar strings are treated in a similar manner.
I believe I prefetch all scalar Strings, and determine their
correct length, then cache the data values.
--
James Gallagher jgallagher at opendap.org
OPeNDAP, Inc 406.723.8663