Skip to content
This repository was archived by the owner on Dec 3, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed Assemblies/GeoUtility.dll
Binary file not shown.
622 changes: 0 additions & 622 deletions Assemblies/License.txt

This file was deleted.

5 changes: 2 additions & 3 deletions Parsers/Library/FEZMuenchenLandParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
using System.Linq;
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;
using System.Text.RegularExpressions;
using AlarmWorkflow.Parser.Library.util;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -151,8 +151,7 @@ Operation IParser.Parse(string[] lines)
var matches = r.Matches(coords);
if (matches.Count == 2)
{
GaussKrueger gauss = new GaussKrueger(Convert.ToDouble(matches[0].Value), Convert.ToDouble(matches[1].Value));
Geographic geo = (Geographic)gauss;
var geo = GeographicCoords.FromGaussKrueger(Convert.ToDouble(matches[0].Value), Convert.ToDouble(matches[1].Value));
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
}
Expand Down
9 changes: 4 additions & 5 deletions Parsers/Library/ILSAugsburgParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
using System;
using System.Globalization;
using System.Text.RegularExpressions;
using AlarmWorkflow.Parser.Library.util;
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -209,10 +209,9 @@ Operation IParser.Parse(string[] lines)
if (matches.Count == 2)
{
NumberFormatInfo nfi = new NumberFormatInfo { NumberDecimalSeparator = "." };
double rechts = Convert.ToDouble(matches[0].Value, nfi);
double hoch = Convert.ToDouble(matches[1].Value, nfi);
GaussKrueger gauss = new GaussKrueger(rechts, hoch);
Geographic geo = (Geographic)gauss;
double geoRechts = Convert.ToDouble(matches[0].Value, nfi);
double geoHoch = Convert.ToDouble(matches[1].Value, nfi);
var geo = GeographicCoords.FromGaussKrueger(geoRechts, geoHoch);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
}
Expand Down
10 changes: 4 additions & 6 deletions Parsers/Library/ILSFFBParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
using System.Linq;
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;
using System.Globalization;
using AlarmWorkflow.Parser.Library.util;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -141,11 +141,9 @@ Operation IParser.Parse(string[] lines)
}
double east = double.Parse(coords.Split('/')[0],CultureInfo.InvariantCulture);
double north = double.Parse(coords.Split('/')[1], CultureInfo.InvariantCulture);
GaussKrueger gaussKrueger = new GaussKrueger(east, north);
Geographic geographic = gaussKrueger.ConvertTo<Geographic>();

operation.Einsatzort.GeoLatitude = geographic.Latitude;
operation.Einsatzort.GeoLongitude = geographic.Longitude;
var geo = GeographicCoords.FromGaussKrueger(east, north);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
break;
case CurrentSection.Ende:
break;
Expand Down
9 changes: 4 additions & 5 deletions Parsers/Library/ILSNuernbergParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

using System;
using System.Text.RegularExpressions;
using AlarmWorkflow.Parser.Library.util;
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -266,10 +266,9 @@ Operation IParser.Parse(string[] lines)
var matches = r.Matches(line);
if (matches.Count == 2)
{
int rechts = Convert.ToInt32(matches[0].Value);
int hoch = Convert.ToInt32(matches[1].Value);
GaussKrueger gauss = new GaussKrueger(rechts, hoch);
Geographic geo = (Geographic)gauss;
int geoRechts = Convert.ToInt32(matches[0].Value);
int geoHoch = Convert.ToInt32(matches[1].Value);
var geo = GeographicCoords.FromGaussKrueger(geoRechts, geoHoch);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
}
Expand Down
9 changes: 4 additions & 5 deletions Parsers/Library/ILSPassauParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
using System;
using System.Globalization;
using System.Text.RegularExpressions;
using AlarmWorkflow.Parser.Library.util;
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -270,10 +270,9 @@ Operation IParser.Parse(string[] lines)
var matches = r.Matches(line);
if (matches.Count == 2)
{
int rechts = Convert.ToInt32(matches[0].Value);
int hoch = Convert.ToInt32(matches[1].Value);
GaussKrueger gauss = new GaussKrueger(rechts, hoch);
Geographic geo = (Geographic)gauss;
int geoRechts = Convert.ToInt32(matches[0].Value);
int geoHoch = Convert.ToInt32(matches[1].Value);
var geo = GeographicCoords.FromGaussKrueger(geoRechts, geoHoch);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
}
Expand Down
10 changes: 4 additions & 6 deletions Parsers/Library/ILSRegensburgParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
// along with AlarmWorkflow. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Globalization;
using System.Text.RegularExpressions;
using AlarmWorkflow.Parser.Library.util;
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -170,10 +169,9 @@ Operation IParser.Parse(string[] lines)
var matches = r.Matches(line);
if (matches.Count == 2)
{
int rechts = Convert.ToInt32(matches[0].Value);
int hoch = Convert.ToInt32(matches[1].Value);
GaussKrueger gauss = new GaussKrueger(rechts, hoch);
Geographic geo = (Geographic)gauss;
int geoRechts = Convert.ToInt32(matches[0].Value);
int geoHoch = Convert.ToInt32(matches[1].Value);
var geo = GeographicCoords.FromGaussKrueger(geoRechts, geoHoch);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
}
Expand Down
9 changes: 4 additions & 5 deletions Parsers/Library/ILSRosenheimParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
using System;
using System.Globalization;
using System.Text.RegularExpressions;
using AlarmWorkflow.Parser.Library.util;
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -64,10 +64,9 @@ Operation IParser.Parse(string[] lines)
var matches = r.Matches(line);
if (matches.Count == 2)
{
int rechts = Convert.ToInt32(matches[0].Value);
int hoch = Convert.ToInt32(matches[1].Value);
GaussKrueger gauss = new GaussKrueger(rechts, hoch);
Geographic geo = (Geographic)gauss;
int geoRechts = Convert.ToInt32(matches[0].Value);
int geoHoch = Convert.ToInt32(matches[1].Value);
var geo = GeographicCoords.FromGaussKrueger(geoRechts, geoHoch);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
}
Expand Down
12 changes: 6 additions & 6 deletions Parsers/Library/ILSSchweinfurtParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using System.Text.RegularExpressions;
using GeoUtility.GeoSystem;
using System.Globalization;
using AlarmWorkflow.Parser.Library.util;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -218,11 +218,11 @@ Operation IParser.Parse(string[] lines)
Match result = r.Match(msg);
if (result.Success)
{
double geoX = 0, geoY = 0;
geoX = double.Parse(result.Groups[1].Value, CultureInfo.InvariantCulture);
geoY = double.Parse(result.Groups[2].Value, CultureInfo.InvariantCulture);
GaussKrueger gauss = new GaussKrueger(geoX, geoY);
Geographic geo = (Geographic)gauss;
double geoRechts = 0, geoHoch = 0;
geoRechts = double.Parse(result.Groups[1].Value, CultureInfo.InvariantCulture);
geoHoch = double.Parse(result.Groups[2].Value, CultureInfo.InvariantCulture);

var geo = GeographicCoords.FromGaussKrueger(geoRechts, geoHoch);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
}
Expand Down
5 changes: 2 additions & 3 deletions Parsers/Library/ILSStraubingParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;
using System.Globalization;
using AlarmWorkflow.Parser.Library.util;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -225,8 +225,7 @@ Operation IParser.Parse(string[] lines)
double geoX = 0, geoY = 0;
geoX = double.Parse(result.Groups[1].Value, CultureInfo.InvariantCulture);
geoY = double.Parse(result.Groups[2].Value, CultureInfo.InvariantCulture);
GaussKrueger gauss = new GaussKrueger(geoX, geoY);
Geographic geo = (Geographic)gauss;
var geo = GeographicCoords.FromGaussKrueger(geoX, geoY);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
}
Expand Down
6 changes: 3 additions & 3 deletions Parsers/Library/ILSTraunsteinParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

using System;
using System.Globalization;
using AlarmWorkflow.Parser.Library.util;
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -296,8 +296,8 @@ Operation IParser.Parse(string[] lines)
Logger.Instance.LogFormat(LogType.Warning, this, "Error while parsing line '{0}'. The error message was: {1}", i, ex.Message);
}
}
GaussKrueger gauss = new GaussKrueger(rechts, hoch);
Geographic geo = (Geographic)gauss;

var geo = GeographicCoords.FromGaussKrueger(rechts, hoch); ;
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
return operation;
Expand Down
5 changes: 2 additions & 3 deletions Parsers/Library/IlsAmbergParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

using System;
using System.Globalization;
using AlarmWorkflow.Parser.Library.util;
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -110,8 +110,7 @@ Operation IParser.Parse(string[] lines)
break;
case "Y":
geoY = double.Parse(msg, nfi);
GaussKrueger gauss = new GaussKrueger(geoX, geoY);
Geographic geo = (Geographic)gauss;
var geo = GeographicCoords.FromGaussKrueger(geoX, geoY);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
break;
Expand Down
5 changes: 2 additions & 3 deletions Parsers/Library/IlsBayreuthParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;
using System.Globalization;
using AlarmWorkflow.Parser.Library.util;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -220,8 +220,7 @@ Operation IParser.Parse(string[] lines)
break;
case "Einsatzort Position Y":
geoY = double.Parse(msg, nfi);
GaussKrueger gauss = new GaussKrueger(geoX, geoY);
Geographic geo = (Geographic)gauss;
var geo = GeographicCoords.FromGaussKrueger(geoX, geoY);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
break;
Expand Down
5 changes: 2 additions & 3 deletions Parsers/Library/IlsErdingParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using AlarmWorkflow.Shared.Extensibility;
using System.Text.RegularExpressions;
using System.Globalization;
using GeoUtility.GeoSystem;
using AlarmWorkflow.Parser.Library.util;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -383,8 +383,7 @@ Operation IParser.Parse(string[] lines)

if(geoRechts != 0 && geoHoch != 0)
{
GaussKrueger gauss = new GaussKrueger(geoRechts, geoHoch);
Geographic geo = (Geographic)gauss;
var geo = GeographicCoords.FromGaussKrueger(geoRechts, geoHoch);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
}
Expand Down
9 changes: 4 additions & 5 deletions Parsers/Library/IlsIngolstadtParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
using System.Collections.Generic;
using System.Globalization;
using System.Text.RegularExpressions;
using AlarmWorkflow.Parser.Library.util;
using AlarmWorkflow.Shared.Core;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Extensibility;
using GeoUtility.GeoSystem;

namespace AlarmWorkflow.Parser.Library
{
Expand Down Expand Up @@ -147,10 +147,9 @@ Operation IParser.Parse(string[] lines)
if (matches.Count == 2)
{
NumberFormatInfo nfi = new NumberFormatInfo { NumberDecimalSeparator = "." };
double rechts = Convert.ToDouble(matches[0].Value, nfi);
double hoch = Convert.ToDouble(matches[1].Value, nfi);
GaussKrueger gauss = new GaussKrueger(rechts, hoch);
Geographic geo = (Geographic)gauss;
double geoRechts = Convert.ToDouble(matches[0].Value, nfi);
double geoHoch = Convert.ToDouble(matches[1].Value, nfi);
var geo = GeographicCoords.FromGaussKrueger(geoRechts, geoHoch);
operation.Einsatzort.GeoLatitude = geo.Latitude;
operation.Einsatzort.GeoLongitude = geo.Longitude;
}
Expand Down
Loading