-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMultiLineString.cs
More file actions
133 lines (108 loc) · 3.79 KB
/
MultiLineString.cs
File metadata and controls
133 lines (108 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// Portions copyright 2005 - 2006: Morten Nielsen (www.iter.dk)
// Portions copyright 2006 - 2008: Rory Plaire (codekaizen@gmail.com)
//
// This file is part of SharpMap.
// SharpMap is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// SharpMap is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
// You should have received a copy of the GNU Lesser General Public License
// along with SharpMap; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Collections.Generic;
using GeoAPI.Geometries;
namespace SharpMap.SimpleGeometries
{
/// <summary>
/// A MultiLineString is a MultiCurve whose elements are LineStrings.
/// </summary>
[Serializable]
public class MultiLineString : MultiCurve<LineString>, IMultiLineString
{
/// <summary>
/// Initializes an instance of a MultiLineString
/// </summary>
internal protected MultiLineString() { }
internal protected MultiLineString(Int32 initialCapacity)
: base(initialCapacity) { }
///// <summary>
///// Collection of <see cref="LineString">LineStrings</see>
///// in the <see cref="MultiLineString"/>
///// </summary>
//public IList<LineString> LineStrings
//{
// get { return Collection; }
//}
/// <summary>
/// Creates a copy of this geometry.
/// </summary>
/// <returns>Copy of the MultiLineString.</returns>
public override Geometry Clone()
{
MultiLineString multiLineString = new MultiLineString();
foreach (LineString lineString in this)
{
multiLineString.Add(lineString.Clone() as LineString);
}
return multiLineString;
}
#region IMultiLineString Members
public new ILineString this[Int32 index]
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public IMultiLineString Reverse()
{
throw new NotImplementedException();
}
#endregion
#region IList<IGeometry> Members
IGeometry IList<IGeometry>.this[Int32 index]
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
#endregion
#region IEnumerable<IGeometry> Members
IEnumerator<IGeometry> IEnumerable<IGeometry>.GetEnumerator()
{
throw new NotImplementedException();
}
#endregion
#region IEnumerable Members
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
throw new NotImplementedException();
}
#endregion
#region IEnumerable<ILineString> Members
public new IEnumerator<ILineString> GetEnumerator()
{
IEnumerator<LineString> lines = base.GetEnumerator();
while(lines.MoveNext())
{
yield return lines.Current;
}
}
#endregion
}
}