Skip to content

An implementation for LCP algorithm computing flow direction and flow accumulation.

License

Notifications You must be signed in to change notification settings

zfengyan/LCP_Runoff_modelling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LCP implementation for flow direction and flow accumulation.

The idea is from this paper: https://hess.copernicus.org/articles/15/667/2011/

-- REMINDER

This project was compiled in Visual Studio 2019 Community on 64 bit windows platform, that being said, it may not directly work on a mac/linux platform, though a cmake project can be built with all source files in: assignment2 -> src. (External dependency: GDAL).

-- HOW TO USE

An package can be downloaded at: https://github.com/SEUZFY/LCP_Runoff_modelling/releases

Or just clone this repository in a x64 windows computer, then compile and run it in Visual Studio(version >= 2019).

Enter into:

assignment2 -> x64 -> Release, and you’ll be able to see assignment2.exe file, open the command window here and pass the FULLPATH of the input file as an argument for the program(NB: this FULLPATH is also where the generated files will go):

...\assignment2\x64\Release>assignment2.exe FULLPATH

An example:

image

NB: If no argument is supplied, the program won’t execute the process of flow direction and flow accumulation, instead it will give an prompt to require an argument to execute the expected process.

-- INPUT EXAMPLE

An hgt file: download from this website: http://dwtkns.com/srtm30m/

image

-- OUTPUT EXAMPLE

- flow direction

image

- flow accumulation

image

NB: If you open the accumulation.tif in QGIS, you may adjustment the min/max values in the properties setting in order to obtain a more detailed display(Properties -> Min/Max Values Settings -> Select "Cumulative count cut").

image

-- GOOD TO KNOW

If there is a large area of sea or inland lake in the input file, it may affect the results. Although the LCP algorithm will not be greatly affected by that, the input file without a large area of sea or inland lake may lead to more pleasant results.

-- SPECIAL THANKS

Thanks for my collaborator Yitong Xia([email protected]). During the implementation of this algorithm, we sincerely discussed and compared each other's execution results, thank her for her efforts.

And particular thanks go to my good friend Lin([email protected]). I discussed with him whether to use emplace_back() instead of push_back() in the process of using std::vector. And we discussed on the topic of execution efficiency of static array and std::vecotr array.