# Determination of Point-to-Point 3D Routing Algorithm Using LiDAR Data for Noise Prediction
## 3 Methodology
### Building Corner Extraction Step 1 to Step 3
#### 3.3.2 Route around the Sides (Step 10 to Step 19)  
These are the routes that are diffracted from the sides (right side and left side) of the building. Route traversal from the sides of the building is known as route around the sides. Figure 8: (**a**) Route from Source(S) –j1–j3 is an upward travel path where j1 and j3 are the height points of intersection point i1 and i3 with respect to height of buildings denoted by (\(\bullet\)). (**b**) Route from j3–j4–D (Destination) is a downward travel path where j3 and j4 are the height points of intersection point i3 and i4 with respect to height of buildings denoted by (\(\bullet\)). Step 10: Initially consider the area or the region. Define the source-destination coordinates. Consider a buffer region that decides the inlier and outlier buildings to avoid complexity. Inliers are those that lie inside the buffer region. Let \(S=(x_{s},y_{s},z_{s})\) and \(D=(x_{d},\)\(y_{d},\)\(z_{d})\), for the source and the destination, calculate a buffer region that makes a square of \(a\)\(=(xa,ya,za)\), \(b=(xb,yb,zb)\), \(c=(xc,yc,zc)\), and \(d=(xd,yd,zd)\) shown in Figure 9a. Step 11: Buildings inside the buffer region are considered for the algorithm. Form a line between the source and the destination defined in step 4 and define two different arrays. \(Array1\) is for buildings on the line and the left side of line \(S\)-\(D\). \(Array2\) is for buildings that lie on the line and the right side of line \(S\)-\(D\) as shown in Figure 9b. \(Array1=[\text{buildingB, buildingD, buildingE, buildingF}]\)\(Array2=[\text{buildingA, buildingB, buildingE, buildingF}]\)  
Step 12: Define the 3D coordinate in the 2D XY planar system. When considering the building edges in the 2D XY plane, the number of equations is formed and stored in an array such as Building edges array1 and Building edges array2 are shown in Figure 10a,b. _Building edges array1_ = [B1B2, B2B4, B4B3, B3B1, D1D2, D2D4, D4D3, D3D1, E1E2, E2E4, E4B3, E3E1, F1F2, F2F4, F4F3, F3F1]. _Building edges array2_ = [A1A2, A2A4, A4A3, A3A1, B1B2, B2B4, B4B3, B3B1, E1E2, E2E4, E4B3, E3E1, F1F2, F2F4, F4F3, F3F1]. Step 13: Check whether the line equation between source and destination intersect with line equations present in the building edge arrays. Calculating the point of intersection P with DR's (\(ap\), \(bp\), \(cp\)). To find the intersection point of two lines, the following is used: The source-destination line equation U with (\(l\), \(m\), \(n\)) are DR's and the line equation of building edges--\(U_{1}\) with (\(a_{1}\), \(b_{1}\), \(c_{1}\)), \(U_{2}\) with (\(a_{2}\), \(b_{2}\), \(c_{2}\)), etc. For calculating point of intersection \(P\) with DR's (\(a_{p}\), \(b_{p}\), \(c_{p}\)). \(Point\)\(of\)\(Intersection\)\(P(i1)=U\times U_{1}\)  
\(P(i1)=((m*c_{1}-b_{1}*n),\ (a_{1}*n-l*c_{1}),\ (l*b_{1}-m*a_{1}))\)  
If \(c_{p}=0\), that means the line does not intersect. Figure 9: (**a**) “abcd” is the buffer region to define inlier and outlier buildings and the region “abfe” is the left side panel and “cdef” is the right side. Buffer region defines that Building C is an outlier and the rest are inliers. (Values in x and \(y\)-axis are in meter.) (**b**) Planimetric view of setup that shows the building corner ground points of inlier buildings where (A1, A2, A3, A4), (B1, B2, B3, B4), (D1, D2, D3, D4), (E1, E2, E3, E4) and (F1, F2, F3, F4) are building corner ground points of Building A, Building B, Building D, Building E and Building F.  
Step 14: For the two-arrays created in step 11, here found the intersection point for first array i1, i2, i3, i4, i5, i6...... stored in the array \(I\). \[I=[\text{i1},\text{i2},\text{i3},\text{i4},\text{i5},\text{i6},\text{i7},\text{ i8}]\]  
Height intersection points j1, j2, j3, j4, j5, j6...... stored in the array \(J\). \[J=[\text{j1},\text{j2},\text{j3},\text{j4},\text{j5},\text{j6},\text{j7},\text {j8}]\]  
Step 15: In the intersection points arrays, calculate the distance of buildings such as d1, d2, d3, d4, etc., for each intersection point.