A drainage network identification procedure for hydrological applications