mirror of
https://github.com/bvanroll/cs-map-project.git
synced 2025-08-29 20:02:43 +00:00
nog rare dinge, ma tga beter of normaal
This commit is contained in:
@@ -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" />
|
||||
|
@@ -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.
@@ -1 +1 @@
|
||||
cccc5c33f424954ac02c95e1ddf7440a0c61da70
|
||||
19911095ba0015434cd13d58c152e22fd47e8005
|
||||
|
@@ -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.
Binary file not shown.
Reference in New Issue
Block a user