Пример #1
0
            internal Parser(XmlReader reader, TypeWashedPipeline pipeline)
            {
                this.reader   = reader;
                this.pipeline = pipeline;
                XmlNameTable nameTable = this.reader.NameTable;

                this.gmlNamespace       = nameTable.Add("http://www.opengis.net/gml");
                this.fullGlobeNamespace = nameTable.Add("http://schemas.microsoft.com/sqlserver/2011/geography");
            }
Пример #2
0
            private int points; // number of points in current figure

            /// <summary>
            /// Constructor
            /// </summary>
            /// <param name="reader">Input Reader</param>
            /// <param name="pipeline">Output pipeline</param>
            internal Parser(XmlReader reader, TypeWashedPipeline pipeline)
            {
                Debug.Assert(reader != null && pipeline != null, "reader or pipeline is null");
                this.reader   = reader;
                this.pipeline = pipeline;

                var nametable = this.reader.NameTable;

                this.gmlNamespace       = nametable.Add(GmlConstants.GmlNamespace);
                this.fullGlobeNamespace = nametable.Add(GmlConstants.FullGlobeNamespace);
            }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SendToTypeWashedPipeline"/> class.
 /// </summary>
 /// <param name="pipeline">Spatial pipeline that will receive the pipeline method calls.</param>
 internal SendToTypeWashedPipeline(TypeWashedPipeline pipeline)
 {
     this.pipeline = pipeline;
 }
Пример #4
0
 public Parser(TextReader reader, TypeWashedPipeline pipeline, bool allowOnlyTwoDimensions)
 {
     this.lexer    = new WellKnownTextLexer(reader);
     this.pipeline = pipeline;
     this.allowOnlyTwoDimensions = allowOnlyTwoDimensions;
 }
Пример #5
0
 internal static void DrawPoint(TypeWashedPipeline pipeline, PositionData point)
 {
     pipeline.BeginFigure(point.X, point.Y, point.Z, point.M);
     pipeline.EndFigure();
 }
Пример #6
0
        internal static void DrawLine(TypeWashedPipeline pipeline, PositionData[] line)
        {
            for (int i = 0; i < line.Length; ++i)
            {
                if (i == 0)
                {
                    pipeline.BeginFigure(line[i].X, line[i].Y, line[i].Z, line[i].M);
                }
                else
                {
                    pipeline.LineTo(line[i].X, line[i].Y, line[i].Z, line[i].M);
                }
            }

            pipeline.EndFigure();
        }