public Problems RoadSegmentSurfaceAttributeFromPositionNotEqualToZero(AttributeId attributeId, RoadSegmentPosition fromPosition) { return(new Problems( _problems.Add( new Error(nameof(RoadSegmentSurfaceAttributeFromPositionNotEqualToZero), new ProblemParameter("AttributeId", attributeId.ToInt32().ToString()), new ProblemParameter("FromPosition", fromPosition.ToString()))))); }
public Problems RoadSegmentSurfaceAttributeToPositionNotEqualToLength(AttributeId attributeId, RoadSegmentPosition toPosition, double length) { return(new Problems( _problems.Add( new Error(nameof(RoadSegmentSurfaceAttributeToPositionNotEqualToLength), new ProblemParameter("AttributeId", attributeId.ToInt32().ToString()), new ProblemParameter("ToPosition", toPosition.ToString()), new ProblemParameter("Length", length.ToString(CultureInfo.InvariantCulture)))))); }
public Problems RoadSegmentSurfaceAttributesNotAdjacent(AttributeId attributeId1, RoadSegmentPosition toPosition, AttributeId attributeId2, RoadSegmentPosition fromPosition) { return(new Problems( _problems.Add( new Error(nameof(RoadSegmentSurfaceAttributesNotAdjacent), new ProblemParameter("AttributeId", attributeId1.ToInt32().ToString()), new ProblemParameter("ToPosition", toPosition.ToString()), new ProblemParameter("AttributeId", attributeId2.ToInt32().ToString()), new ProblemParameter("FromPosition", fromPosition.ToString()))))); }
public Messages.RoadNetworkSnapshot TakeSnapshot() { return(new Messages.RoadNetworkSnapshot { Nodes = _nodes.Select(node => new Messages.RoadNetworkSnapshotNode { Id = node.Value.Id.ToInt32(), Segments = node.Value.Segments.Select(segment => segment.ToInt32()).ToArray(), Geometry = GeometryTranslator.Translate(node.Value.Geometry) }).ToArray(), Segments = _segments.Select(segment => new Messages.RoadNetworkSnapshotSegment { Id = segment.Value.Id.ToInt32(), StartNodeId = segment.Value.Start.ToInt32(), EndNodeId = segment.Value.End.ToInt32(), Geometry = GeometryTranslator.Translate(segment.Value.Geometry), AttributeHash = segment.Value.AttributeHash.GetHashCode() }).ToArray(), MaximumNodeId = _maximumNodeId.ToInt32(), MaximumSegmentId = _maximumSegmentId.ToInt32(), MaximumGradeSeparatedJunctionId = _maximumGradeSeparatedJunctionId.ToInt32(), MaximumEuropeanRoadAttributeId = _maximumEuropeanRoadAttributeId.ToInt32(), MaximumNationalRoadAttributeId = _maximumNationalRoadAttributeId.ToInt32(), MaximumNumberedRoadAttributeId = _maximumNumberedRoadAttributeId.ToInt32(), MaximumLaneAttributeId = _maximumLaneAttributeId.ToInt32(), MaximumWidthAttributeId = _maximumWidthAttributeId.ToInt32(), MaximumSurfaceAttributeId = _maximumSurfaceAttributeId.ToInt32(), SegmentReusableLaneAttributeIdentifiers = _segmentReusableLaneAttributeIdentifiers.Select(segment => new Messages.RoadNetworkSnapshotSegmentReusableAttributeIdentifiers { SegmentId = segment.Key.ToInt32(), ReusableAttributeIdentifiers = segment.Value.Select(lane => lane.ToInt32()).ToArray() }).ToArray(), SegmentReusableWidthAttributeIdentifiers = _segmentReusableWidthAttributeIdentifiers.Select(segment => new Messages.RoadNetworkSnapshotSegmentReusableAttributeIdentifiers { SegmentId = segment.Key.ToInt32(), ReusableAttributeIdentifiers = segment.Value.Select(width => width.ToInt32()).ToArray() }).ToArray(), SegmentReusableSurfaceAttributeIdentifiers = _segmentReusableSurfaceAttributeIdentifiers.Select(segment => new Messages.RoadNetworkSnapshotSegmentReusableAttributeIdentifiers { SegmentId = segment.Key.ToInt32(), ReusableAttributeIdentifiers = segment.Value.Select(surface => surface.ToInt32()).ToArray() }).ToArray() }); }