Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 protected abstract void Write(MultiPolygon multiPolygon);