Exemplo n.º 1
0
        public static IEnumerable <ISOGuidanceGroup> ReadXML(XmlNodeList nodes)
        {
            List <ISOGuidanceGroup> items = new List <ISOGuidanceGroup>();

            foreach (XmlNode node in nodes)
            {
                items.Add(ISOGuidanceGroup.ReadXML(node));
            }
            return(items);
        }
Exemplo n.º 2
0
        public static ISOPartfield ReadXML(XmlNode node)
        {
            ISOPartfield field = new ISOPartfield();

            field.PartfieldID         = node.GetXmlNodeValue("@A");
            field.PartfieldCode       = node.GetXmlNodeValue("@B");
            field.PartfieldDesignator = node.GetXmlNodeValue("@C");
            field.PartfieldArea       = node.GetXmlNodeValueAsUInt("@D");
            field.CustomerIdRef       = node.GetXmlNodeValue("@E");
            field.FarmIdRef           = node.GetXmlNodeValue("@F");
            field.CropTypeIdRef       = node.GetXmlNodeValue("@G");
            field.CropVarietyIdRef    = node.GetXmlNodeValue("@H");
            field.FieldIdRef          = node.GetXmlNodeValue("@I");

            XmlNodeList plnNodes = node.SelectNodes("PLN");

            if (plnNodes != null)
            {
                field.Polygons.AddRange(ISOPolygon.ReadXML(plnNodes));
            }

            XmlNodeList lsgNodes = node.SelectNodes("LSG");

            if (lsgNodes != null)
            {
                field.LineStrings.AddRange(ISOLineString.ReadXML(lsgNodes));
            }

            XmlNodeList pntNodes = node.SelectNodes("PNT");

            if (pntNodes != null)
            {
                field.Points.AddRange(ISOPoint.ReadXML(pntNodes));
            }

            XmlNodeList ggpNodes = node.SelectNodes("GGP");

            if (ggpNodes != null)
            {
                field.GuidanceGroups.AddRange(ISOGuidanceGroup.ReadXML(ggpNodes));
            }

            return(field);
        }
Exemplo n.º 3
0
        public static ISOGuidanceGroup ReadXML(XmlNode node)
        {
            ISOGuidanceGroup item = new ISOGuidanceGroup();

            item.GuidanceGroupId         = node.GetXmlNodeValue("@A");
            item.GuidanceGroupDesignator = node.GetXmlNodeValue("@B");

            XmlNodeList gpnNodes = node.SelectNodes("GPN");

            if (gpnNodes != null)
            {
                item.GuidancePatterns.AddRange(ISOGuidancePattern.ReadXML(gpnNodes));
            }

            XmlNodeList plnNodes = node.SelectNodes("PLN");

            if (plnNodes != null)
            {
                item.BoundaryPolygons.AddRange(ISOPolygon.ReadXML(plnNodes));
            }
            return(item);
        }