Example #1
0
 /// <summary>
 /// Writes specified Geometry to the TextWriter in WKT format.
 /// </summary>
 /// <param name="geometry">The geometry to be written.</param>
 /// <param name="writer">The output Stream the Geometry will be written to.</param>
 protected static void Write(IGeometry geometry, TextWriter writer)
 {
     if (geometry is IPoint)
     {
         WktWriter.AppendPointTaggedText((IPoint)geometry, writer);
     }
     else if (geometry is ILineString)
     {
         WktWriter.AppendLineStringTaggedText((ILineString)geometry, writer);
     }
     else if (geometry is IPolygon)
     {
         WktWriter.AppendPolygonTaggedText((IPolygon)geometry, writer);
     }
     else if (geometry is IMultiPoint)
     {
         WktWriter.AppendMultiPointTaggedText((IMultiPoint)geometry, writer);
     }
     else if (geometry is IMultiLineString)
     {
         WktWriter.AppendMultiLineStringTaggedText((IMultiLineString)geometry, writer);
     }
     else if (geometry is IMultiPolygon)
     {
         WktWriter.AppendMultiPolygonTaggetText((IMultiPolygon)geometry, writer);
     }
     else if (geometry is IGeometryCollection <IGeometry> )
     {
         WktWriter.AppendGeometryCollectionTaggedText((IGeometryCollection <IGeometry>)geometry, writer);
     }
 }