public RasterBand(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     this._oidFieldName     = info.GetString("oidFieldName");
     this._isInteger        = info.GetBoolean("isInteger");
     this._meanCellHeight   = info.GetDouble("meanCellHeight");
     this._meanCellWidth    = info.GetDouble("meanCellWidth");
     this._height           = info.GetInt32("height");
     this._width            = info.GetInt32("width");
     this._pixelType        = (rstPixelType)Enum.Parse(typeof(rstPixelType), info.GetString("pixelType"), true);
     this._primaryField     = info.GetInt32("primaryField");
     this._tableType        = (esriRasterTableTypeEnum)Enum.Parse(typeof(esriRasterTableTypeEnum), info.GetString("tableType"), true);
     this._extent           = (Extent)info.GetValue("extent", typeof(Extent));
     this._spatialReference = (SpatialReference)info.GetValue("spatialReference", typeof(SpatialReference));
 }
 public RasterBand(RasterBand prototype) : base(prototype)
 {
     this._oidFieldName   = prototype.OidFieldName;
     this._isInteger      = prototype.IsInteger;
     this._meanCellHeight = prototype.MeanCellHeight;
     this._meanCellWidth  = prototype.MeanCellWidth;
     this._height         = prototype.Height2;
     this._width          = prototype.Width2;
     this._pixelType      = prototype.PixelType;
     this._primaryField   = prototype.PrimaryField;
     this._tableType      = prototype.TableType;
     if (prototype.Extent != null)
     {
         this._extent = prototype.Extent.Clone() as Extent;
     }
     if (prototype.SpatialReference != null)
     {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
 }
        //
        // CONSTRUCTOR
        //
        public RasterBand(IXPathNavigable path) : base(path)
        {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <OIDFieldName>
            XPathNavigator navigatorOIDFieldName = navigator.SelectSingleNode("OIDFieldName");

            if (navigatorOIDFieldName != null)
            {
                this._oidFieldName = navigatorOIDFieldName.Value;
            }

            // Create Fields Group
            TableGroup tableGroupFields = new TableGroup();

            tableGroupFields.Expanded = true;
            tableGroupFields.Text     = "Fields";
            this.Groups.Add(tableGroupFields);

            XPathNodeIterator interatorField = navigator.Select("Fields/FieldArray/Field");

            while (interatorField.MoveNext())
            {
                // Create Field
                XPathNavigator navigatorField = interatorField.Current;
                Field          field          = new Field(navigatorField, this);

                // Add Field To Group
                tableGroupFields.Rows.Add(field);
            }

            // Create Indexes Group
            TableGroup tableGroupIndexes = new TableGroup();

            tableGroupIndexes.Expanded = true;
            tableGroupIndexes.Text     = "Indexes";
            this.Groups.Add(tableGroupIndexes);

            XPathNodeIterator interatorIndex = navigator.Select("Indexes/IndexArray/Index");

            while (interatorIndex.MoveNext())
            {
                // Add Index
                XPathNavigator navigatorIndex = interatorIndex.Current;
                Index          index          = new Index(navigatorIndex);
                tableGroupIndexes.Groups.Add(index);

                // Add Field Index
                XPathNodeIterator interatorIndexField = navigatorIndex.Select("Fields/FieldArray/Field");
                while (interatorIndexField.MoveNext())
                {
                    XPathNavigator navigatorIndexField = interatorIndexField.Current;
                    IndexField     indexField          = new IndexField(navigatorIndexField);
                    index.Rows.Add(indexField);
                }
            }

            // <IsInteger>
            XPathNavigator navigatorIsInteger = navigator.SelectSingleNode("IsInteger");

            if (navigatorIsInteger != null)
            {
                this._isInteger = navigatorIsInteger.ValueAsBoolean;
            }

            // <MeanCellHeight>
            XPathNavigator navigatorMeanCellHeight = navigator.SelectSingleNode("MeanCellHeight");

            if (navigatorMeanCellHeight != null)
            {
                this._meanCellHeight = navigatorMeanCellHeight.ValueAsDouble;
            }

            // <MeanCellWidth>
            XPathNavigator navigatorMeanCellWidth = navigator.SelectSingleNode("MeanCellWidth");

            if (navigatorMeanCellWidth != null)
            {
                this._meanCellWidth = navigatorMeanCellWidth.ValueAsDouble;
            }

            // <Height>
            XPathNavigator navigatorHeight = navigator.SelectSingleNode("Height");

            if (navigatorHeight != null)
            {
                this._height = navigatorHeight.ValueAsInt;
            }

            // <Width>
            XPathNavigator navigatorWidth = navigator.SelectSingleNode("Width");

            if (navigatorWidth != null)
            {
                this._width = navigatorWidth.ValueAsInt;
            }

            // <PixelType>
            XPathNavigator navigatorPixelType = navigator.SelectSingleNode("PixelType");

            if (navigatorPixelType != null)
            {
                this._pixelType = GeodatabaseUtility.GetPixelType(navigatorPixelType.Value);
            }

            // <PrimaryField>
            XPathNavigator navigatorPrimaryField = navigator.SelectSingleNode("PrimaryField");

            if (navigatorPrimaryField != null)
            {
                this._primaryField = navigatorPrimaryField.ValueAsInt;
            }

            // <TableType>
            XPathNavigator navigatorTableType = navigator.SelectSingleNode("TableType");

            if (navigatorTableType != null)
            {
                this._tableType = (esriRasterTableTypeEnum)Enum.Parse(typeof(esriRasterTableTypeEnum), navigatorTableType.Value, true);
            }

            // <Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");

            if (navigatorExtent != null)
            {
                this._extent = new Extent(navigatorExtent);
            }
            else
            {
                this._extent = new Extent();
            }

            // <SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");

            if (navigatorSpatialReference != null)
            {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else
            {
                this._spatialReference = new SpatialReference();
            }
        }
        //
        // CONSTRUCTOR
        //
        public RasterBand(IXPathNavigable path) : base(path) {
            // Get Navigator
            XPathNavigator navigator = path.CreateNavigator();

            // <OIDFieldName>
            XPathNavigator navigatorOIDFieldName = navigator.SelectSingleNode("OIDFieldName");
            if (navigatorOIDFieldName != null) {
                this._oidFieldName = navigatorOIDFieldName.Value;
            }

            // Create Fields Group
            TableGroup tableGroupFields = new TableGroup();
            tableGroupFields.Expanded = true;
            tableGroupFields.Text = "Fields";
            this.Groups.Add(tableGroupFields);

            XPathNodeIterator interatorField = navigator.Select("Fields/FieldArray/Field");
            while (interatorField.MoveNext()) {
                // Create Field
                XPathNavigator navigatorField = interatorField.Current;
                Field field = new Field(navigatorField, this);

                // Add Field To Group
                tableGroupFields.Rows.Add(field);
            }

            // Create Indexes Group
            TableGroup tableGroupIndexes = new TableGroup();
            tableGroupIndexes.Expanded = true;
            tableGroupIndexes.Text = "Indexes";
            this.Groups.Add(tableGroupIndexes);

            XPathNodeIterator interatorIndex = navigator.Select("Indexes/IndexArray/Index");
            while (interatorIndex.MoveNext()) {
                // Add Index
                XPathNavigator navigatorIndex = interatorIndex.Current;
                Index index = new Index(navigatorIndex);
                tableGroupIndexes.Groups.Add(index);

                // Add Field Index
                XPathNodeIterator interatorIndexField = navigatorIndex.Select("Fields/FieldArray/Field");
                while (interatorIndexField.MoveNext()) {
                    XPathNavigator navigatorIndexField = interatorIndexField.Current;
                    IndexField indexField = new IndexField(navigatorIndexField);
                    index.Rows.Add(indexField);
                }
            }

            // <IsInteger>
            XPathNavigator navigatorIsInteger = navigator.SelectSingleNode("IsInteger");
            if (navigatorIsInteger != null) {
                this._isInteger = navigatorIsInteger.ValueAsBoolean;
            }

            // <MeanCellHeight>
            XPathNavigator navigatorMeanCellHeight = navigator.SelectSingleNode("MeanCellHeight");
            if (navigatorMeanCellHeight != null) {
                this._meanCellHeight = navigatorMeanCellHeight.ValueAsDouble;
            }

            // <MeanCellWidth>
            XPathNavigator navigatorMeanCellWidth = navigator.SelectSingleNode("MeanCellWidth");
            if (navigatorMeanCellWidth != null) {
                this._meanCellWidth = navigatorMeanCellWidth.ValueAsDouble;
            }

            // <Height>
            XPathNavigator navigatorHeight = navigator.SelectSingleNode("Height");
            if (navigatorHeight != null) {
                this._height = navigatorHeight.ValueAsInt;
            }

            // <Width>
            XPathNavigator navigatorWidth = navigator.SelectSingleNode("Width");
            if (navigatorWidth != null) {
                this._width = navigatorWidth.ValueAsInt;
            }

            // <PixelType>
            XPathNavigator navigatorPixelType = navigator.SelectSingleNode("PixelType");
            if (navigatorPixelType != null) {
                this._pixelType = GeodatabaseUtility.GetPixelType(navigatorPixelType.Value);
            }

            // <PrimaryField>
            XPathNavigator navigatorPrimaryField = navigator.SelectSingleNode("PrimaryField");
            if (navigatorPrimaryField != null) {
                this._primaryField = navigatorPrimaryField.ValueAsInt;
            }

            // <TableType>
            XPathNavigator navigatorTableType = navigator.SelectSingleNode("TableType");
            if (navigatorTableType != null) {
                this._tableType = (esriRasterTableTypeEnum)Enum.Parse(typeof(esriRasterTableTypeEnum), navigatorTableType.Value, true);
            }

            // <Extent>
            XPathNavigator navigatorExtent = navigator.SelectSingleNode("Extent");
            if (navigatorExtent != null) {
                this._extent = new Extent(navigatorExtent);
            }
            else {
                this._extent = new Extent();
            }

            // <SpatialReference>
            XPathNavigator navigatorSpatialReference = navigator.SelectSingleNode("SpatialReference");
            if (navigatorSpatialReference != null) {
                this._spatialReference = new SpatialReference(navigatorSpatialReference);
            }
            else {
                this._spatialReference = new SpatialReference();
            }
        }
 public RasterBand(RasterBand prototype) : base(prototype) {
     this._oidFieldName = prototype.OidFieldName;
     this._isInteger = prototype.IsInteger;
     this._meanCellHeight = prototype.MeanCellHeight;
     this._meanCellWidth = prototype.MeanCellWidth;
     this._height = prototype.Height2;
     this._width = prototype.Width2;
     this._pixelType = prototype.PixelType;
     this._primaryField = prototype.PrimaryField;
     this._tableType = prototype.TableType;
     if (prototype.Extent != null) {
         this._extent = prototype.Extent.Clone() as Extent;
     }
     if (prototype.SpatialReference != null) {
         this._spatialReference = prototype.SpatialReference.Clone() as SpatialReference;
     }
 }
 public RasterBand(SerializationInfo info, StreamingContext context) : base(info, context) {
     this._oidFieldName = info.GetString("oidFieldName");
     this._isInteger = info.GetBoolean("isInteger");
     this._meanCellHeight = info.GetDouble("meanCellHeight");
     this._meanCellWidth = info.GetDouble("meanCellWidth");
     this._height = info.GetInt32("height");
     this._width = info.GetInt32("width");
     this._pixelType = (rstPixelType)Enum.Parse(typeof(rstPixelType), info.GetString("pixelType"), true);
     this._primaryField = info.GetInt32("primaryField");
     this._tableType = (esriRasterTableTypeEnum)Enum.Parse(typeof(esriRasterTableTypeEnum), info.GetString("tableType"), true);
     this._extent = (Extent)info.GetValue("extent", typeof(Extent));
     this._spatialReference = (SpatialReference)info.GetValue("spatialReference", typeof(SpatialReference));
 }