I'm working with shapefiles representing rivers (rivers.shp), and DEM for the terrain elevation (terrain.tif).
Basically, I want to check that my rivers (stored as polylines in my shapefile) behave like "natural" water flow, meaning that it mainly go downstream, can not go uphill first and downhill then, etc...
I'm using GDAL/OGR in Python, and don't really see how to proceed. Should I extract the points of the polylines in the shp? Look for the elevation at those points in the DEM, and then compute my decision?