LoadPolygon() публичный статический Метод

public static LoadPolygon ( XmlNodeList polygonNodes ) : AgGateway.ADAPT.ApplicationDataModel.Shapes.MultiPolygon
polygonNodes System.Xml.XmlNodeList
Результат AgGateway.ADAPT.ApplicationDataModel.Shapes.MultiPolygon
Пример #1
0
        private static GuidancePattern LoadGuidancePattern(XmlNode inputNode, out string patternId)
        {
            patternId = inputNode.GetXmlNodeValue("@A");
            if (string.IsNullOrEmpty(patternId))
            {
                return(null);
            }

            GuidancePattern pattern = GetPattern(inputNode);

            if (pattern == null)
            {
                return(null);
            }

            pattern.Description = inputNode.GetXmlNodeValue(@"B");

            pattern.PropagationDirection = GetPropagationDirection(inputNode.GetXmlNodeValue("@E"));
            pattern.BoundingPolygon      = ShapeLoader.LoadPolygon(inputNode.SelectNodes("PLN[0]"));
            pattern.Extension            = GetExtension(inputNode.GetXmlNodeValue("@F"));
            pattern.GpsSource            = GetGpsSource(inputNode);
            pattern.OriginalEpsgCode     = inputNode.GetXmlNodeValue("@M");

            return(pattern);
        }
Пример #2
0
        private void LoadFieldBoundary(XmlNode inputNode, Field field)
        {
            var polygon = ShapeLoader.LoadPolygon(inputNode.SelectNodes("PLN"));

            if (polygon != null)
            {
                var fieldBoundary = new FieldBoundary
                {
                    FieldId     = field.Id.ReferenceId,
                    SpatialData = polygon,
                };

                _taskDocument.FieldBoundaries.Add(fieldBoundary);

                field.ActiveBoundaryId = fieldBoundary.Id.ReferenceId;
            }
        }
Пример #3
0
        private static GuidanceGroupDescriptor LoadGuidanceGroup(XmlNode inputNode, out string groupId)
        {
            groupId = inputNode.GetXmlNodeValue("@A");
            if (string.IsNullOrEmpty(groupId))
            {
                return(null);
            }

            var group = new GuidanceGroup();

            group.Description = inputNode.GetXmlNodeValue(@"B");

            group.BoundingPolygon = ShapeLoader.LoadPolygon(inputNode.SelectNodes("PLN[0]"));

            var patterns = GuidancePatternLoader.LoadGuidancePatterns(inputNode.SelectNodes("GPN"));

            group.GuidancePatternIds = patterns.Values.Select(x => x.Id.ReferenceId).ToList();

            return(new GuidanceGroupDescriptor(group, patterns));
        }