Esempio n. 1
0
        private static XElement ToXElement(CartesianAnomalyLayer layer, string fileName)
        {
            var xelem = new XElement(AnomalyLayer,
                                     new XAttribute(AnomalyLayerDepthAttr, layer.Depth),
                                     new XAttribute(AnomalyLayerThicknessAttr, layer.Thickness));

            if (fileName != null)
            {
                xelem.Add(new XElement(AnomalyFromFile,
                                       new XAttribute(AnomalyFileType, "plain-text"),
                                       new XAttribute(AnomalyFileName, fileName)));
            }

            return(xelem);
        }
Esempio n. 2
0
        private static CartesianAnomalyLayer ReadAnomalyLayer(XElement xlayer, Size2D size, string path)
        {
            var depth     = xlayer.AttributeAsDecimal(AnomalyLayerDepthAttr);
            var thickness = xlayer.AttributeAsDecimal(AnomalyLayerThicknessAttr);

            var anomalyLayer = new CartesianAnomalyLayer(depth, thickness)
            {
                UnderlyingXml = xlayer
            };

            //var xfromFile = xlayer.Element(AnomalyFromFile);
            //if (xfromFile != null)
            //    LoadAnomalyValuesFromFile(xfromFile, anomalyLayer, path);

            //var xapplique = xlayer.Element(AnomalyApplique);
            //if (xapplique != null)
            //    LoadAnomalyValuesFromApplique(xapplique, anomalyLayer);

            return(anomalyLayer);
        }