diff --git a/Datalaag/Datalaag.csproj b/Datalaag/Datalaag.csproj
new file mode 100644
index 0000000..291f776
--- /dev/null
+++ b/Datalaag/Datalaag.csproj
@@ -0,0 +1,12 @@
+
+
+
+ netcoreapp3.1
+
+
+
+
+
+
+
+
diff --git a/Datalaag/JsonReader.cs b/Datalaag/JsonReader.cs
new file mode 100644
index 0000000..6633890
--- /dev/null
+++ b/Datalaag/JsonReader.cs
@@ -0,0 +1,40 @@
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
+using System.Text;
+using GeoJSON.Net.Geometry;
+using Newtonsoft.Json;
+
+
+namespace Datalaag
+{
+ public class JsonReader
+ {
+ public List _polygons;
+ public List _multiPolygons;
+ public JsonReader(string path)
+ {
+ _polygons = new List();
+ _multiPolygons = new List();
+ foreach (JObject feature in JObject.Parse(File.ReadAllText(path))["features"])
+ {
+ switch (feature["geometry"]["type"].ToString())
+ {
+ case "MultiPolygon":
+ _polygons.Add(new PolygonPunten(JsonConvert.DeserializeObject(feature["geometry"]
+ .ToString()), feature["properties"]["name"].ToString()));
+ break;
+ case "Polygon":
+ _multiPolygons.Add(new MultiPolygonPunten(JsonConvert.DeserializeObject
+ (feature["geometry"].ToString()), feature["properties"]["name"].ToString()));
+ break;
+ }
+ }
+ }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/Datalaag/bin/Debug/netcoreapp3.1/Datalaag.deps.json b/Datalaag/bin/Debug/netcoreapp3.1/Datalaag.deps.json
new file mode 100644
index 0000000..85029df
--- /dev/null
+++ b/Datalaag/bin/Debug/netcoreapp3.1/Datalaag.deps.json
@@ -0,0 +1,23 @@
+{
+ "runtimeTarget": {
+ "name": ".NETCoreApp,Version=v3.1",
+ "signature": ""
+ },
+ "compilationOptions": {},
+ "targets": {
+ ".NETCoreApp,Version=v3.1": {
+ "Datalaag/1.0.0": {
+ "runtime": {
+ "Datalaag.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "Datalaag/1.0.0": {
+ "type": "project",
+ "serviceable": false,
+ "sha512": ""
+ }
+ }
+}
\ No newline at end of file
diff --git a/Datalaag/obj/Datalaag.csproj.nuget.dgspec.json b/Datalaag/obj/Datalaag.csproj.nuget.dgspec.json
new file mode 100644
index 0000000..a4a8754
--- /dev/null
+++ b/Datalaag/obj/Datalaag.csproj.nuget.dgspec.json
@@ -0,0 +1,70 @@
+{
+ "format": 1,
+ "restore": {
+ "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {}
+ },
+ "projects": {
+ "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
+ "projectName": "Datalaag",
+ "projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
+ "packagesPath": "C:\\Users\\Beppe\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\obj\\",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "C:\\Users\\Beppe\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "netcoreapp3.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "dependencies": {
+ "GeoJSON.Net": {
+ "target": "Package",
+ "version": "[1.2.19, )"
+ },
+ "Newtonsoft.Json": {
+ "target": "Package",
+ "version": "[12.0.3, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.302\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Datalaag/obj/Datalaag.csproj.nuget.g.props b/Datalaag/obj/Datalaag.csproj.nuget.g.props
new file mode 100644
index 0000000..3151d21
--- /dev/null
+++ b/Datalaag/obj/Datalaag.csproj.nuget.g.props
@@ -0,0 +1,15 @@
+
+
+
+ True
+ NuGet
+ $(MSBuildThisFileDirectory)project.assets.json
+ $(UserProfile)\.nuget\packages\
+ C:\Users\Beppe\.nuget\packages\
+ PackageReference
+ 5.5.0
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+
+
\ No newline at end of file
diff --git a/Datalaag/obj/Datalaag.csproj.nuget.g.targets b/Datalaag/obj/Datalaag.csproj.nuget.g.targets
new file mode 100644
index 0000000..53cfaa1
--- /dev/null
+++ b/Datalaag/obj/Datalaag.csproj.nuget.g.targets
@@ -0,0 +1,6 @@
+
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+
+
\ No newline at end of file
diff --git a/Datalaag/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs b/Datalaag/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
new file mode 100644
index 0000000..ad8dfe1
--- /dev/null
+++ b/Datalaag/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
diff --git a/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.AssemblyInfo.cs b/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.AssemblyInfo.cs
new file mode 100644
index 0000000..ef8890a
--- /dev/null
+++ b/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.AssemblyInfo.cs
@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("Datalaag")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
+[assembly: System.Reflection.AssemblyProductAttribute("Datalaag")]
+[assembly: System.Reflection.AssemblyTitleAttribute("Datalaag")]
+[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+
+// Generated by the MSBuild WriteCodeFragment class.
+
diff --git a/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.AssemblyInfoInputs.cache b/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.AssemblyInfoInputs.cache
new file mode 100644
index 0000000..4fd8cab
--- /dev/null
+++ b/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.AssemblyInfoInputs.cache
@@ -0,0 +1 @@
+4eb3636ff46def5b52e701646fabc9893067cd02
diff --git a/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.assets.cache b/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.assets.cache
new file mode 100644
index 0000000..014208c
Binary files /dev/null and b/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.assets.cache differ
diff --git a/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.csproj.FileListAbsolute.txt b/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000..347c2db
--- /dev/null
+++ b/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.csproj.FileListAbsolute.txt
@@ -0,0 +1,5 @@
+C:\Users\Beppe\source\repos\opdracht2\Datalaag\bin\Debug\netcoreapp3.1\Datalaag.deps.json
+C:\Users\Beppe\source\repos\opdracht2\Datalaag\bin\Debug\netcoreapp3.1\Datalaag.dll
+C:\Users\Beppe\source\repos\opdracht2\Datalaag\obj\Debug\netcoreapp3.1\Datalaag.csprojAssemblyReference.cache
+C:\Users\Beppe\source\repos\opdracht2\Datalaag\obj\Debug\netcoreapp3.1\Datalaag.AssemblyInfoInputs.cache
+C:\Users\Beppe\source\repos\opdracht2\Datalaag\obj\Debug\netcoreapp3.1\Datalaag.AssemblyInfo.cs
diff --git a/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.csprojAssemblyReference.cache b/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.csprojAssemblyReference.cache
new file mode 100644
index 0000000..f2dca2f
Binary files /dev/null and b/Datalaag/obj/Debug/netcoreapp3.1/Datalaag.csprojAssemblyReference.cache differ
diff --git a/Datalaag/obj/project.assets.json b/Datalaag/obj/project.assets.json
new file mode 100644
index 0000000..5e25673
--- /dev/null
+++ b/Datalaag/obj/project.assets.json
@@ -0,0 +1,150 @@
+{
+ "version": 3,
+ "targets": {
+ ".NETCoreApp,Version=v3.1": {
+ "GeoJSON.Net/1.2.19": {
+ "type": "package",
+ "dependencies": {
+ "Newtonsoft.Json": "10.0.2"
+ },
+ "compile": {
+ "lib/netstandard2.1/GeoJSON.Net.dll": {}
+ },
+ "runtime": {
+ "lib/netstandard2.1/GeoJSON.Net.dll": {}
+ }
+ },
+ "Newtonsoft.Json/12.0.3": {
+ "type": "package",
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {}
+ },
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "GeoJSON.Net/1.2.19": {
+ "sha512": "b1sIWezvF7a4dBz6d0nQfbwJEWFeRjJ6Mri+Hm/FJ1OIEksekiY1X+CgPG/7E3NcHKz3+3RnbX3VAhx03GG21w==",
+ "type": "package",
+ "path": "geojson.net/1.2.19",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "geojson.net.1.2.19.nupkg.sha512",
+ "geojson.net.nuspec",
+ "lib/net35/GeoJSON.Net.dll",
+ "lib/net40/GeoJSON.Net.dll",
+ "lib/net45/GeoJSON.Net.dll",
+ "lib/netstandard1.0/GeoJSON.Net.dll",
+ "lib/netstandard1.1/GeoJSON.Net.dll",
+ "lib/netstandard2.0/GeoJSON.Net.dll",
+ "lib/netstandard2.1/GeoJSON.Net.dll"
+ ]
+ },
+ "Newtonsoft.Json/12.0.3": {
+ "sha512": "6mgjfnRB4jKMlzHSl+VD+oUc1IebOZabkbyWj2RiTgWwYPPuaK1H97G1sHqGwPlS5npiF5Q0OrxN1wni2n5QWg==",
+ "type": "package",
+ "path": "newtonsoft.json/12.0.3",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "LICENSE.md",
+ "lib/net20/Newtonsoft.Json.dll",
+ "lib/net20/Newtonsoft.Json.xml",
+ "lib/net35/Newtonsoft.Json.dll",
+ "lib/net35/Newtonsoft.Json.xml",
+ "lib/net40/Newtonsoft.Json.dll",
+ "lib/net40/Newtonsoft.Json.xml",
+ "lib/net45/Newtonsoft.Json.dll",
+ "lib/net45/Newtonsoft.Json.xml",
+ "lib/netstandard1.0/Newtonsoft.Json.dll",
+ "lib/netstandard1.0/Newtonsoft.Json.xml",
+ "lib/netstandard1.3/Newtonsoft.Json.dll",
+ "lib/netstandard1.3/Newtonsoft.Json.xml",
+ "lib/netstandard2.0/Newtonsoft.Json.dll",
+ "lib/netstandard2.0/Newtonsoft.Json.xml",
+ "lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll",
+ "lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml",
+ "lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll",
+ "lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml",
+ "newtonsoft.json.12.0.3.nupkg.sha512",
+ "newtonsoft.json.nuspec",
+ "packageIcon.png"
+ ]
+ }
+ },
+ "projectFileDependencyGroups": {
+ ".NETCoreApp,Version=v3.1": [
+ "GeoJSON.Net >= 1.2.19",
+ "Newtonsoft.Json >= 12.0.3"
+ ]
+ },
+ "packageFolders": {
+ "C:\\Users\\Beppe\\.nuget\\packages\\": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
+ "projectName": "Datalaag",
+ "projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
+ "packagesPath": "C:\\Users\\Beppe\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\obj\\",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "C:\\Users\\Beppe\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "netcoreapp3.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "dependencies": {
+ "GeoJSON.Net": {
+ "target": "Package",
+ "version": "[1.2.19, )"
+ },
+ "Newtonsoft.Json": {
+ "target": "Package",
+ "version": "[12.0.3, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.302\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Datalaag/obj/project.nuget.cache b/Datalaag/obj/project.nuget.cache
new file mode 100644
index 0000000..82df3f6
--- /dev/null
+++ b/Datalaag/obj/project.nuget.cache
@@ -0,0 +1,11 @@
+{
+ "version": 2,
+ "dgSpecHash": "vmw2sWM3we/HBXnNGRXWz0s694rjQwC3pE16toYVSE6mWRTpo3/Dmldhr2pN+hLG/clnqOj9soWfad987by8wg==",
+ "success": true,
+ "projectFilePath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
+ "expectedPackageFiles": [
+ "C:\\Users\\Beppe\\.nuget\\packages\\geojson.net\\1.2.19\\geojson.net.1.2.19.nupkg.sha512",
+ "C:\\Users\\Beppe\\.nuget\\packages\\newtonsoft.json\\12.0.3\\newtonsoft.json.12.0.3.nupkg.sha512"
+ ],
+ "logs": []
+}
\ No newline at end of file
diff --git a/Datalaag/obj/project.packagespec.json b/Datalaag/obj/project.packagespec.json
new file mode 100644
index 0000000..0240a3d
--- /dev/null
+++ b/Datalaag/obj/project.packagespec.json
@@ -0,0 +1,57 @@
+{
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
+ "projectName": "Datalaag",
+ "projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
+ "outputPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\obj\\",
+ "projectStyle": "PackageReference",
+ "originalTargetFrameworks": [
+ "netcoreapp3.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "dependencies": {
+ "GeoJSON.Net": {
+ "target": "Package",
+ "version": "[1.2.19, )"
+ },
+ "Newtonsoft.Json": {
+ "target": "Package",
+ "version": "[12.0.3, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.302\\RuntimeIdentifierGraph.json"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Logica/Logica.csproj b/Logica/Logica.csproj
new file mode 100644
index 0000000..3242ed6
--- /dev/null
+++ b/Logica/Logica.csproj
@@ -0,0 +1,20 @@
+
+
+
+ netcoreapp3.1
+
+
+
+
+ d37e2a3e-8545-3a39-9f4f-31827c9124ab
+ 2
+ 4
+ tlbimp
+
+
+
+
+
+
+
+
diff --git a/Logica/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs b/Logica/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
new file mode 100644
index 0000000..ad8dfe1
--- /dev/null
+++ b/Logica/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
diff --git a/Logica/obj/Debug/netcoreapp3.1/Logica.AssemblyInfo.cs b/Logica/obj/Debug/netcoreapp3.1/Logica.AssemblyInfo.cs
new file mode 100644
index 0000000..9619f93
--- /dev/null
+++ b/Logica/obj/Debug/netcoreapp3.1/Logica.AssemblyInfo.cs
@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+
+[assembly: System.Reflection.AssemblyCompanyAttribute("Logica")]
+[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
+[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
+[assembly: System.Reflection.AssemblyProductAttribute("Logica")]
+[assembly: System.Reflection.AssemblyTitleAttribute("Logica")]
+[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
+
+// Generated by the MSBuild WriteCodeFragment class.
+
diff --git a/Logica/obj/Debug/netcoreapp3.1/Logica.AssemblyInfoInputs.cache b/Logica/obj/Debug/netcoreapp3.1/Logica.AssemblyInfoInputs.cache
new file mode 100644
index 0000000..e815204
--- /dev/null
+++ b/Logica/obj/Debug/netcoreapp3.1/Logica.AssemblyInfoInputs.cache
@@ -0,0 +1 @@
+559139bcad75bc699883210d21815f3a7b66c208
diff --git a/Logica/obj/Debug/netcoreapp3.1/Logica.assets.cache b/Logica/obj/Debug/netcoreapp3.1/Logica.assets.cache
new file mode 100644
index 0000000..567b496
Binary files /dev/null and b/Logica/obj/Debug/netcoreapp3.1/Logica.assets.cache differ
diff --git a/Logica/obj/Debug/netcoreapp3.1/Logica.csprojAssemblyReference.cache b/Logica/obj/Debug/netcoreapp3.1/Logica.csprojAssemblyReference.cache
new file mode 100644
index 0000000..2843456
Binary files /dev/null and b/Logica/obj/Debug/netcoreapp3.1/Logica.csprojAssemblyReference.cache differ
diff --git a/Logica/obj/Logica.csproj.nuget.dgspec.json b/Logica/obj/Logica.csproj.nuget.dgspec.json
new file mode 100644
index 0000000..f5dd7af
--- /dev/null
+++ b/Logica/obj/Logica.csproj.nuget.dgspec.json
@@ -0,0 +1,126 @@
+{
+ "format": 1,
+ "restore": {
+ "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj": {}
+ },
+ "projects": {
+ "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
+ "projectName": "Datalaag",
+ "projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
+ "packagesPath": "C:\\Users\\Beppe\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\obj\\",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "C:\\Users\\Beppe\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "netcoreapp3.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "projectReferences": {}
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "dependencies": {
+ "GeoJSON.Net": {
+ "target": "Package",
+ "version": "[1.2.19, )"
+ },
+ "Newtonsoft.Json": {
+ "target": "Package",
+ "version": "[12.0.3, )"
+ }
+ },
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.302\\RuntimeIdentifierGraph.json"
+ }
+ }
+ },
+ "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj",
+ "projectName": "Logica",
+ "projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj",
+ "packagesPath": "C:\\Users\\Beppe\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\obj\\",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "C:\\Users\\Beppe\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "netcoreapp3.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "projectReferences": {
+ "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {
+ "projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj"
+ }
+ }
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.302\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Logica/obj/Logica.csproj.nuget.g.props b/Logica/obj/Logica.csproj.nuget.g.props
new file mode 100644
index 0000000..3151d21
--- /dev/null
+++ b/Logica/obj/Logica.csproj.nuget.g.props
@@ -0,0 +1,15 @@
+
+
+
+ True
+ NuGet
+ $(MSBuildThisFileDirectory)project.assets.json
+ $(UserProfile)\.nuget\packages\
+ C:\Users\Beppe\.nuget\packages\
+ PackageReference
+ 5.5.0
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+
+
\ No newline at end of file
diff --git a/Logica/obj/Logica.csproj.nuget.g.targets b/Logica/obj/Logica.csproj.nuget.g.targets
new file mode 100644
index 0000000..53cfaa1
--- /dev/null
+++ b/Logica/obj/Logica.csproj.nuget.g.targets
@@ -0,0 +1,6 @@
+
+
+
+ $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+
+
\ No newline at end of file
diff --git a/Logica/obj/project.assets.json b/Logica/obj/project.assets.json
new file mode 100644
index 0000000..a10fc87
--- /dev/null
+++ b/Logica/obj/project.assets.json
@@ -0,0 +1,162 @@
+{
+ "version": 3,
+ "targets": {
+ ".NETCoreApp,Version=v3.1": {
+ "GeoJSON.Net/1.2.19": {
+ "type": "package",
+ "dependencies": {
+ "Newtonsoft.Json": "10.0.2"
+ },
+ "compile": {
+ "lib/netstandard2.1/GeoJSON.Net.dll": {}
+ },
+ "runtime": {
+ "lib/netstandard2.1/GeoJSON.Net.dll": {}
+ }
+ },
+ "Newtonsoft.Json/12.0.3": {
+ "type": "package",
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {}
+ },
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {}
+ }
+ },
+ "Datalaag/1.0.0": {
+ "type": "project",
+ "framework": ".NETCoreApp,Version=v3.1",
+ "dependencies": {
+ "GeoJSON.Net": "1.2.19",
+ "Newtonsoft.Json": "12.0.3"
+ },
+ "compile": {
+ "bin/placeholder/Datalaag.dll": {}
+ },
+ "runtime": {
+ "bin/placeholder/Datalaag.dll": {}
+ }
+ }
+ }
+ },
+ "libraries": {
+ "GeoJSON.Net/1.2.19": {
+ "sha512": "b1sIWezvF7a4dBz6d0nQfbwJEWFeRjJ6Mri+Hm/FJ1OIEksekiY1X+CgPG/7E3NcHKz3+3RnbX3VAhx03GG21w==",
+ "type": "package",
+ "path": "geojson.net/1.2.19",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "geojson.net.1.2.19.nupkg.sha512",
+ "geojson.net.nuspec",
+ "lib/net35/GeoJSON.Net.dll",
+ "lib/net40/GeoJSON.Net.dll",
+ "lib/net45/GeoJSON.Net.dll",
+ "lib/netstandard1.0/GeoJSON.Net.dll",
+ "lib/netstandard1.1/GeoJSON.Net.dll",
+ "lib/netstandard2.0/GeoJSON.Net.dll",
+ "lib/netstandard2.1/GeoJSON.Net.dll"
+ ]
+ },
+ "Newtonsoft.Json/12.0.3": {
+ "sha512": "6mgjfnRB4jKMlzHSl+VD+oUc1IebOZabkbyWj2RiTgWwYPPuaK1H97G1sHqGwPlS5npiF5Q0OrxN1wni2n5QWg==",
+ "type": "package",
+ "path": "newtonsoft.json/12.0.3",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "LICENSE.md",
+ "lib/net20/Newtonsoft.Json.dll",
+ "lib/net20/Newtonsoft.Json.xml",
+ "lib/net35/Newtonsoft.Json.dll",
+ "lib/net35/Newtonsoft.Json.xml",
+ "lib/net40/Newtonsoft.Json.dll",
+ "lib/net40/Newtonsoft.Json.xml",
+ "lib/net45/Newtonsoft.Json.dll",
+ "lib/net45/Newtonsoft.Json.xml",
+ "lib/netstandard1.0/Newtonsoft.Json.dll",
+ "lib/netstandard1.0/Newtonsoft.Json.xml",
+ "lib/netstandard1.3/Newtonsoft.Json.dll",
+ "lib/netstandard1.3/Newtonsoft.Json.xml",
+ "lib/netstandard2.0/Newtonsoft.Json.dll",
+ "lib/netstandard2.0/Newtonsoft.Json.xml",
+ "lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll",
+ "lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml",
+ "lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll",
+ "lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml",
+ "newtonsoft.json.12.0.3.nupkg.sha512",
+ "newtonsoft.json.nuspec",
+ "packageIcon.png"
+ ]
+ },
+ "Datalaag/1.0.0": {
+ "type": "project",
+ "path": "../Datalaag/Datalaag.csproj",
+ "msbuildProject": "../Datalaag/Datalaag.csproj"
+ }
+ },
+ "projectFileDependencyGroups": {
+ ".NETCoreApp,Version=v3.1": [
+ "Datalaag >= 1.0.0"
+ ]
+ },
+ "packageFolders": {
+ "C:\\Users\\Beppe\\.nuget\\packages\\": {}
+ },
+ "project": {
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj",
+ "projectName": "Logica",
+ "projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj",
+ "packagesPath": "C:\\Users\\Beppe\\.nuget\\packages\\",
+ "outputPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\obj\\",
+ "projectStyle": "PackageReference",
+ "configFilePaths": [
+ "C:\\Users\\Beppe\\AppData\\Roaming\\NuGet\\NuGet.Config",
+ "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
+ ],
+ "originalTargetFrameworks": [
+ "netcoreapp3.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "projectReferences": {
+ "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {
+ "projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj"
+ }
+ }
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.302\\RuntimeIdentifierGraph.json"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Logica/obj/project.nuget.cache b/Logica/obj/project.nuget.cache
new file mode 100644
index 0000000..cc31619
--- /dev/null
+++ b/Logica/obj/project.nuget.cache
@@ -0,0 +1,11 @@
+{
+ "version": 2,
+ "dgSpecHash": "DkYRZH0wz5GvI2ijvz+sgOT16efYptv7grKHSqTr/pe3P5xaJovOtDwwUbm+RZKSgm6Hz7X/vIr5shpuBp7gjA==",
+ "success": true,
+ "projectFilePath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj",
+ "expectedPackageFiles": [
+ "C:\\Users\\Beppe\\.nuget\\packages\\geojson.net\\1.2.19\\geojson.net.1.2.19.nupkg.sha512",
+ "C:\\Users\\Beppe\\.nuget\\packages\\newtonsoft.json\\12.0.3\\newtonsoft.json.12.0.3.nupkg.sha512"
+ ],
+ "logs": []
+}
\ No newline at end of file
diff --git a/Logica/obj/project.packagespec.json b/Logica/obj/project.packagespec.json
new file mode 100644
index 0000000..f3174d3
--- /dev/null
+++ b/Logica/obj/project.packagespec.json
@@ -0,0 +1,51 @@
+{
+ "version": "1.0.0",
+ "restore": {
+ "projectUniqueName": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj",
+ "projectName": "Logica",
+ "projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj",
+ "outputPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\obj\\",
+ "projectStyle": "PackageReference",
+ "originalTargetFrameworks": [
+ "netcoreapp3.1"
+ ],
+ "sources": {
+ "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
+ "https://api.nuget.org/v3/index.json": {}
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "projectReferences": {
+ "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {
+ "projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj"
+ }
+ }
+ }
+ },
+ "warningProperties": {
+ "warnAsError": [
+ "NU1605"
+ ]
+ }
+ },
+ "frameworks": {
+ "netcoreapp3.1": {
+ "imports": [
+ "net461",
+ "net462",
+ "net47",
+ "net471",
+ "net472",
+ "net48"
+ ],
+ "assetTargetFallback": true,
+ "warn": true,
+ "frameworkReferences": {
+ "Microsoft.NETCore.App": {
+ "privateAssets": "all"
+ }
+ },
+ "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.302\\RuntimeIdentifierGraph.json"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Logica/polygonManipulatie.cs b/Logica/polygonManipulatie.cs
new file mode 100644
index 0000000..6108e1f
--- /dev/null
+++ b/Logica/polygonManipulatie.cs
@@ -0,0 +1,154 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Text;
+using Datalaag;
+
+namespace Logica
+{
+ public class PolygonManipulatie
+ {
+ public JsonReader JsonReader;
+ public PolygonManipulatie(JsonReader jsonReader)
+ {
+ JsonReader = jsonReader;
+ }
+
+ public List getPolygons()
+ {
+ return JsonReader._polygons;
+ }
+
+ public List getMultiPolygons()
+ {
+ return JsonReader._multiPolygons;
+ }
+
+ public List getAllPolygons()
+ {
+ List lijst = new List();
+ lijst.AddRange(getPolygons());
+ foreach (MultiPolygonPunten multiPolygonPunten in getMultiPolygons())
+ {
+ lijst.AddRange(multiPolygonPunten.PolygonPunten);
+ }
+ return lijst;
+ }
+
+ public List triangulatePolygon(List punten)
+ {
+ List returnWaarde = new List();
+ int i = 0;
+ int BACKUP = 0;
+ int BACKBACKUP = punten.Count;
+ while (true)
+ {
+
+ if (i >= punten.Count)
+ {
+ i = 0;
+ if (punten.Count == BACKBACKUP)
+ {
+ BACKUP++;
+ }
+
+ BACKBACKUP = punten.Count;
+ }
+
+ int punt1Index = i;
+ int punt2Index = i + 1;
+ if (punt2Index >= punten.Count) punt2Index -= punten.Count;
+ int punt3Index = i + 2;
+ if (punt3Index >= punten.Count) punt3Index -= punten.Count;
+
+ if (punten.Count < 3)
+ {
+ break;
+ }
+ double hoek = VindHoek(punten[punt2Index], punten[punt1Index], punten[punt3Index]);
+ if (hoek < 180)
+ {
+ returnWaarde.Add(MaakNieuweDriehoek(punten[punt2Index], punten[punt3Index],
+ punten[punt1Index]));
+ punten.RemoveAt(punt2Index);
+ Debug.WriteLine("added a triangle, polygonLijst count " + punten.Count);
+ i = punt1Index;
+ BACKUP = 0;
+ continue;
+
+
+ }
+ Debug.WriteLine(hoek);
+
+
+
+
+ i++;
+ if (BACKUP >= punten.Count)
+ {
+ Debug.WriteLine("FUCK, couldnt parse " + punten.Count + " points");
+ break;
+ }
+ }
+
+ return returnWaarde;
+ }
+
+ private PolygonPunten MaakNieuweDriehoek(Punt punt, Punt punt1, Punt punt2, string naam = "")
+ {
+ return new PolygonPunten(new List(){punt, punt1, punt2}, naam);
+ }
+
+ private double VindHoek(Punt p1, Punt p2, Punt p3)
+ {
+ double hoek = (Math.Atan2(p3.Y - p1.Y, p3.X - p1.X) - Math.Atan2(p2.Y - p1.Y, p2.X - p1.X)) * (180 / Math.PI);
+ if (hoek < 0)
+ {
+ hoek += 360;
+ }
+ return hoek;
+ }
+
+ private List peuker(List punten, double epsilon)
+ {
+ double dmax = -1;
+ int index = 0;
+ int end = punten.Count;
+
+ for (int i = 1; i < end-1; i++)
+ {
+ double distance = PerpendicularDistance2(punten[i], punten[0], punten[end-1]);
+ if (distance > dmax)
+ {
+ index = i;
+ dmax = distance;
+ }
+ }
+
+
+ List returnWaarde = new List();
+
+ if (dmax > epsilon)
+ {
+ List recResults1 = peuker(punten.GetRange(0, index), epsilon);
+ List recResults2 = peuker(punten.GetRange(index, end-1-index), epsilon);
+
+
+ returnWaarde.AddRange(recResults1);
+ returnWaarde.AddRange(recResults2);
+ }
+ else
+ {
+ returnWaarde = new List() { punten[0], punten[punten.Count-1] };
+ }
+
+ return returnWaarde;
+ }
+
+ private double PerpendicularDistance2(Punt point, Punt l1, Punt l2)
+ {
+ return Math.Abs((l2.X - l1.X) * (l1.Y - point.Y) - (l1.X - point.X) * (l2.Y - l1.Y)) /
+ Math.Sqrt(Math.Pow(l2.X - l1.X, 2) + Math.Pow(l2.Y - l1.Y, 2));
+ }
+ }
+}
diff --git a/opdracht2.sln.DotSettings.user b/opdracht2.sln.DotSettings.user
new file mode 100644
index 0000000..c8f4b96
--- /dev/null
+++ b/opdracht2.sln.DotSettings.user
@@ -0,0 +1,4 @@
+
+ <AssemblyExplorer>
+ <Assembly Path="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Windows.dll" />
+</AssemblyExplorer>
\ No newline at end of file