Skip to content

Commit 8f193b6

Browse files
committed
cleanup #2
1 parent d6a4c82 commit 8f193b6

File tree

5 files changed

+2
-90
lines changed

5 files changed

+2
-90
lines changed

GeoJSON4EntityFramework/Elements/FeatureEF6.vb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,14 @@
1212
f.Geometry.Add(Point.FromDbGeometry(inp))
1313
Case "MultPoint"
1414
f.Geometry.Add(MultiPoint.FromDbGeometry(inp))
15-
<<<<<<< HEAD
1615
Case "LineString"
1716
f.Geometry.Add(LineString.FromDbGeometry(inp))
1817
Case "MultiLineString"
1918
f.Geometry.Add(MultiLineString.FromDbGeometry(inp))
20-
Case Else
21-
Throw New NotImplementedException
22-
=======
2319
Case "GeometryCollection"
2420
f.Geometry.Add(GeometryCollection.FromDbGeometry(inp))
25-
>>>>>>> additions_2
21+
Case Else
22+
Throw New NotImplementedException
2623
End Select
2724

2825
Return f

GeoJSON4EntityFramework/Elements/Polygon.vb

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,11 @@
33
Implements IGeoJsonGeometry
44

55
<Newtonsoft.Json.JsonIgnore()>
6-
<<<<<<< HEAD
7-
Public Property PointsList As New List(Of CoordinateList)
8-
9-
Public Overrides ReadOnly Property Coordinates()
10-
Get
11-
Try
12-
If PointsList.Count = 0 Then
13-
Return New Double() {}
14-
Else
15-
Dim out(PointsList.Count - 1)()() As Double
16-
For k As Integer = 0 To PointsList.Count - 1
17-
Dim Points3 As CoordinateList = PointsList(k)
18-
If Points3.Count = 0 Then
19-
Return New Double() {}
20-
ElseIf Points3.Count = 1 Then
21-
Throw New Exception("There must be an array of two or more points")
22-
Else
23-
out(k) = New Double(Points3.Count - 1)() {}
24-
'--Warning BC4232--
25-
'Using the iteration variable In a lambda expression may have unexpected results.
26-
'Instead, create a local variable within the Loop And assign it the value Of the iteration variable.
27-
For i As Integer = 0 To Points3.Count
28-
out(k)(i) = Points3(i).Coordinate
29-
Next
30-
'--
31-
End If
32-
Next
33-
Return out
34-
End If
35-
Catch ex As Exception
36-
Return New Double() {}
37-
End Try
38-
=======
396
Public Property Rings As New List(Of CoordinateList)
407

418
Public Overrides ReadOnly Property Coordinates()
429
Get
4310
Return Rings
44-
>>>>>>> additions_2
4511
End Get
4612
End Property
47-
4813
End Class
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
11
Partial Class Polygon
2-
<<<<<<< HEAD
3-
Public Overrides Sub CreateFromDbGeometry(inp As Data.Entity.Spatial.DbGeometry)
4-
If inp.SpatialTypeName <> MyBase.TypeName Then Throw New ArgumentException
5-
PointsList.Clear()
6-
7-
Ring2Coordinates(inp.ExteriorRing)
8-
Dim numRings = inp.InteriorRingCount
9-
If (numRings = 0) Then Return
10-
For i As Integer = 1 To numRings
11-
Dim ring = inp.InteriorRingAt(i)
12-
Ring2Coordinates(ring)
13-
Next
14-
15-
End Sub
16-
17-
Private Sub Ring2Coordinates(ring As Data.Entity.Spatial.DbGeometry)
18-
Dim Points = New CoordinateList
19-
For i As Integer = 1 To ring.PointCount
20-
Dim point = ring.PointAt(i)
21-
Points.AddNew(point.XCoordinate, point.YCoordinate)
22-
Next
23-
PointsList.Add(Points)
24-
=======
25-
262
Private Function RingToCoordinateList(ring As Entity.Spatial.DbGeometry) As CoordinateList
273
Dim extRingCoords As New CoordinateList()
284
For i = 1 To ring.PointCount
@@ -47,7 +23,6 @@
4723
Rings.Add(RingToCoordinateList(intRing))
4824
Next
4925
End If
50-
>>>>>>> additions_2
5126
End Sub
5227

5328
End Class

GeoJSON4EntityFramework/GeoJSON4EntityFramework.vbproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,10 @@
8181
<ItemGroup>
8282
<Compile Include="Base\GeoJsonGeometryEF6.vb" />
8383
<Compile Include="Elements\FeatureEF6.vb" />
84-
<<<<<<< HEAD
8584
<Compile Include="Elements\LineString.vb" />
8685
<Compile Include="Elements\LineStringEF6.vb" />
8786
<Compile Include="Elements\MultiLineStringEF6.vb" />
88-
=======
8987
<Compile Include="Elements\GeometryCollection.vb" />
90-
>>>>>>> additions_2
9188
<Compile Include="Elements\MultiPointEF6.vb" />
9289
<Compile Include="Elements\MultiPolygonEF6.vb" />
9390
<Compile Include="Elements\MultiLineString.vb" />

GeoJSON4EntityFramework5/Elements/PolygonEF5.vb

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,6 @@
1010

1111
Public Overrides Sub CreateFromDbGeometry(inp As Data.Spatial.DbGeometry)
1212
If inp.SpatialTypeName <> MyBase.TypeName Then Throw New ArgumentException
13-
<<<<<<< HEAD
14-
PointsList.Clear()
15-
16-
Ring2Coordinates(inp.ExteriorRing)
17-
Dim numRings = inp.InteriorRingCount
18-
If (numRings = 0) Then Return
19-
For i As Integer = 1 To numRings
20-
Dim ring = inp.InteriorRingAt(i)
21-
Ring2Coordinates(ring)
22-
Next
23-
24-
End Sub
25-
26-
Private Sub Ring2Coordinates(ring As Data.Spatial.DbGeometry)
27-
Dim Points = New CoordinateList
28-
For i As Integer = 1 To ring.PointCount
29-
Dim point = ring.PointAt(i)
30-
Points.AddNew(point.XCoordinate, point.YCoordinate)
31-
Next
32-
PointsList.Add(Points)
33-
=======
3413
Rings.Clear()
3514

3615
' Process exterior ring
@@ -44,7 +23,6 @@
4423
Rings.Add(RingToCoordinateList(intRing))
4524
Next
4625
End If
47-
>>>>>>> additions_2
4826
End Sub
4927

5028
End Class

0 commit comments

Comments
 (0)