Esempio n. 1
0
        public string AsSqlServerWkt()
        {
            StringBuilder result = new StringBuilder("MULTILINESTRING(");

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

            return(result.Remove(result.Length - 1, 1).Append(")").ToString());
        }
Esempio n. 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, this.ZValues[i], this.Measures[i] == ShapeConstants.NoDataValue ? "NULL" : this.Measures[i].ToString()));
            //}

            //result.Append(string.Format(" {0} {1} {2} {3})",
            //                                this.Points[NumberOfPoints - 1].X,
            //                                this.Points[NumberOfPoints - 1].Y,
            //                                this.ZValues[NumberOfPoints - 1],
            //                                this.Measures[NumberOfPoints - 1] == ShapeConstants.NoDataValue ? "NULL" : this.Measures[NumberOfPoints - 1].ToString()));

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