“Romantic,” in the broader sense, perhaps. ... of, characterized by, or suggestive of an idealized view of reality.
The romanticized part of that story was the friendship of the boys.
The railroad was the setting for the story.
Since the boys nearly get themselves killed by using a railroad trestle to cross a river I didnt see railroads as romanticized.