예제 #1
0
        // --Commented out by Inspection START (11/16/05 2:14 PM):
        //   public Grib2Product(){
        //   }
        // --Commented out by Inspection STOP (11/16/05 2:14 PM)
        /// <summary> Constructor.</summary>
        /// <param gridTemplateName="header">
        /// </param>
        /// <param gridTemplateName="is">
        /// </param>
        /// <param gridTemplateName="id">
        /// </param>
        /// <param gridTemplateName="gdsKey">
        /// </param>
        /// <param gridTemplateName="pds">
        /// </param>
        /// <param gridTemplateName="GdsOffset">
        /// </param>
        /// <param gridTemplateName="PdsOffset">PDS offset in Grib file
        /// </param>
        public Grib2Product(System.String header, Grib2IndicatorSection is_Renamed, Grib2IdentificationSection id, System.String gdsKey, Grib2ProductDefinitionSection pds, long GdsOffset, long PdsOffset)
        {
            this.header = header;
            this.disciplineId = is_Renamed.Discipline;
            this.id = id;
            this.referenceTime = id.ReferenceTime;
            this.gdsKey = gdsKey;
            this.pds = pds;
            this.GdsOffset = GdsOffset;
            this.PdsOffset = PdsOffset;

            // HERE NEW

            discipline = Grib2Resolver.ResolveDiscipline(this.disciplineId, this.id.Center_id);
            parameterCategory = Grib2Resolver.ResolveParameterCategory(this.disciplineId, this.ID.Center_id, this.ID.Master_table_version, this.ID.Local_table_version, this.PDS.ParameterCategory);
            parameter = Grib2Resolver.ResolveParameter(this.disciplineId, this.ID.Center_id, this.ID.Master_table_version, this.ID.Local_table_version, this.PDS.ParameterCategory, this.PDS.ParameterNumber);

            this._productIdentification = new Grib2ProductId(discipline, parameterCategory, parameter);
        }
예제 #2
0
        public ParamCategory ResolveParameterCategory(int pDisciplineId, int pMasterTableVersion, int pLocalTableVersion, int pCategory)
        {
            LoadXML();

            XElement catElement = getCategoryElement(pDisciplineId, 14, pCategory);
            if (catElement == null)
                return new ParamCategory("UNDEFINED", pCategory);
            else
            {
                ParamCategory dbg = new ParamCategory(catElement.Element(nsXName("CategoryName")).Value, pCategory);
                return new ParamCategory(catElement.Element(nsXName("CategoryName")).Value, pCategory);

            }
        }