< Summary

Class:Itinero.MapMatching.MapMatcherSettings
Assembly:Itinero.MapMatching
File(s):/home/runner/work/routing2/routing2/src/Itinero.MapMatching/MapMatcherSettings.cs
Covered lines:20
Uncovered lines:0
Coverable lines:20
Total lines:74
Line coverage:100% (20 of 20)
Covered branches:0
Total branches:0
Tag:251_23667616543

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_Profile()100%1100%
get_SigmaZ()100%1100%
get_Beta()100%1100%
get_SearchRadius()100%1100%
get_MinPointDistance()100%1100%
get_MaxPointSkip()100%1100%
get_BreakageDistance()100%1100%
get_MaxRouteDistanceFactor()100%1100%
get_ModelBuilderSettings()100%1100%

File(s)

/home/runner/work/routing2/routing2/src/Itinero.MapMatching/MapMatcherSettings.cs

#LineLine coverage
 1using Itinero.MapMatching.Model;
 2using Itinero.Profiles;
 3
 4namespace Itinero.MapMatching;
 5
 6/// <summary>
 7/// The map matcher settings.
 8/// </summary>
 9public class MapMatcherSettings
 10{
 11    /// <summary>
 12    /// Gets or sets the profile.
 13    /// </summary>
 14    // ReSharper disable once PropertyCanBeMadeInitOnly.Global
 11415    public Profile? Profile { get; set; }
 16
 17    /// <summary>
 18    /// GPS noise standard deviation in meters. Controls the emission probability (Gaussian).
 19    /// Lower values make the matcher prefer candidates closer to the GPS point.
 20    /// </summary>
 4521    public double SigmaZ { get; set; } = 10.0;
 22
 23    /// <summary>
 24    /// Transition probability parameter in meters. Controls the exponential distribution
 25    /// over the absolute difference between great-circle distance and route distance.
 26    /// Higher values are more tolerant of indirect routes.
 27    /// </summary>
 4428    public double Beta { get; set; } = 5.0;
 29
 30    /// <summary>
 31    /// The search radius in meters for finding snap point candidates.
 32    /// </summary>
 4733    public double SearchRadius { get; set; } = 50;
 34
 35    /// <summary>
 36    /// Minimum distance in meters between consecutive track points.
 37    /// Points closer than this are skipped to avoid noise-induced issues.
 38    /// </summary>
 4439    public double MinPointDistance { get; set; } = 10;
 40
 41    /// <summary>
 42    /// Maximum number of consecutive unmatched track points to skip before breaking the model.
 43    /// </summary>
 4444    public int MaxPointSkip { get; set; } = 3;
 45
 46    /// <summary>
 47    /// Maximum great-circle distance in meters between consecutive track points
 48    /// before the trace is split into separate models.
 49    /// </summary>
 4450    public double BreakageDistance { get; set; } = 2000;
 51
 52    /// <summary>
 53    /// Maximum factor applied to the great-circle distance between consecutive points
 54    /// to limit routing search distance.
 55    /// </summary>
 4456    public double MaxRouteDistanceFactor { get; set; } = 5.0;
 57
 58    internal ModelBuilderSettings ModelBuilderSettings
 59    {
 60        get
 2261        {
 2262            return new ModelBuilderSettings()
 2263            {
 2264                SigmaZ = this.SigmaZ,
 2265                Beta = this.Beta,
 2266                SearchRadius = this.SearchRadius,
 2267                MinPointDistance = this.MinPointDistance,
 2268                MaxPointSkip = this.MaxPointSkip,
 2269                BreakageDistance = this.BreakageDistance,
 2270                MaxRouteDistanceFactor = this.MaxRouteDistanceFactor
 2271            };
 2272        }
 73    }
 74}