Ejemplo n.º 1
0
        public ErrorSurface(XmlNode nodError, Surface surf)
            : base(nodError)
        {
            _IsDefault = bool.Parse(nodError.SelectSingleNode("IsDefault").InnerText);
            Surf       = surf;

            XmlNode nodMask = nodError.SelectSingleNode("Mask");

            if (nodMask is XmlNode)
            {
                // Must be a regular mask with the same name
                if (ProjectManager.Project.Masks.Any(x => x is Masks.RegularMask && string.Compare(x.Name, nodMask.InnerText, true) == 0))
                {
                    Mask = ProjectManager.Project.Masks.First(x => string.Compare(x.Name, nodMask.InnerText, true) == 0) as Masks.RegularMask;
                }
            }

            // There might not be any error surface properties if the error raster was "specified" raster than calculated
            ErrorProperties = new Dictionary <string, ErrorSurfaceProperty>();
            foreach (XmlNode nodProperty in nodError.SelectNodes("ErrorSurfaceProperties/ErrorSurfaceProperty"))
            {
                ErrorSurfaceProperty prop = new ErrorSurfaceProperty(nodProperty, surf);
                ErrorProperties[prop.Name] = prop;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor for masked error surfaces
 /// </summary>
 /// <param name="name"></param>
 /// <param name="rasterPath"></param>
 /// <param name="surf"></param>
 /// <param name="isDefault"></param>
 /// <param name="errProperties"></param>
 /// <param name="mask"></param>
 public ErrorSurface(string name, FileInfo rasterPath, Surface surf, bool isDefault, Dictionary <string, ErrorSurfaceProperty> errProperties, Masks.RegularMask mask)
     : base(name, rasterPath)
 {
     Surf            = surf;
     Mask            = mask;
     _IsDefault      = isDefault;
     ErrorProperties = errProperties;
 }