[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about NcML "char" vs "byte" types



Michael Johnson wrote:
Hi John,

I recently started working at OPeNDAP.org in Narragansett, RI. I am working on an NcML handler for Hyrax. I had a simple question which I couldn't find a satisfactory answer to in the NcML schema or online and Dan Holloway suggested I write you.

For NcML types "char" and "byte", is the distinction that the specification of the value is numeric in [0, 255] for a byte and a single C character for char? I would also assume char types can be specified using the standard C syntax?

As a metaquestion, is there a repository of NcML files I can use as examples to find answers for questions such as these as I extend my parser?

Thanks very much for your help!

-Michael

-----------------------------------------------------------------
Michael Johnson <address@hidden>
OPeNDAP, Inc.



Hi Michael:

"char" is a legacy type that mostly is used for ascii. we generally assume it can be converted to String type, although there are some issues around multidimensional arrays. In a way, its not really defines what it is, but the typical case is that its mapped to C char type.

"byte" is 8-bit data, may be signed or unsigned.

Not sure what you mean by " would also assume char types can be specified using the standard C syntax? "

You might have a look at:

 http://www.unidata.ucar.edu/software/netcdf-java/CDM/index.html

Which parts of NcML you will add to Hyrax? I have some test files, although I dont think they would answer these kinds of questions.