Part of the Memory-Efficient I/O-Improved Drainage Analysis System (MIDAS)
A journal manuscript on this algorithm is currently under review.
Predefined flow direction encodings in GeoTIFF: power2 (default, r.terraflow, ArcGIS), taudem (d8flowdir), 45degree (r.watershed), degree
Custom flow direction encoding is also possible by passing -e E,SE,S,SW,W,NW,N,NE
(e.g., 1,8,7,6,5,4,3,2 for taudem).
You can find test data at https://data.isnew.info/melfp.html.
- Build MELFP first
- Test it
cd test
./pretest.sh
./test.sh
For testing on Windows, you don't need to build MELFP yourself. test\test.bat
will use the included binary windows\melfp.exe
. However, the Windows version was about 12 times slower than the Linux version for 515,152 outlets on the same hardware.
cd test
pretest.bat
test.bat
- First, install the GDAL library.
- Build MELFP
make
or
mkdir build
cd build
cmake ..
make
- Install Visual Studio Community Edition. Select these two components:
- MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
- Windows 11 SDK (10.0.26100.0)
- Install Git for Windows
- Install Miniconda
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
Miniconda3-latest-Windows-x86_64.exe /S /D=C:\opt\miniconda
C:\opt\miniconda\condabin\conda.bat init
- Start Developer Command Prompt for VS 2022
- Setup Conda for GRASS build
conda config --add channels conda-forge
conda config --set channel_priority strict
conda create -n melfp cmake libgdal
conda activate melfp
- Download the source code
cd \opt
git clone git@github.com:HuidaeCho/melfp.git
cd melfp
mkdir build
cd build
- Build MELFP
cmake ..
msbuild melfp.sln -p:configuration=release
or
cmake ..
cmake --build . --config Release
or
cmake -DCMAKE_CONFIGURATION_TYPES=Release
msbuild melfp.sln
- Find melfp.exe in
Release\melfp.exe