public static LoadPolygon ( |
||
polygonNodes | ||
Résultat | AgGateway.ADAPT.ApplicationDataModel.Shapes.MultiPolygon |
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); }
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; } }
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)); }