Extraction of thalweg networks from DTMs: application to badlands