I have dataset of railways from OpenStreetMap. It is really detailed. But i want to make generalization for map scale 1:500 000: remove small details of the railways and short branches. I`ve used Collapse Dual Lines To Centerline, Collapse Road Detail, Merge Divided Roads, Thin Road Network tools For generalization of roads.
What is the best way for generalization of railway lines?
UPDATE
i removed the railways that were marked in OSM as abandoned, or tram, or sidding, or crossover lines etc. But there are too many lines without additional tags to filter.
example, Odessa railways before and after my manipulations.


