Skip to content

Commit 202123a

Browse files
committed
Merge branch 'additions_merge'
2 parents 1c7db37 + 791c045 commit 202123a

File tree

79 files changed

+271941
-226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+271941
-226
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ obj/
1313
*.suo
1414
*.user
1515
*.sln.docstates
16+
.vs/
1617

1718
# Build results
1819
[Dd]ebug/

GeoJSON4EntityFramework.sln

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.30110.0
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.23107.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "GeoJSON4EntityFramework", "GeoJSON4EntityFramework\GeoJSON4EntityFramework.vbproj", "{7B0F6694-A109-4F3F-84A0-9FA49193AF31}"
77
EndProject
@@ -17,12 +17,12 @@ Global
1717
Release|Any CPU = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(ProjectConfigurationPlatforms) = postSolution
20-
{7B0F6694-A109-4F3F-84A0-9FA49193AF31}.Debug|Any CPU.ActiveCfg = Release|Any CPU
21-
{7B0F6694-A109-4F3F-84A0-9FA49193AF31}.Debug|Any CPU.Build.0 = Release|Any CPU
20+
{7B0F6694-A109-4F3F-84A0-9FA49193AF31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{7B0F6694-A109-4F3F-84A0-9FA49193AF31}.Debug|Any CPU.Build.0 = Debug|Any CPU
2222
{7B0F6694-A109-4F3F-84A0-9FA49193AF31}.Release|Any CPU.ActiveCfg = Release|Any CPU
2323
{7B0F6694-A109-4F3F-84A0-9FA49193AF31}.Release|Any CPU.Build.0 = Release|Any CPU
24-
{3AA1813C-601C-4FFF-8F7A-7070649CAF65}.Debug|Any CPU.ActiveCfg = Release|Any CPU
25-
{3AA1813C-601C-4FFF-8F7A-7070649CAF65}.Debug|Any CPU.Build.0 = Release|Any CPU
24+
{3AA1813C-601C-4FFF-8F7A-7070649CAF65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25+
{3AA1813C-601C-4FFF-8F7A-7070649CAF65}.Debug|Any CPU.Build.0 = Debug|Any CPU
2626
{3AA1813C-601C-4FFF-8F7A-7070649CAF65}.Release|Any CPU.ActiveCfg = Release|Any CPU
2727
{3AA1813C-601C-4FFF-8F7A-7070649CAF65}.Release|Any CPU.Build.0 = Release|Any CPU
2828
{3622D159-0C66-4208-89FD-8DCD782B96F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU

GeoJSON4EntityFramework/App.config

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<configSections>
4-
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
5-
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
6-
</configSections>
4+
5+
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
6+
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
77
<entityFramework>
88
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
99
<parameters>
10-
<parameter value="v11.0"/>
10+
<parameter value="v11.0" />
1111
</parameters>
1212
</defaultConnectionFactory>
1313
<providers>
14-
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
14+
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
1515
</providers>
1616
</entityFramework>
17-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
17+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup></configuration>

GeoJSON4EntityFramework/Base/GeoJsonGeometry.vb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
<JsonProperty(PropertyName:="coordinates")>
55
Public MustOverride ReadOnly Property Coordinates() As Object
66

7+
<JsonProperty(PropertyName:="bbox", Order:=5, NullValueHandling:=NullValueHandling.Ignore)>
8+
Public Property BoundingBox As Double()
9+
710
End Class

GeoJSON4EntityFramework/Base/GeoJsonGeometryEF6.vb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55

66
Public Shared Function FromDbGeometry(inp As System.Data.Entity.Spatial.DbGeometry) As GeoJsonGeometry(Of T)
77
Dim obj As GeoJsonGeometry(Of T) = CTypeDynamic(Activator.CreateInstance(Of T)(), GetType(T))
8+
9+
obj.BoundingBox = New Double(3) {
10+
inp.Envelope.PointAt(1).YCoordinate,
11+
inp.Envelope.PointAt(1).XCoordinate,
12+
inp.Envelope.PointAt(3).YCoordinate,
13+
inp.Envelope.PointAt(3).XCoordinate
14+
}
15+
816
obj.CreateFromDbGeometry(inp)
917
Return obj
1018
End Function
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
Public Interface IGeoJsonGeometry
1+
2+
Public Interface IGeoJsonGeometry
23

34
End Interface

GeoJSON4EntityFramework/Elements/Coordinate.vb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Public Class Coordinate
1+
<JsonConverter(GetType(CoordinateConverter))>
2+
Public Class Coordinate
23
Sub New()
34
MyBase.New()
45
End Sub
@@ -14,8 +15,10 @@
1415
End Get
1516
End Property
1617

18+
<JsonIgnore()>
1719
Public Property X As Double
1820

21+
<JsonIgnore()>
1922
Public Property Y As Double
2023

2124
End Class

GeoJSON4EntityFramework/Elements/Feature.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Public Property ID As String
55

66
<JsonProperty(PropertyName:="properties", Order:=3)>
7-
Public Property Properties As New Dictionary(Of String, String)
7+
Public Property Properties As New Dictionary(Of String, Object)
88

99
<JsonProperty(PropertyName:="geometry", Order:=4)>
1010
<JsonConverter(GetType(GenericListConverter(Of IGeoJsonGeometry)))>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Public Class FeatureCollection
22
Inherits GeoJsonElement(Of FeatureCollection)
33

4-
<JsonConverter(GetType(GenericListConverter(Of Feature)))>
54
<JsonProperty(PropertyName:="features")>
65
Public Property Features As New List(Of Feature)
76
End Class

GeoJSON4EntityFramework/Elements/FeatureEF6.vb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@
1010
f.Geometry.Add(Polygon.FromDbGeometry(inp))
1111
Case "Point"
1212
f.Geometry.Add(Point.FromDbGeometry(inp))
13-
Case "MultPoint"
13+
Case "MultiPoint"
1414
f.Geometry.Add(MultiPoint.FromDbGeometry(inp))
15+
Case "LineString"
16+
f.Geometry.Add(LineString.FromDbGeometry(inp))
17+
Case "MultiLineString"
18+
f.Geometry.Add(MultiLineString.FromDbGeometry(inp))
19+
Case "GeometryCollection"
20+
f.Geometry.Add(GeometryCollection.FromDbGeometry(inp))
1521
Case Else
1622
Throw New NotImplementedException
1723
End Select

0 commit comments

Comments
 (0)