/// <summary> /// /// </summary> /// <param name="multiLineString"></param> /// <returns></returns> protected virtual int SetByteStreamLength(MultiLineString multiLineString) { int count = InitValue; foreach (LineString ls in multiLineString.Geometries) count += SetByteStreamLength(ls); return count; }
/// <summary> /// Creates a <c>MultiLineString</c> using the given <c>LineStrings</c>; a null or empty /// array will create an empty MultiLineString. /// </summary> /// <param name="lineStrings">LineStrings, each of which may be empty but not null-</param> public virtual IMultiLineString CreateMultiLineString(IBasicLineString[] lineStrings) { if (lineStrings == null) { return new MultiLineString(); } int count = lineStrings.Length; LineString[] ls = new LineString[count]; for (int I = 0; I < count; I++) { ls[I] = new LineString(lineStrings[I]); } MultiLineString temp = new MultiLineString(ls); return temp; }
/// <summary> /// /// </summary> /// <param name="multiLineString"></param> /// <param name="writer"></param> protected virtual void Write(MultiLineString multiLineString, XmlTextWriter writer) { writer.WriteStartElement("MultiLineString"); for (int i = 0; i < multiLineString.NumGeometries; i++) { writer.WriteStartElement("lineStringMember"); Write(multiLineString.Geometries[i] as LineString, writer); writer.WriteEndElement(); } writer.WriteEndElement(); }
/// <summary> /// /// </summary> /// <param name="geom"></param> /// <returns></returns> public virtual bool IsSimple(MultiLineString geom) { return IsSimpleLinearGeometry(geom); }