Get the ways data for the border between Italy and Austria.
I used Overpass Turbo to create this query:
[out:json][timeout:25];
(
way["boundary"="administrative"]["admin_level"="2"]({{bbox}});
);
// print results
out body;
>;
out skel qt;
I used only ways because we only need parts of the full national boundaries. Especially since the Italian borders are very long to the south and we don't need all that data.
I drew a BBOX that just contains the relevant border in Overpass Turbo. After drawing the bbox and running the query the result is this:
You would then need to download the data (it's under "Export" in the menu), load into QGIS, possibly dissolve into one way (in QGIS).
The next steps depend on where you store the road network. If in some kind of database then also import the boundary way and run something like
select ST_intersection(roads.geom,border.geom) from osm_roads, border where STIntersects(roads.geom,border.geom)=True
If in shapefiles then you can run line intersection from the vector overlays. See https://docs.qgis.org/3.22/en/docs/user_manual/processing_algs/qgis/vectoroverlay.html?highlight=intersection#line-intersections .
Edit:
I used the above method to get a border GeoJSON, cleaned that up a little (removing the border with Slovenia), used dissolve to get a single line. Then I used the QuickOSM plugin to get all ways tagged highway
in the vicinity of the Brenner pass. Then I ran the QGIS tool line intersections
and used both layers as input. This is the result:
Detailed analysis:
The hiking trail follows the border and crosses it numerous times. Probably you need to constrain your query to ways tagged highway=track
and above or you get lots of these kind of crossings.