Yes @Montfrooij it was part of the railway that traveled along the Douro valley from Porto city to the Spanish border. Half of it (the part next to the border) was deactivated 30 years ago.
They are plans to reactivate it or maybe convert it to a bicycle/walking trail.