This query first creates all the possible combinations between airports and then generates the paths between them using the ST_GREATCIRCLE function. The resulting paths contain 25 points, but you can set the number of points in order to make the lines smoother if needed.
Routes interpolation
Now let’s put to the test how to perform line interpolations using the ST_LINE_INTERPOLATE_POINT function. In this example we will compute the airplane position after taking off from the different airports and travelling a certain distance.
This query uses the ST_LINE_INTERPOLATE_POINT function over each great circle in order to calculate the location of the plane after travelling 500 kilometers.
Last updated
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 960401.