In general drawing parallel lines following arbitrary shapes is complicated, so making good looking railroad tracks in fantasy maps is difficult. But with the help of the ofn-gradient-along-path script this becomes quite easy.
Create a gradient which is one half the track and where the left side is transparency:
You can test this gradient with the blend tool, using Shape: Bi-linear and Repeat: Truncate. This should produce two parallel lines:
Your tracks are defined with a path which is the center of the track:
Then you add a layer and use ofn-gradient-along-path to render the gradient centered on the path, thus creating two curves that are parallel to the center path (the red line is just to show where the path is, it is not part of the final image).
Create a gradient which is one half the track and where the left side is transparency:
You can test this gradient with the blend tool, using Shape: Bi-linear and Repeat: Truncate. This should produce two parallel lines:
(Note that the rail width is scaled with the track width)
Your tracks are defined with a path which is the center of the track:
Then you add a layer and use ofn-gradient-along-path to render the gradient centered on the path, thus creating two curves that are parallel to the center path (the red line is just to show where the path is, it is not part of the final image).