AgGateway.ADAPT.ISOv4Plugin.Writers.ShapeWriter.WritePolygon C# (CSharp) Method

WritePolygon() public static method

public static WritePolygon ( XmlWriter writer, AgGateway.ADAPT.ApplicationDataModel.Shapes.MultiPolygon multiPolygon ) : void
writer System.Xml.XmlWriter
multiPolygon AgGateway.ADAPT.ApplicationDataModel.Shapes.MultiPolygon
return void
        public static void WritePolygon(XmlWriter writer, MultiPolygon multiPolygon)
        {
            if (multiPolygon.Polygons == null ||
                multiPolygon.Polygons.Count == 0)
                return;

            foreach (var polygon in multiPolygon.Polygons)
            {
                WritePolygon(writer, polygon);
            }
        }

Same methods

ShapeWriter::WritePolygon ( XmlWriter writer, AgGateway.ADAPT.ApplicationDataModel.Shapes.Polygon polygon ) : void

Usage Example

Example #1
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);
        }
All Usage Examples Of AgGateway.ADAPT.ISOv4Plugin.Writers.ShapeWriter::WritePolygon