diff --git a/OSMDatastructure/Coordinates.cs b/OSMDatastructure/Coordinates.cs index 4dba764..f077cfe 100644 --- a/OSMDatastructure/Coordinates.cs +++ b/OSMDatastructure/Coordinates.cs @@ -47,6 +47,6 @@ public class Coordinates public override string ToString() { return - $"COORDINATES Lat: {this.latitude.ToString(NumberFormatInfo.InvariantInfo)} Lon: {this.longitude.ToString(CultureInfo.InvariantCulture)}"; + $"lat:{latitude.ToString(NumberFormatInfo.InvariantInfo)} lon:{longitude.ToString(CultureInfo.InvariantCulture)}"; } } \ No newline at end of file diff --git a/OSMDatastructure/OsmNode.cs b/OSMDatastructure/OsmNode.cs index 507aa2f..6ffbbd9 100644 --- a/OSMDatastructure/OsmNode.cs +++ b/OSMDatastructure/OsmNode.cs @@ -46,15 +46,9 @@ public class OsmNode public override string ToString() { - if(this.previousPathNode != null) - return string.Format( - "NODE {0} Edges-Count: {1} previousPathNode: {2} currentPathWeight: {3} currentPathLength: {4} directDistanceToGoal: {5}", - this.coordinates.ToString(), this.edges.Count, this.previousPathNode.coordinates.ToString(), - this.currentPathWeight, this.currentPathLength, this.directDistanceToGoal); - else - return string.Format( - "NODE {0} Edges-Count: {1} previousPathNode: NO PREVIOUS NODE currentPathWeight: {2} currentPathLength: {3} directDistanceToGoal: {4}", - this.coordinates.ToString(), this.edges.Count, - this.currentPathWeight, this.currentPathLength, this.directDistanceToGoal); + if(previousPathNode is not null) + return $"{nodeId} {coordinates} {edges.Count} {directDistanceToGoal} {currentPathWeight} {currentPathLength} {previousPathNode.nodeId}"; + return + $"{nodeId} {coordinates} ec:{edges.Count} d:{directDistanceToGoal} w:{currentPathWeight} l:{currentPathLength} null"; } } \ No newline at end of file