@@ -9,31 +9,33 @@ namespace PolylineAlgorithm.Internal;
99using System . Diagnostics . CodeAnalysis ;
1010
1111/// <summary>
12- /// Provides default values used in the Polyline Algorithm.
12+ /// Provides default values and constants used throughout the Polyline Algorithm.
13+ /// This class contains nested static classes for organizing defaults related to the algorithm,
14+ /// polyline encoding, and geographic coordinates.
1315/// </summary>
1416[ ExcludeFromCodeCoverage ]
1517internal static class Defaults {
1618 /// <summary>
17- /// Contains default values related to the algorithm.
19+ /// Contains default values and constants related to the polyline encoding algorithm.
1820 /// </summary>
1921 public static class Algorithm {
2022 /// <summary>
21- /// The coordinate rounding precision.
23+ /// The coordinate rounding precision used in the polyline encoding algorithm .
2224 /// </summary>
2325 public const int Precision = 100_000 ;
2426
2527 /// <summary>
26- /// The length of the shift used in the algorithm.
28+ /// The bit shift length used in the polyline encoding algorithm.
2729 /// </summary>
2830 public const byte ShiftLength = 5 ;
2931
3032 /// <summary>
31- /// The ASCII value for the question mark character.
33+ /// The ASCII value for the question mark character ('?') .
3234 /// </summary>
3335 public const byte QuestionMark = 63 ;
3436
3537 /// <summary>
36- /// The ASCII value for the space character.
38+ /// The ASCII value for the space character (' ') .
3739 /// </summary>
3840 public const byte Space = 32 ;
3941
@@ -44,36 +46,41 @@ public static class Algorithm {
4446 }
4547
4648 /// <summary>
47- /// Contains default values related to polyline.
49+ /// Contains default values and constants related to polyline encoding .
4850 /// </summary>
4951 public static class Polyline {
52+ /// <summary>
53+ /// An array of delimiters used in the polyline encoding process.
54+ /// Each delimiter is derived by adding the ASCII value of the question mark ('?') to a range of integers.
55+ /// </summary>
5056 public static readonly byte [ ] Delimiters = [ .. Enumerable . Range ( 0 , 32 ) . Select ( n => ( byte ) ( n + Defaults . Algorithm . QuestionMark ) ) ] ;
5157
5258 /// <summary>
53- /// The minimum length of an encoded coordinate.
59+ /// The minimum length of an encoded coordinate in the polyline format .
5460 /// </summary>
5561 public const int MinEncodedCoordinateLength = 2 ;
62+
5663 /// <summary>
57- /// The maximum length of an encoded coordinate.
64+ /// The maximum length of an encoded coordinate in the polyline format .
5865 /// </summary>
5966 public const int MaxEncodedCoordinateLength = 12 ;
6067 }
6168
6269 /// <summary>
63- /// Contains default values related to coordinates.
70+ /// Contains default values and constants related to geographic coordinates.
6471 /// </summary>
6572 public static class Coordinate {
6673 /// <summary>
6774 /// Contains default values related to latitude.
6875 /// </summary>
6976 public static class Latitude {
7077 /// <summary>
71- /// The minimum value for latitude.
78+ /// The minimum valid value for latitude, in degrees .
7279 /// </summary>
7380 public const sbyte Min = - Max ;
7481
7582 /// <summary>
76- /// The maximum value for latitude.
83+ /// The maximum valid value for latitude, in degrees .
7784 /// </summary>
7885 public const byte Max = 90 ;
7986 }
@@ -83,29 +90,29 @@ public static class Latitude {
8390 /// </summary>
8491 public static class Longitude {
8592 /// <summary>
86- /// The minimum value for longitude.
93+ /// The minimum valid value for longitude, in degrees .
8794 /// </summary>
8895 public const short Min = - Max ;
8996
9097 /// <summary>
91- /// The maximum value for longitude.
98+ /// The maximum valid value for longitude, in degrees .
9299 /// </summary>
93100 public const byte Max = 180 ;
94101 }
95102
96103 /// <summary>
97- /// Contains default ranges for latitude and longitude.
104+ /// Contains default ranges for validating latitude and longitude values .
98105 /// </summary>
99106 public static class Range {
100107 /// <summary>
101- /// The validation range for latitude.
108+ /// The default validation range for latitude values .
102109 /// </summary>
103110 public static readonly CoordinateRange Latitude = new ( Coordinate . Latitude . Min , Coordinate . Latitude . Max ) ;
104111
105112 /// <summary>
106- /// The validation range for longitude.
113+ /// The default validation range for longitude values .
107114 /// </summary>
108115 public static readonly CoordinateRange Longitude = new ( Coordinate . Longitude . Min , Coordinate . Longitude . Max ) ;
109116 }
110117 }
111- }
118+ }
0 commit comments