示例#1
0
        public int Open()
        {
            int id = -1;

            try
            {
                int index = 0;
                //int tag = (int)oid[0];
                //if (tag == H4SDS.DFTAG_NDG_NETCDF)
                //{
                //    index = (int)oid[1]; //HDFLibrary.SDidtoref(id) fails for netCDF
                //}
                //else
                //{
                index = HDF4API.SDreftoindex(_sd_id, _sds_ref);//(int)oid[1]
                //}
                id = HDF4Helper.SDselect(_sd_id, index);
            }
            catch (Exception ex)
            {
                id = -1;
            }
            return(id);
        }