- •In the structure returned from imfinfo function.
- •In addition to these png parameters, you can use any
- •Images), 'rle' (run-length encoding of 1-bit
- •Interleave: The format in which the data is stored. This can be
- •Cdf file handling
- •Image An array of structures containing information
- •IdxMapInfo a structure with 'Map' and 'Size' describing the
- •Vdata | 'Fields'
- •Values for 'Interpolate' are: lon, lat
- •It is written in the file. Each dimension in the file's datasets
- •Hdf version 5 data objects
- •Cdf library interface
- •Inquire - return basic characteristics of cdf
- •InquireVar - return information about cdf variable
- •Hdf version 4 library interface
- •Identifier.
- •Values for funcstr. For example, hdfdf24('lastref') corresponds to the
- •Values for funcstr. For example, hdfdfr8('setpalette',map) corresponds
- •Identifier.
- •In cases where the hdf c library accepts null for certain inputs, an
- •Identical to maxcache, but is -1 if the operation fails.
- •Xdimsize,ydimsize,upleft,lowright)
- •Vector of up to 13 elements containing projection-specific
- •Vector containing the number of values to read along each
- •Is a vector containing the dimension sizes of the subsetted region.
- •Index (zero-based) of the desired level. Fieldlist is a string
- •Vert_field,range)
- •Is an array containing the rank (number of dimensions) for each
- •Is an array of compression parameters. Status is -1 and other
- •Hdf version 5 library interface
- •Iterate - Calls a user function for each attribute
- •Vlen_get_buf_size - Determines storage requirements for vl data
- •Is_hdf5 - Determines if a file is in the hdf5 format
- •Is_simple - Determines if dataspace is simple
- •LibTiff library interface
- •InkSet - Set of inks used in a separated image
- •NetCdf library interface
- •In most cases, the syntax of the matlab function is similar to the
Identical to maxcache, but is -1 if the operation fails.
status = hdfsd('setchunk',sds_id,chunk_lengths,comp_type,...)
Makes a nonchunked scientific data set a chunked scientific data
set.
comp_type can be 'none','rle','deflate',or 'skphuff'.
'none' implies HDF_CHUNK, the others imply HDF_CHUNK | HDF_COMP.
Additional param/value pairs must be passed for some methods. This
routine understands the following param/value pairs:
'skphuff_skp_size' , integer
'deflate_level' , integer
status = hdfsd('writechunk',sds_id,origin,data)
Writes data to a chunked scientific data set.
[data,status] = hdfsd('readchunk',sds_id,origin)
Reads data from a chunked scientific data set.
N-bit data set functions
------------------------
N-bit data set functions determine the nonstandard data bit
length configuration for scientific data set data.
nbit_sds_id = hdfsd('setnbitdataset',sds_id,start_bit,bit_len,sign_ext,fill_one)
Defines the nonstandard bit length of the data set data.
Please read the file hdf4copyright.txt for more information.
See also hdf, hdfan, hdfdf24, hdfdfr8, hdfh, hdfhd,
hdfhe, hdfhx, hdfml, hdfv, hdfvf, hdfvh, hdfvs
<hdfv> - MATLAB Gateway to HDF V (Vgroup) interface.
HDFV MATLAB gateway to HDF Vgroup interface.
HDFV is a gateway to the HDF Vgroup (V) interface.
The general syntax for HDFV is
HDFV(funcstr,param1,param2,...). There is a one-to-one correspondence
between V functions in the HDF library and valid values for funcstr.
For example,
HDFV('nattrs',vgroup_id) corresponds to the C library call
Vnattrs(vgroup_id).
Syntax conventions
------------------
A status or identifier output of -1 indicates that the operation
failed.
Access functions
----------------
Access functions open files, initialize the Vgroup interface, and
access individual groups. They also terminate access to vgroups and
the Vgroup interface and close HDF files.
status = hdfv('start',file_id)
Initializes the V interface.
vgroup_id = hdfv('attach',file_id,vgroup_ref,access)
Establishes access to a vgroup; access can be 'r' or 'w'.
status = hdfv('detach',vgroup_id)
Terminates access to a vgroup.
status = hdfv('end',file_id)
Terminates access to the V interface.
Create functions
----------------
Create functions organize, label, and add data objects to
vgroups.
status = hdfv('setclass',vgroup_id,class)
Assigns a class to a vgroup.
status = hdfv('setname',vgroup_id,name)
Assigns a name to a vgroup.
ref = hdfv('insert',vgroup_id, id)
Adds a vgroup or vdata to an existing group; id can be a vdata id
or a vgroup id.
status = hdfv('addtagref',vgroup_id,tag,ref)
Adds any HDF data object to an existing vgroup.
status = hdfv('setattr',vgroup_id,name,A)
Sets the attribute of a vgroup.
File inquiry functions
----------------------
File inquiry functions return information about how vgroups are stored
in a file. They are useful for locating vgroups in a file.
[refs,count] = hdfv('lone',file_id,maxsize)
Returns the reference numbers of vgroups not included in other
vgroups.
next_ref = hdfv('getid',file_id,vgroup_ref)
Returns the reference number for the next vgroup in the HDF file.
vgroup_ref = hdfv('findclass',file_id,class)
Returns the reference number of the vgroup with the specified
class.
Vgroup inquiry functions
------------------------
Vgroup inquiry functions provide specific information about a specific
vgroup. This information includes the class, name, member count, and
additional member information.
[class_name,status] = hdfv('getclass',vgroup_id)
Returns the name of the class of the specified group.
[vgroup_name,status] = hdfv('getname',vgroup_id)
Returns the name of the specified group.
[num_entries,name,status] = hdfv('inquire',vgroup_id)
Returns the number of entries and the name of a vgroup.
status = hdfv('isvg',vgroup_id,ref)
Checks if the object specified by ref refers to a child vgroup of
the vgroup specified by vgroup_id.
status = hdfv('isvs',vgroup_id,vdata_ref)
Checks if the object specified by ref refers to a child vdata of
the vgroup specified by vgroup_id.
[tag,ref,status] = hdfv('gettagref',vgroup_id,index)
Retrieves a tag/reference number pair for a data object in the
specified vgroup.
count = hdfv('ntagrefs',vgroup_id)
Returns the number of tag/reference number pairs contained in the
specified vgroup.
[tag,refs,count] = hdfv('gettagrefs',vgroup_id,maxsize)
Retrieves the tag/reference pairs of all the data objects within a
vgroup.
tf = hdfv('inqtagref',vgroup_id,tag,ref)
Checks if an object belongs to a vgroup.
version = hdfv('getversion',vgroup_id)
Queries the vgroup version of a given vgroup.
count = hdfv('nattrs',vgroup_id)
Queries the total number of vgroup attributes.
[name,data_type,count,nbytes,status] = hdfv('attrinfo',vgroup_id,...
attr_index)
Queries information on a given vgroup attribute.
[values,status] = hdfv('getattr',vgroup_id,attr_index)
Queries the values of a given attribute.
ref = hdfv('Queryref',vgroup_id)
Returns the reference number of the specified vgroup.
tag = hdfv('Querytag',vgroup_id)
Returns the tag of the specified vgroup.
vdata_ref = hdfv('flocate',vgroup_id,field)
Returns the reference number of the vdata containing the specified
field name in the specified vgroup.
count = hdfv('nrefs',vgroup_id,tag)
Returns the number of data objects with the specified tag in the
specified vgroup.
Please read the file hdf4copyright.txt for more information.
See also hdf, hdfan, hdfdf24, hdfdfr8, hdfh, hdfhd,
hdfhe, hdfhx, hdfml, hdfsd, hdfvf, hdfvh, hdfvs
<hdfvf> - MATLAB Gateway to HDF VF (Vdata) interface.
HDFVF MATLAB gateway to VF functions in the HDF Vdata interface.
HDFVF is a gateway to the VF functions in the HDF Vdata interface.
The general syntax for HDFVF is HDFVF(funcstr,param1,param2,...).
There is a one-to-one correspondence between VF functions in the HDF
library and valid values for funcstr. For example,
HDFVF('nfields',vdata_id) corresponds to the C library call
VFnfields(vdata_id).
Syntax conventions
------------------
A status or identifier output of -1 indicates that the operation
failed.
Field inquiry functions
-----------------------
Field inquiry functions provide specific information about the fields
in a given vdata, including the field's size, name, order, type, and
number of fields in the vdata.
fsize = hdfvf('fieldesize',vdata_id,field_index)
Retrieves the field size (as stored in a file) of a specified
field.
fsize = hdfvf('fieldisize',vdata_id,field_index)
Retrieves the field size (as stored in memory) of a specified
field.
name = hdfvf('fieldname',vdata_id,field_index)
Retrieves the name of the specified field in the given vdata.
order = hdfvf('fieldorder',vdata_id,field_index)
Retrieves the order of the specified field in the given vdata.
data_type = hdfvf('fieldtype',vdata_id,field_index)
Retrieves the data type for the specified field in the given vdata.
count = hdfvf('nfields',vdata_id)
Retrieves the total number of fields in the specified vdata.
Please read the file hdf4copyright.txt for more information.
See also hdf, hdfan, hdfdf24, hdfdfr8, hdfh, hdfhd,
hdfhe, hdfhx, hdfml, hdfsd, hdfv, hdfvh, hdfvs
<hdfvh> - MATLAB Gateway to HDF VH (Vdata) interface.
HDFVH MATLAB gateway to VH functions in the HDF Vdata interface.
HDFVH is a gateway to the VH functions in the HDF Vdata interface.
The general syntax for HDFVH is
HDFVH(funcstr,param1,param2,...). There is a one-to-one correspondence
between VH functions in the HDF library and valid values for funcstr.
Syntax conventions
------------------
A status or identifier output of -1 indicates that the operation
failed.
High-level Vdata functions
--------------------------
High-level Vdata functions write data to single-field vdatas.
vgroup_ref = hdfvh('makegroup',file_id,tags,refs,...
vgroup_name,vgroup_class)
Groups a collection of data objects within a vgroup.
count = hdfvh('storedata',file_id,fieldname,data,...
vdata_name,vdata_class)
Creates vdatas containing records limited to one field with one
component per field.
count = hdfvh('storedatam',file_id,fieldname,data,...
vdata_name,vdata_class)
Creates vdatas containing records with one field containing one or
more components.
Please read the file hdf4copyright.txt for more information.
See also hdf, hdfan, hdfdf24, hdfdfr8, hdfh, hdfhd,
hdfhe, hdfhx, hdfml, hdfsd, hdfv, hdfvf, hdfvs
<hdfvs> - MATLAB Gateway to HDF VS (Vdata) interface.
HDFVS MATLAB gateway to VS functions in the HDF Vdata interface.
HDFVS is a gateway to the VS functions in the HDF Vdata interface.
The general syntax for HDFVS is
HDFVS(funcstr,param1,param2,...). There is a one-to-one correspondence
between VS functions in the HDF library and valid values for funcstr.
For example,
HDFVS('detach',vdata_id) corresponds to the C library call
VSdetach(vdata_id).
Syntax conventions
------------------
A status or identifier output of -1 indicates that the operation
failed.
Access functions
----------------
Access functions attach, or allow access, to vdatas. Data transfer can
only occur after a vdata has been accessed. These routines also detach
from, or properly terminate access to, vdatas when data transfer has
been completed.
vdata_id = hdfvs('attach',file_id,vdata_ref,access)
Establishes access to a specified vdata; access can be 'r' or 'w'.
status = hdfvs('detach',vdata_id)
Terminates access to a specified vdata.
Read and write functions
------------------------
Read and write functions read and write the contents of a vdata.
status = hdfvs('fdefine',vdata_id,fieldname,data_type,order)
Defines a new vdata field. data_type is a string specifying the HDF
number type. It can be of these strings: 'uchar8', 'uchar',
'char8', 'char', 'double', 'uint8', 'uint16', 'uint32', 'float',
'int8', 'int16', or 'int32'.
status = hdfvs('setclass',vdata_id,class)
Assigns a class to a vdata.
status = hdfvs('setfields',vdata_id,fields)
Specifies the vdata fields to be written to.
status = hdfvs('setinterlace',vdata_id,interlace)
Sets the interlace mode for a vdata; interlace can be 'full' or
'no'.
status = hdfvs('setname',vdata_id,name)
Assigns a name to a vdata.
count = hdfvs('write', vdata_id, data)
Writes to a vdata. data must be an nfields-by-1 cell array. Each
cell must contain an order(i)-by-n vector of data where order(i) is
the number of scalar values in each field. The types of the data
must match the field types set via hdfvs('setfields') or the fields
in an already existing vdata.
[data,count] = hdfvs('read',vdata_id,n)
Reads from a vdata. Data is returned in a nfields-by-1 cell array.
Each cell will contain a order(i)-by-n vector of data where order
is the number of scalar values in each field. The fields are
returned in the same order as specified in hdfvs('setfields',...).
pos = hdfvs('seek',vdata_id,record)
Seeks to a specified record in a vdata.
status = hdfvs('setattr',vdata_id,field_index,name,A)
Sets the attribute of a vdata field or vdata.
status = hdfvs('setexternalfile',vdata_id,filename,offset)
Stores vdata information in an external file.
File inquiry functions
----------------------
File inquiry functions provide information about how vdatas are stored
in a file. They are useful for locating vdatas in a file.
vdata_ref = hdfvs('find',file_id,vdata_name)
Searches for a given vdata name in the specified HDF file.
vdata_ref = hdfvs('findclass',file_id,vdata_class)
Returns the reference number of the first vdata corresponding to
the specified vdata class.
next_ref = hdfvs('getid',file_id,vdata_ref)
Returns the identifier of the next vdata in the file.
[refs,count] = hdfvs('lone',file_id,maxsize)
Returns the reference numbers of the vdatas that are not linked
into vgroups.
Vdata inquiry functions
-----------------------
Vdata inquiry functions provide specific information about a given
vdata, including the vdata's name, class, number of fields, number of
records, tag and reference pairs, interlace mode, and size.
status = hdfvs('fexist',vdata_id,fields)
Tests for the existence of fields in the specified vdata.
[n,interlace,fields,nbytes,vdata_name,status] = ...
hdfvs('inquire',vdata_id)
Returns information about the specified vdata.
count = hdfvs('elts',vdata_id)
Returns the number of records in the specified vdata.
[class_name,status] = hdfvs('getclass',vdata_id)
Returns the number of records in the specified vdata.
[field_names,count] = hdfvs('getfields',vdata_id)
Returns all field names within the specified vdata.
[interlace,status] = hdfvs('getinterlace',vdata_id)
Retrieves the interlace mode of the specified vdata.
[vdata_name,status] = hdfvs('getname',vdata_id)
Retrieves the name of the specified vdata.
version = hdfvs('getversion',vdata_id)
Returns the version number of a vdata.
nbytes = hdfvs('sizeof',vdata_id,fields)
Returns the fields sizes of the specified vdata.
[fields,status] = hdfvs('Queryfields',vdata_id)
Returns the field names of the specified vdata.
[name,status] = hdfvs('Queryname',vdata_id)
Returns the name of the specified vdata.
ref = hdfvs('Queryref',vdata_id)
Retrieves the reference number of the specified vdata.
tag = hdfvs('Querytag',vdata_id)
Retrieves the tag of the specified vdata.
[count,status] = hdfvs('Querycount',vdata_id)
Returns the number of records in the specified vdata.
[interlace,status] = hdfvs('Queryinterlace',vdata_id)
Returns the interlace mode of the specified vdata.
vsize = hdfvs('Queryvsize',vdata_id)
Retrieves the local size in bytes of the specified vdata record.
[field_index,status] = hdfvs('findex',vdata_id,fieldname)
Queries the index of a vdata field given the field name.
status = hdfvs('setattr',vdata_id,field_index,name,A)
Sets the attribute of a vdata field or vdata; field_index can be an
index number or 'vdata'.
count = hdfvs('nattrs',vdata_id)
Returns the number of attributes of the specified vdata and the
vdata fields contained in it.
count = hdfvs('fnattrs',vdata_id,field_index)
Queries the total number of vdata attributes.
attr_index = hdfvs('findattr',vdata_id,field_index,attr_name)
Retrieves the index of an attribute given the attribute name.
tf = hdfvs('isattr',vdata_id)
Determines if the given vdata is an attribute.
[name,data_type,count,nbytes,status] = hdfvs('attrinfo',...
vdata_id,field_index,attr_index)
Returns the name, data type, number of values, and the size of the
values of the specified attributes of the specified vdata field or
vdata.
Please read the file hdf4copyright.txt for more information.
See also hdf, hdfan, hdfdf24, hdfdfr8, hdfh, hdfhd,
hdfhe, hdfhx, hdfml, hdfsd, hdfv, hdfvf, hdfvh
HDF-EOS library interface help
<hdfgd> - MATLAB Gateway to HDF-EOS grid interface.
HDFGD MATLAB interface to the HDF-EOS Grid object.
HDFGD is the MATLAB interface to the HDF-EOS Grid object. HDF-EOS is an extension of NCSA (National Center for Supercomputing Applications) HDF
(Hierarchical Data Format). HDF-EOS is the scientific data format
standard selected by NASA as the baseline standard for EOS (Earth
Observing System).
HDFGD is a gateway to the Grid functions in the HDF-EOS C library,
which is developed and maintained by EOSDIS (Earth Observing System
Data and Information System). A grid data set consists of a
rectilinear array of two or more dimensions, dimension definitions, and
an associated map projections.
The general syntax for HDFGD is HDFGD(funcstr,param1,param2,...). There
is a one-to-one correspondence between GD functions in the HDF library
and valid values for funcstr. For example, HDFGD('detach',gridid)
corresponds to the C library call GDdetach(grid_id).
Syntax conventions
------------------
There is a one-to-one mapping between Grid functions in the HDF-EOS C
library and HDFGD syntaxes. For example, the C library contains this
function for getting the size of a specific dimension:
int32 GDdiminfo(int32 gridid, char *dimname)
The equivalent MATLAB usage is:
DIMSIZE = HDFGD('diminfo',GRID_ID,DIMNAME)
GRID_ID is the identifier (or handle) to a particular grid data set.
DIMNAME is a string containing the name of the specified dimension.
DIMSIZE is the size of the specified dimension, or -1 if the operation
fails.
Some of the C library functions accept input values that are defined in
terms of C macros. For example, the C GDopen() function requires an
access mode input that can be DFACC_READ, DFACC_RDWR, or DFACC_CREATE,
where these symbols are defined in the appropriate C header file.
Where macro definitions are used in the C library, the equivalent
MATLAB syntaxes use strings derived from the macro names. You can
either use a string containing the entire macro name, or you can omit
the common prefix. You can use either upper or lower case. For
example, this C function call:
status = GDopen("GridFile.hdf",DFACC_CREATE)
is equivalent to these MATLAB function calls:
status = hdfgd('open','GridFile.hdf','DFACC_CREATE')
status = hdfgd('open','GridFile.hdf','dfacc_create')
status = hdfgd('open','GridFile.hdf','CREATE')
status = hdfgd('open','GridFile.hdf','create')
In cases where a C function returns a value with a macro definition,
the equivalent MATLAB function returns the value as a string containing
the lower-case short form of the macro.
HDF number types are specified by strings, including
'uchar8', 'uchar', 'char8', 'char', 'double', 'uint8',
'uint16', 'uint32', 'float', 'int8', 'int16', and 'int32'.
In cases where the HDF-EOS library accepts NULL, an empty matrix ([])
should be used.
Most routines return the flag STATUS, which is 0 when the routine
succeeds and -1 when the routine fails. Routines with syntaxes which
don't contain STATUS will return failure information in one of its
outputs as notated in the function syntaxes below.
Programming Model
-----------------
The programming model for accessing a grid data set through HDFGD is as
follows:
1. Open the file and initialize the GD interface by obtaining a file
id from a file name.
2. Open or create a grid data set by obtaining a grid id from a grid
name.
3. Perform desired operations on the data set. 4. Close the grid data
set by disposing of the grid id. 5. Terminate grid access to the
file by disposing of the file id.
To access a single grid data set that already exists in an HDF-EOS
file, use the following MATLAB commands:
fileid = hdfgd('open',filename,access);
gridid = hdfgd('attach',fileid,gridname);
% Optional operations on the data set...
status = hdfgd('detach',gridid);
status = hdfgd('close',fileid);
To access several files at the same time, obtain a separate file
identifier for each file to be opened. To access more than one grid
data set, obtain a separate grid id for each data set.
It is important to properly dispose of grid id's and file id's so that
buffered operations are written completely to disk. If you quit MATLAB
or clear all MEX-files with GD identifiers still open, MATLAB will
issue a warning and automatically dispose of them.
Note that file identifiers returned by HDFGD are not interchangeable
with file identifiers returned by any other HDF-EOS or HDF function.
Function categories
-------------------
Grid data set routines are classified into the following categories:
- Access routines initialize and terminate access to the GD
interface and grid data sets (including opening and closing files).
- Definition routines allow the user to set key features of a grid data
set.
- Basic I/O routines read and write data and metadata to a grid data
set.
- Inquiry routines return information about data contained in a grid
data set.
- Subset routines allow reading of data from a specified geographic
region.
Access routines
---------------
GDopen
FILE_ID = HDFGD('open',FILENAME,ACCESS)
Given the filename and desired access mode, opens or creates an HDF
file in order to create, read, or write a grid data set. ACCESS
can be 'read', 'rdwr', or 'create'. FILE_ID is -1 if the operation
fails.
GDcreate
GRID_ID = HDFGD('create',FILE_ID,GRIDNAME,...
