Beispiel #1
0
        /// <summary>
        /// Converts GeometryCollection to WKT format and appends WKT representation to the output stream.
        /// </summary>
        /// <param name="collection">The GeometryCollection be converted.</param>
        /// <param name="writer">The output Stream to Append WKT representation to.</param>
        private static void AppendGeometryCollectionTaggedText(IGeometryCollection <IGeometry> collection, TextWriter writer)
        {
            writer.Write("geometrycollection ");

            string dimension = WktWriter.GetDimensionText(collection);

            if (string.IsNullOrEmpty(dimension) == false)
            {
                writer.Write(dimension);
                writer.Write(" ");
            }

            WktWriter.AppendGeometryCollectionText(collection, writer);
        }
Beispiel #2
0
        /// <summary>
        /// Converts MultiPolygon to WKT format and appends WKT representation to the output stream.
        /// </summary>
        /// <param name="mp">The Multipolygon to be converted.</param>
        /// <param name="writer">The output Stream to Append WKT representation to.</param>
        private static void AppendMultiPolygonTaggetText(IMultiPolygon mp, TextWriter writer)
        {
            writer.Write("multipolygon ");

            string dimension = WktWriter.GetDimensionText(mp);

            if (string.IsNullOrEmpty(dimension) == false)
            {
                writer.Write(dimension);
                writer.Write(" ");
            }

            WktWriter.AppendMultiPolygonText(mp, writer);
        }
Beispiel #3
0
        /// <summary>
        /// Converts MultiLineString to WKT format and appends WKT representation to the output stream.
        /// </summary>
        /// <param name="mls">The MultiLineString to be converted.</param>
        /// <param name="writer">The output Stream to Append WKT representation to.</param>
        private static void AppendMultiLineStringTaggedText(IMultiLineString mls, TextWriter writer)
        {
            writer.Write("multilinestring ");

            string dimension = WktWriter.GetDimensionText(mls);

            if (string.IsNullOrEmpty(dimension) == false)
            {
                writer.Write(dimension);
                writer.Write(" ");
            }

            WktWriter.AppendMultiLineStringText(mls, writer);
        }
Beispiel #4
0
        /// <summary>
        /// Converts MultiPoint to WKT format and appends WKT representation to the output stream.
        /// </summary>
        /// <param name="multipoint">The MultiPoint to be converted.</param>
        /// <param name="writer">The output Stream to Append WKT representation to.</param>
        private static void AppendMultiPointTaggedText(IMultiPoint multipoint, TextWriter writer)
        {
            writer.Write("multipoint ");

            string dimension = WktWriter.GetDimensionText(multipoint);

            if (string.IsNullOrEmpty(dimension) == false)
            {
                writer.Write(dimension);
                writer.Write(" ");
            }

            WktWriter.AppendMultiPointText(multipoint, writer);
        }
Beispiel #5
0
        /// <summary>
        /// Converts Polygon to WKT format and appends WKT representation to the output stream.
        /// </summary>
        /// <param name="polygon">The Polygon to be converted.</param>
        /// <param name="writer">The output Stream to Append WKT representation to.</param>
        private static void AppendPolygonTaggedText(IPolygon polygon, TextWriter writer)
        {
            writer.Write("polygon ");

            string dimension = WktWriter.GetDimensionText(polygon);

            if (string.IsNullOrEmpty(dimension) == false)
            {
                writer.Write(dimension);
                writer.Write(" ");
            }

            WktWriter.AppendPolygonText(polygon, writer);
        }
Beispiel #6
0
        /// <summary>
        /// Converts LineString to WKT format and appends WKT representation to the output stream.
        /// </summary>
        /// <param name="linestring">The LineString to be converted.</param>
        /// <param name="writer">The output Stream to Append WKT representation to.</param>
        private static void AppendLineStringTaggedText(ILineString linestring, TextWriter writer)
        {
            writer.Write("linestring ");

            string dimension = WktWriter.GetDimensionText(linestring);

            if (string.IsNullOrEmpty(dimension) == false)
            {
                writer.Write(dimension);
                writer.Write(" ");
            }

            WktWriter.AppendLineStringText(linestring, writer);
        }