Beispiel #1
0
        public object Clone()
        {
            RasterInfo clone = (RasterInfo)this.MemberwiseClone();

            if (Bands != null)
            {
                clone.Bands = (Bands)Bands.Clone();
            }

            return(clone);
        }
Beispiel #2
0
        public static RasterInfo ReadFrom(ArcXmlReader reader)
        {
            try
            {
                RasterInfo rasterInfo = new RasterInfo();

                if (!reader.IsEmptyElement)
                {
                    reader.Read();

                    while (!(reader.NodeType == XmlNodeType.EndElement && reader.Name == XmlName))
                    {
                        if (reader.NodeType == XmlNodeType.Element)
                        {
                            switch (reader.Name)
                            {
                            case Bands.XmlName: rasterInfo.Bands = Bands.ReadFrom(reader); break;
                            }
                        }

                        reader.Read();
                    }
                }

                return(rasterInfo);
            }
            catch (Exception ex)
            {
                if (ex is ArcXmlException)
                {
                    throw ex;
                }
                else
                {
                    throw new ArcXmlException(String.Format("Could not read {0} element.", XmlName), ex);
                }
            }
        }