Beispiel #1
0
        protected override void Write(MultiPolygon multiPolygon)
        {
            var numPolygons = multiPolygon.NumGeometries();
            var polygons    = Enumerable
                              .Range(1, numPolygons)
                              .Select(n => multiPolygon.GeometryN(n))
                              .Cast <Polygon>()
                              .ToArray();

            this.writer.Write(ByteOrder.NDR);
            this.writer.WriteNdr(WkbType.MultiPolygon);
            this.writer.WriteNdr(numPolygons);
            Array.ForEach(polygons, p => this.Write(p));
        }
Beispiel #2
0
        protected override void Write(MultiPolygon multiPolygon)
        {
            var polygons = Enumerable
                           .Range(1, multiPolygon.NumGeometries())
                           .Select(n => multiPolygon.GeometryN(n))
                           .Cast <Polygon>()
                           .ToArray();

            this.WriteIdent <MultiPolygon>();
            this.writer.Write(LPAREN);
            this.WriteSeparated <Polygon>(
                p => this.Write(p, NoIdent),
                this.WriteSeparator,
                polygons);

            this.writer.Write(RPAREN);
        }