Beispiel #1
0
        private static void WriteAplus(XmlWriter writer, APlus aPlus)
        {
            var line = new LineString {
                Points = new List <Point>()
            };

            line.Points.Add(aPlus.Point);

            ShapeWriter.WriteLine(writer, line, "5");
        }
Beispiel #2
0
        private static void WriteAbLine(XmlWriter writer, AbLine abLine)
        {
            var line = new LineString {
                Points = new List <Point>()
            };

            line.Points.Add(abLine.A);
            line.Points.Add(abLine.B);

            ShapeWriter.WriteLine(writer, line, "5");
        }
Beispiel #3
0
        private static void WriteBoundary(XmlWriter writer, MultiPolygon boundary)
        {
            if (boundary == null || boundary.Polygons == null || boundary.Polygons.Count == 0)
            {
                return;
            }

            // Guidance pattern only supports a single polygon-based boundary
            var polygon = boundary.Polygons[0];

            ShapeWriter.WritePolygon(writer, polygon);
        }
Beispiel #4
0
        private static void WritePivot(XmlWriter writer, CenterPivot centerPivot)
        {
            var line = new LineString {
                Points = new List <Point>()
            };

            line.Points.Add(centerPivot.Center);

            if (centerPivot.StartPoint != null)
            {
                line.Points.Add(centerPivot.StartPoint);
                if (centerPivot.EndPoint != null)
                {
                    line.Points.Add(centerPivot.EndPoint);
                }
            }

            ShapeWriter.WriteLine(writer, line, "5");
        }
Beispiel #5
0
        private void WriteBoundary(XmlWriter writer, int?boundaryId)
        {
            if (!boundaryId.HasValue)
            {
                return;
            }

            FieldBoundary fieldBoundary = null;

            foreach (var boundary in TaskWriter.DataModel.Catalog.FieldBoundaries)
            {
                if (boundary.Id.ReferenceId == boundaryId)
                {
                    fieldBoundary = boundary;
                    break;
                }
            }
            if (fieldBoundary == null || fieldBoundary.SpatialData == null)
            {
                return;
            }

            ShapeWriter.WritePolygon(writer, fieldBoundary.SpatialData);
        }
Beispiel #6
0
 private static void WriteSpiral(XmlWriter writer, Spiral spiral)
 {
     ShapeWriter.WriteLine(writer, spiral.Shape, "5");
 }
Beispiel #7
0
 private static void WriteAbCurve(XmlWriter writer, AbCurve abCurve)
 {
     ShapeWriter.WriteLine(writer, abCurve.Shape[0], "5");
 }