Skip to content

Commit 38db706

Browse files
committed
Moved Wkb conversions to Wkb project. Referenced that project in EF.
1 parent 6210220 commit 38db706

22 files changed

Lines changed: 796 additions & 495 deletions
Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
<?xml version="1.0"?>
2-
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3-
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
4-
<id>GeoJSON.Net.Contrib.EntityFramework</id>
5-
<version>$version$</version>
6-
<authors>Alvaro Montero Gonzalez</authors>
7-
<requireLicenseAcceptance>false</requireLicenseAcceptance>
8-
<description>Provides GeoJSON.Net Converters from / to the EntityFramework Spatial types.</description>
9-
<summary>This package contains custom JSON converters to be used with the base GeoJSON.Net library to bridge from and to the EntityFramework Spatial types.</summary>
10-
<releaseNotes>first release</releaseNotes>
11-
<language>en-US</language>
12-
<copyright>Joerg Battermann and Contributors (!)</copyright>
13-
<licenseUrl>https://github.com/GeoJSON-Net/GeoJSON.Net.Contrib/blob/master/LICENSE</licenseUrl>
14-
<projectUrl>https://github.com/GeoJSON-Net/GeoJSON.Net.Contrib/blob/master/README.md</projectUrl>
15-
<dependencies>
16-
<dependency id="GeoJSON.Net" version="1.1.64" />
17-
<dependency id="EntityFramework" version="6.1.3" />
18-
<dependency id="Microsoft.SqlServer.Types" version="14.0.314.7" />
19-
</dependencies>
20-
<tags>GeoJSON JSON List EntityFramework Spatial Converters Conversion</tags>
21-
</metadata>
22-
<files>
23-
<file src="GeoJSON.Net.Contrib.EntityFramework\bin\Release\GeoJSON.Net.Contrib.EntityFramework.dll" target="lib\net452" />
24-
<file src="GeoJSON.Net.Contrib.EntityFramework\bin\Release\GeoJSON.Net.Contrib.EntityFramework.pdb" target="lib\net452" />
25-
<file src="GeoJSON.Net.Contrib.EntityFramework\bin\Release\GeoJSON.Net.Contrib.EntityFramework.xml" target="lib\net452" />
26-
</files>
27-
</package>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
3+
<metadata>
4+
<id>GeoJSON.Net.Contrib.EntityFramework</id>
5+
<version>0.1.0</version>
6+
<authors>Alvaro Montero Gonzalez</authors>
7+
<owners>Xavier Fischer</owners>
8+
<licenseUrl>https://github.com/GeoJSON-Net/GeoJSON.Net.Contrib/blob/master/LICENSE</licenseUrl>
9+
<projectUrl>https://github.com/GeoJSON-Net/GeoJSON.Net.Contrib/blob/master/README.md</projectUrl>
10+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
11+
<description>Provides GeoJSON.Net Converters from / to the EntityFramework Spatial types.</description>
12+
<summary>This package contains custom JSON converters to be used with the base GeoJSON.Net library to bridge from and to the EntityFramework Spatial types.</summary>
13+
<releaseNotes>first release</releaseNotes>
14+
<copyright>Joerg Battermann and Contributors (!)</copyright>
15+
<language>en-US</language>
16+
<tags>GeoJSON JSON List EntityFramework Spatial Converters Conversion</tags>
17+
<dependencies>
18+
<dependency id="GeoJSON.Net" version="1.1.64" />
19+
<dependency id="EntityFramework" version="6.1.3" />
20+
<dependency id="GeoJSON.Net.Contrib.Wkb" version="0.1.1" />
21+
</dependencies>
22+
</metadata>
23+
<files>
24+
<file src="GeoJSON.Net.Contrib.EntityFramework\bin\Release\GeoJSON.Net.Contrib.EntityFramework.dll" target="lib\net452\GeoJSON.Net.Contrib.EntityFramework.dll" />
25+
<file src="GeoJSON.Net.Contrib.EntityFramework\bin\Release\GeoJSON.Net.Contrib.EntityFramework.pdb" target="lib\net452\GeoJSON.Net.Contrib.EntityFramework.pdb" />
26+
<file src="GeoJSON.Net.Contrib.EntityFramework\bin\Release\GeoJSON.Net.Contrib.EntityFramework.XML" target="lib\net452\GeoJSON.Net.Contrib.EntityFramework.XML" />
27+
</files>
28+
</package>
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
using System.Data.Entity.Spatial;
2-
using GeoJSON.Net.Contrib.EntityFramework.WkbConversions;
3-
using GeoJSON.Net.Geometry;
4-
5-
namespace GeoJSON.Net.Contrib.EntityFramework
6-
{
7-
public static partial class EntityFrameworkConvert
8-
{
9-
public static DbGeography ToDbGeography(this IGeometryObject geometryObject)
10-
{
11-
DbGeography value = DbGeography.FromBinary(WkbEncode.Encode(geometryObject));
12-
return value;
13-
}
14-
}
15-
}
1+
using System.Data.Entity.Spatial;
2+
using GeoJSON.Net.Geometry;
3+
using GeoJSON.Net.Contrib.Wkb.Conversions;
4+
5+
namespace GeoJSON.Net.Contrib.EntityFramework
6+
{
7+
public static partial class EntityFrameworkConvert
8+
{
9+
public static DbGeography ToDbGeography(this IGeometryObject geometryObject)
10+
{
11+
DbGeography value = DbGeography.FromBinary(WkbEncode.Encode(geometryObject));
12+
return value;
13+
}
14+
}
15+
}

src/GeoJSON.Net.Contrib.EntityFramework/EntityFrameworkConvertToDbGeometry.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Data.Entity.Spatial;
2-
using GeoJSON.Net.Contrib.EntityFramework.WkbConversions;
32
using GeoJSON.Net.Geometry;
4-
3+
using GeoJSON.Net.Contrib.Wkb.Conversions;
4+
55
namespace GeoJSON.Net.Contrib.EntityFramework
66
{
77
public static partial class EntityFrameworkConvert

src/GeoJSON.Net.Contrib.EntityFramework/EntityFrameworkConvertToGeoJsonGeometry.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Data.Entity.Spatial;
2-
using GeoJSON.Net.Contrib.EntityFramework.WkbConversions;
32
using GeoJSON.Net.Geometry;
4-
3+
using GeoJSON.Net.Contrib.Wkb.Conversions;
4+
55
namespace GeoJSON.Net.Contrib.EntityFramework
66
{
77
public static partial class EntityFrameworkConvert

src/GeoJSON.Net.Contrib.EntityFramework/EntityFrameworkConvertToGeoJsonObject.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Data.Entity.Spatial;
2-
using GeoJSON.Net.Contrib.EntityFramework.WkbConversions;
32
using GeoJSON.Net.Geometry;
43

54
namespace GeoJSON.Net.Contrib.EntityFramework

src/GeoJSON.Net.Contrib.EntityFramework/GeoJSON.Net.Contrib.EntityFramework.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
<None Include="packages.config" />
7070
</ItemGroup>
7171
<ItemGroup>
72-
<ProjectReference Include="..\GeoJSON.NetContrib.WkbConversions\GeoJSON.NetContrib.WkbConversions.csproj">
73-
<Project>{7906a2f8-ab3d-426e-8d85-844c6dc18f22}</Project>
74-
<Name>GeoJSON.NetContrib.WkbConversions</Name>
72+
<ProjectReference Include="..\GeoJSON.Net.Contrib.Wkb\GeoJSON.Net.Contrib.Wkb.csproj">
73+
<Project>{0696939c-5167-46df-8200-a7fccd5a9a08}</Project>
74+
<Name>GeoJSON.Net.Contrib.Wkb</Name>
7575
</ProjectReference>
7676
</ItemGroup>
7777
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
File renamed without changes.
File renamed without changes.

src/GeoJSON.NetContrib.WkbConversions/WkbGeometryType.cs renamed to src/GeoJSON.Net.Contrib.Wkb/Conversions/WkbGeometryType.cs

File renamed without changes.

src/GeoJSON.Net.Contrib.Wkb/GeoJSON.Net.Contrib.Wkb.csproj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,9 @@
5353
<Compile Include="WkbConverterToGeoJsonObject.cs" />
5454
<Compile Include="WkbConverterToGeoJsonGeometry.cs" />
5555
<Compile Include="Properties\AssemblyInfo.cs" />
56-
</ItemGroup>
57-
<ItemGroup>
58-
<ProjectReference Include="..\GeoJSON.NetContrib.WkbConversions\GeoJSON.NetContrib.WkbConversions.csproj">
59-
<Project>{7906a2f8-ab3d-426e-8d85-844c6dc18f22}</Project>
60-
<Name>GeoJSON.NetContrib.WkbConversions</Name>
61-
</ProjectReference>
56+
<Compile Include="WkbDecode.cs" />
57+
<Compile Include="WkbEncode.cs" />
58+
<Compile Include="WkbGeometryType.cs" />
6259
</ItemGroup>
6360
<ItemGroup>
6461
<None Include="packages.config" />

0 commit comments

Comments
 (0)