I have a shapefile containing several thousand GPS locations located in multiple countries and another shapefile with country polygons (or alternatively also one with country border polylines).
How can I calculate the shortest distance from each GPS location (point) to the borders of all countries adjacent to the country the point is located in?
Is there even a way to achieve this in QGIS?
Example of what I would like to calculate for every point:
I managed to get the distance to the (single) nearest border using the NNJoin plugin, but I have trouble identifying all adjacent borders and calculating all distances.
Ideally, the data structure would look like this, assuming that the distance is only reported for adjacent countries:
If this is difficult to achieve for adjacent countries only, a simple distance matrix with the distances to all countries in the sample would also be fine, but I have not found a way to create one for polylines rather than points.