Automated detection of drainage networks from digital elevation models