예제 #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;
            }
        }
예제 #2
0
 public ErrorSurface(string name, FileInfo rasterPath, Surface surf, bool isDefault, ErrorSurfaceProperty errProperty)
     : base(name, rasterPath)
 {
     Surf            = surf;
     _IsDefault      = isDefault;
     ErrorProperties = new Dictionary <string, ErrorSurfaceProperty>();
     if (errProperty != null)
     {
         ErrorProperties[errProperty.Name] = errProperty;
     }
 }