nog rare dinge, ma tga beter of normaal

This commit is contained in:
BuildTools
2020-07-29 17:31:07 +02:00
parent 824860dc58
commit 9f1da145a0
56 changed files with 289 additions and 47 deletions

View File

@@ -31,6 +31,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="GeoJSON.Net, Version=1.2.16.0, Culture=neutral, PublicKeyToken=42c00ea87f5f14d4">
<HintPath>..\packages\GeoJSON.Net.1.2.20-rc\lib\net45\GeoJSON.Net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />

View File

@@ -42,7 +42,7 @@ namespace Logica
return TriangulatePolygon(polygon);
}
private PolygonPunten ScalePolygon(PolygonPunten polygon, double scaleX, double scaleY)
public PolygonPunten ScalePolygon(PolygonPunten polygon, double scaleX, double scaleY)
{
double maxX = polygon.MaximumX;
double maxY = polygon.MaximumY;
@@ -65,6 +65,35 @@ namespace Logica
return new PolygonPunten(returnWaarde, polygon.Naam);
}
public MultiPolygonPunten ScaleMultiPolygon(MultiPolygonPunten multiPolygon, double scaleX, double scaleY)
{
double maxX = multiPolygon.MaximumX;
double maxY = multiPolygon.MaximumY;
double minX = multiPolygon.MinimumX;
double minY = multiPolygon.MinimumY;
maxX -= minX;
maxY -= minY;
List<PolygonPunten> pp = new List<PolygonPunten>();
foreach (PolygonPunten polygon in multiPolygon.PolygonPunten)
{
List<Punt> returnWaarde = new List<Punt>();
foreach (Punt punt in polygon.Punten)
{
double x = punt.X - minX;
x /= maxX;
x *= scaleX;
double y = punt.Y - minY;
y /= maxY;
y *= scaleY;
returnWaarde.Add(new Punt(x, y, punt.Naam));
}
pp.Add(new PolygonPunten(returnWaarde, polygon.Naam));
}
return new MultiPolygonPunten(pp, multiPolygon.Naam);
}
public List<PolygonPunten> GetAllPolygons()
{
List<PolygonPunten> lijst = new List<PolygonPunten>();

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
cccc5c33f424954ac02c95e1ddf7440a0c61da70
19911095ba0015434cd13d58c152e22fd47e8005

View File

@@ -1,2 +1,14 @@
C:\Users\Beppe\source\repos\opdracht2\Logica\obj\Debug\Logica.csprojAssemblyReference.cache
C:\Users\Beppe\source\repos\opdracht2\Logica\obj\Debug\Logica.csproj.CoreCompileInputs.cache
C:\Users\Beppe\source\repos\opdracht2\Logica\bin\Debug\Logica.dll
C:\Users\Beppe\source\repos\opdracht2\Logica\bin\Debug\Logica.pdb
C:\Users\Beppe\source\repos\opdracht2\Logica\bin\Debug\Datalaag.dll
C:\Users\Beppe\source\repos\opdracht2\Logica\bin\Debug\GeoJSON.Net.dll
C:\Users\Beppe\source\repos\opdracht2\Logica\bin\Debug\Globals.dll
C:\Users\Beppe\source\repos\opdracht2\Logica\bin\Debug\Newtonsoft.Json.dll
C:\Users\Beppe\source\repos\opdracht2\Logica\bin\Debug\Datalaag.pdb
C:\Users\Beppe\source\repos\opdracht2\Logica\bin\Debug\Globals.pdb
C:\Users\Beppe\source\repos\opdracht2\Logica\bin\Debug\Newtonsoft.Json.xml
C:\Users\Beppe\source\repos\opdracht2\Logica\obj\Debug\Logica.csproj.CopyComplete
C:\Users\Beppe\source\repos\opdracht2\Logica\obj\Debug\Logica.dll
C:\Users\Beppe\source\repos\opdracht2\Logica\obj\Debug\Logica.pdb

Binary file not shown.

Binary file not shown.