コード例 #1
0
        public string AsSqlServerWkt()
        {
            StringBuilder result = new StringBuilder("MULTILINESTRING(");

            for (int i = 0; i < NumberOfParts; i++)
            {
                result.Append(string.Format("{0},",
                                            SqlServerWktMapFunctions.PointMGroupElementToWkt(ShapeHelper.GetPoints(this, i), ShapeHelper.GetMeasures(this, this.Parts[i]))));
            }

            return(result.Remove(result.Length - 1, 1).Append(")").ToString());
        }
コード例 #2
0
        public string AsSqlServerWkt()
        {
            //StringBuilder result = new StringBuilder("MULTIPOINT(");

            //for (int i = 0; i < NumberOfPoints - 1; i++)
            //{
            //    result.Append(string.Format(" {0} {1} {2} {3},", this.Points[i].X, this.Points[i].Y, "NULL", this.Measures[i]));
            //}

            //result.Append(string.Format(" {0} {1} {2} {3})",
            //                                this.Points[NumberOfPoints - 1].X,
            //                                this.Points[NumberOfPoints - 1].Y,
            //                                "NULL",
            //                                this.Measures[NumberOfPoints - 1]));

            //return result.ToString();
            return(string.Format("MULTIPOINT{0}", SqlServerWktMapFunctions.PointMGroupElementToWkt(this.Points, this.Measures)));
        }