-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDefaults.cs
More file actions
118 lines (107 loc) · 4.08 KB
/
Defaults.cs
File metadata and controls
118 lines (107 loc) · 4.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
//
// Copyright © Pete Sramek. All rights reserved.
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
namespace PolylineAlgorithm.Internal;
using System.Diagnostics.CodeAnalysis;
/// <summary>
/// Provides default values and constants used throughout the Polyline Algorithm.
/// </summary>
/// <remarks>
/// Organizes defaults for algorithm parameters, polyline encoding, and geographic values into nested static classes.
/// </remarks>
[ExcludeFromCodeCoverage]
internal static class Defaults {
/// <summary>
/// Contains default values and constants specific to the polyline encoding logging.
/// </summary>
internal static class Logging {
/// <summary>
/// Log level multiplier used to distinguish event identification for each log level.
/// </summary>
internal const int LogLevelMultiplier = 100;
}
/// <summary>
/// Contains default values and constants specific to the polyline encoding algorithm.
/// </summary>
internal static class Algorithm {
/// <summary>
/// The number of bits to shift during polyline encoding.
/// </summary>
internal const byte ShiftLength = 5;
/// <summary>
/// The ASCII value for the question mark character ('?').
/// </summary>
internal const byte QuestionMark = 63;
/// <summary>
/// The ASCII value for the space character (' ').
/// </summary>
internal const byte Space = 32;
/// <summary>
/// The ASCII value for the unit separator character.
/// </summary>
internal const byte UnitSeparator = 31;
}
/// <summary>
/// Contains default values and constants for geographic value validation.
/// </summary>
internal static class Value {
/// <summary>
/// Provides constants representing latitude values, including the default, minimum, and maximum valid values.
/// </summary>
internal static class Latitude {
/// <summary>
/// The default value for latitude, representing the equator.
/// </summary>
internal const double Default = 0.00000;
/// <summary>
/// The minimum valid latitude value.
/// </summary>
internal const double Min = -90.00000;
/// <summary>
/// The maximum valid latitude value.
/// </summary>
internal const double Max = 90.00000;
}
/// <summary>
/// Provides constants representing longitude values, including the default, minimum, and maximum valid values.
/// </summary>
internal static class Longitude {
/// <summary>
/// The default value for longitude, representing the equator.
/// </summary>
internal const double Default = 0.00000;
/// <summary>
/// The minimum valid longitude value.
/// </summary>
internal const double Min = -180.00000;
/// <summary>
/// The maximum valid longitude value.
/// </summary>
internal const double Max = 180.00000;
}
}
/// <summary>
/// Contains default values and constants related to polyline.
/// </summary>
internal static class Polyline {
/// <summary>
/// Contains constants related to the polyline blocks.
/// </summary>
internal static class Block {
/// <summary>
/// Contains constants related to the length of encoded values in polyline encoding.
/// </summary>
internal static class Length {
/// <summary>
/// The minimum number of characters required to represent an encoded value.
/// </summary>
internal const int Min = 1;
/// <summary>
/// The maximum number of characters allowed to represent an encoded value.
/// </summary>
internal const int Max = 13;
}
}
}
}