## 2 German Traffic Space Analysis
### Route
#### 2.2.1 Classification
Country Roads
* The motorway type is either _primary_, _primary link_, _secondary_, _tertiary_ or _unclassified_, the speed limit is higher than \(50\,\mathrm{km}\,\mathrm{h}^{-1}\), and there are two or more lanes available. * The motorway type is either _primary_, _primary link_, _secondary_, _tertiary_ or _unclassified_ while the speed limit is higher than \(50\,\mathrm{km}\,\mathrm{h}^{-1}\) and below \(100\,\mathrm{km}\,\mathrm{h}^{-1}\) with one available lane. Motorways
* The motorway type is either _motorway_ or _motorway link_ and the speed limit is above \(50\,\mathrm{km}\,\mathrm{h}^{-1}\). * The motorway type is either _trunk_, _trunk link_, _primary_, _primary link_ or _secondary_ and a one way road, with more than one lane available. All data points were checked for redundant or no categorization. Since the categorization rules oppose each other, no single GPS point was assigned two road types. A total of 552 GPS points could not be assigned to any of the three main categories. However, with a total of 83 million GPS points recorded, this was less than 0.1%. It needs to be mentioned here that only around 80% of the data points were assigned a motorway type by Open Street Maps, so 20% of all data were assigned a type only due to the other rules set in place. Additionally, the road curvature was calculated. Since the proposed methods from [PERSON] and [PERSON] [31; 32] did not result in curves that fit to the collected data, the calculation was performed in a simple mathematical way. In the first step, the GPS data were transformed into Universal Transverse Mercator (UTM) data. From this, the angle of the driven direction was calculated. The angle was then used to classify if a GPS point was part of a curve by calculating angular changesbetween two GPS points. If five successive points were deemed to be on a curve in a single direction, the curve radius was calculated by Equation (1)  
\[0 = x^{2}\,+\,y^{2}\,+\,2 gx\,+\,fy\,+\,c \tag{1a}\] \[R = \sqrt{g^{2}\,+\,f^{2}\,-\,c} \tag{1b}\]  
where the center point of the circle is located at \((-g,-f)\). This can be solved by a least square minimization as shown in Equation (2)  
\[ \begin{bmatrix}x_{i-5}&y_{i-5}&1\\ x_{i-4}&y_{i-4}&1\\ \vdots&\vdots&\vdots\\ x_{i}&y_{i}&1\\ \vdots&\vdots&\vdots\\ x_{i+5}&y_{i+5}&1\end{bmatrix} \ast\vec{a} = \begin{bmatrix}x_{i-5}^{2}\,+\,y_{i-5}^{2}\\ x_{i-4}^{2}\,+\,y_{i-4}^{2}\\ \vdots\\ x_{i}^{2}\,+\,y_{i}^{2}\\ \vdots\\ x_{i+5}^{2}\,+\,y_{i+5}^{2}\end{bmatrix}  \tag{2}\]  
\[g = -0.5\cdot a_{1}\] \[f = -0.5\cdot a_{2}\] \[R = \sqrt{\frac{a_{1}^{2}\,+\,a_{2}^{2}}{4}-a_{3}} \tag{3}\]  
To exemplify the result of this calculation, a sample stretch of road with several identified curves, shown by their corresponding circles, is shown in Figure 2. The drive starts in the bottom right corner and moves to the top left corner, meaning that blue stretches of road mark straight roads, yellow stretches of road mark right curves, and orange roads mark left curves. The red circles mark the center \((-g,-f)\) of each curve and illustrate the calculated radius (R) of each corresponding curve. The curve radii found by this procedure, sorted by the three road categories, are presented in Figure 3.  
Figure 2: Example of a stretch of road illustrating how curve detection was performed, for a drive starting in the bottom right corner and moving to the top left. Blue stretches of road mark straight roads, yellow parts of the road mark right curves, and orange road parts show left curves. As expected, motorways show the least number of narrow bends while urban roads show the most narrow bends of all three categories. The fact that left curves (negative radii) and right curves (positive radii) show the same overall number suggests that the route was well chosen in this regard.