Automatic station for the treatment of waste water from casting lines