Tuesday, 2 January 2018

Shapefile and DEM: check rivers behaviour


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?


Thanks,
eo



Answer



I'm not surprised that you haven't got an answer to this seemingly simple question yet. You've opened a whole can of worms here! Take this DEM and vector streams layer as an example:


enter image description here


At the simplest level, you could always perform a profile analysis with your streams and see whether they have predominantly downward profiles:


enter image description here


Consider for a moment what we are actually comparing though. We are comparing a mapped vector stream network, probably mapped off of aerial photographs or from similar techniques, to the elevations contain in a DEM; both of these things are types of models and are not necessarily related to the 'true stream' that exists in the real world. The mapped stream, for example is likely less accurate in the smaller headwater tributaries than it is in the higher order streams. Network extent is one of the least accurate aspects of the mapped stream. And if you think about it, how do you even define the real world stream? As you move towards the channel head, it's likely that the stream becomes intermittent or ephemeral; how often does a stream need to flow to be considered a stream? How well defined and continuous does a channel need to be before we consider it to be a stream? Yikes, those are hard questions to answer. Any way you look at it though, we should expect the mapped stream network and the 'digital stream' implicit in the surface flowpath data contained in the DEM to deviate from one another to some degree.


Nonetheless, we could compare the mapped stream with the 'digital stream' contained in the DEM by examining how the flowpaths issuing from the points of our mapped channel heads differ with the mapped pathway:



enter image description here


Now, these modelled flowpaths are going to depend on the particular flow algorithm used to simulate flow over the DEM and on the DEM quality, source and resolution. Importantly, however, these flowpaths will be monotonically descending paths (always decreasing elevations) unlike the mapped streams.


enter image description here


So what do you do where the two paths deviate? A common approach to handle this problem is to actually 'burn' the the mapped stream into the DEM by lowering the elevations coincident with the vector polylines. This is probably an okay approach when the mapped streams are of much higher quality than the DEM (although I'm still not keen on the approach because it'll mess with elevations and slopes) but it is a terrible approach if your DEM is of higher quality, e.g. most LiDAR DEMs contain more accurate surface flowpaths than the available blue lines on topographic maps.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...