/// <summary> /// Converts a MultiPolygon to <MultiPolygon Text> format, then Appends to it to the writer. /// </summary> /// <param name="multiPolygon">The MultiPolygon to process.</param> /// <param name="level"></param> /// <param name="writer">The output stream to Append to.</param> protected void AppendMultiPolygonText(MultiPolygon multiPolygon, int level, StringWriter writer) { if (multiPolygon.isEmpty()) { writer.Write("EMPTY"); } else { int level2 = level; bool doIndent = false; writer.Write("("); for (int i = 0; i < multiPolygon.getNumGeometries(); i++) { if (i > 0) { writer.Write(", "); level2 = level + 1; doIndent = true; } //AppendPolygonText((Polygon) multiPolygon.GetGeometryN(i), level2, doIndent, writer); AppendPolygonText((Polygon)multiPolygon.getGeometryN(i), level2, doIndent, writer); } writer.Write(")"); } }
/// <summary> /// Converts a MultiPolygon to <MultiPolygon Text> format, then Appends to it to the writer. /// </summary> /// <param name="multiPolygon">The MultiPolygon to process.</param> /// <param name="writer">The output stream to Append to.</param> public void AppendMultiPolygonText(MultiPolygon multiPolygon, TextWriter writer) { if (multiPolygon.isEmpty()) { writer.Write("EMPTY"); } else { //writer.Write("M"); for (int i = 0; i < multiPolygon.getNumGeometries(); i++) { /*if (i > 0 && (i<multiPolygon.GetNumGeometries()-1) ) * { * writer.Write(", "); * }*/ AppendPolygonText((Polygon)multiPolygon.getGeometryN(i), writer); } //writer.Write("Z"); } }
/// <summary> /// Converts a MultiPolygon to <MultiPolygon Text> format, then Appends to it to the writer. /// </summary> /// <param name="multiPolygon">The MultiPolygon to process.</param> /// <param name="level"></param> /// <param name="writer">The output stream to Append to.</param> protected void AppendMultiPolygonText(MultiPolygon multiPolygon, int level, StringWriter writer) { if ( multiPolygon.isEmpty() ) { writer.Write("EMPTY"); } else { int level2 = level; bool doIndent = false; writer.Write("("); for (int i = 0; i < multiPolygon.getNumGeometries(); i++) { if (i > 0) { writer.Write(", "); level2 = level + 1; doIndent = true; } //AppendPolygonText((Polygon) multiPolygon.GetGeometryN(i), level2, doIndent, writer); AppendPolygonText((Polygon) multiPolygon.getGeometryN(i), level2, doIndent, writer); } writer.Write(")"); } }
/// <summary> /// Converts a MultiPolygon to <MultiPolygon Text> format, then Appends to it to the writer. /// </summary> /// <param name="multiPolygon">The MultiPolygon to process.</param> /// <param name="writer">The output stream to Append to.</param> public void AppendMultiPolygonText(MultiPolygon multiPolygon, TextWriter writer) { if (multiPolygon.isEmpty()) { writer.Write("EMPTY"); } else { //writer.Write("M"); for (int i = 0; i < multiPolygon.getNumGeometries(); i++) { /*if (i > 0 && (i<multiPolygon.GetNumGeometries()-1) ) { writer.Write(", "); }*/ AppendPolygonText((Polygon) multiPolygon.getGeometryN(i), writer); } //writer.Write("Z"); } }