├── .gitattributes
├── .gitignore
├── GCC.sh
├── GDAL.sh
├── GPLv3license.txt
├── MPICH2.sh
├── Notes
├── GDALRasterFormats.xlsx
└── OGRVectorFormats.xlsx
├── README.txt
├── Taudem5PCVS2015
├── AreaD8
│ ├── AreaD8.vcproj
│ ├── AreaD8.vcxproj
│ └── AreaD8.vcxproj.filters
├── AreaDinf
│ ├── AreaDinf.idc
│ ├── AreaDinf.vcproj
│ ├── AreaDinf.vcxproj
│ ├── AreaDinf.vcxproj.filters
│ └── ClassDiagram1.cd
├── CatchHydroGeo
│ ├── CatchHydroGeo.vcxproj
│ └── CatchHydroGeo.vcxproj.filters
├── CatchOutlets
│ ├── CatchOutlets.vcxproj
│ └── CatchOutlets.vcxproj.filters
├── ConnectDown
│ ├── ConnectDown.vcproj
│ ├── ConnectDown.vcxproj
│ └── ConnectDown.vcxproj.filters
├── Create_Outlet
│ ├── Create_Outlet.vcxproj
│ └── Create_Outlet.vcxproj.filters
├── D8FlowDir
│ ├── D8FlowDir.vcproj
│ ├── D8FlowDir.vcxproj
│ └── D8FlowDir.vcxproj.filters
├── D8FlowPathExtremeUp
│ ├── D8FlowPathExtremeUp.vcproj
│ ├── D8FlowPathExtremeUp.vcxproj
│ └── D8FlowPathExtremeUp.vcxproj.filters
├── D8HDistToStrm
│ ├── D8HDistToStrm.vcxproj
│ └── D8HDistToStrm.vcxproj.filters
├── D8VDistToStrm
│ ├── D8VDistToStrm.vcxproj
│ └── D8VDistToStrm.vcxproj.filters
├── DinfAvalanche
│ ├── DinfAvalanche.vcproj
│ ├── DinfAvalanche.vcxproj
│ └── DinfAvalanche.vcxproj.filters
├── DinfConcLimAccum
│ ├── DinfConcLimAccum.vcproj
│ ├── DinfConcLimAccum.vcxproj
│ └── DinfConcLimAccum.vcxproj.filters
├── DinfDecayAccum
│ ├── DinfDecayAccum.vcproj
│ ├── DinfDecayAccum.vcxproj
│ └── DinfDecayAccum.vcxproj.filters
├── DinfDistDown
│ ├── DinfDistDown.vcproj
│ ├── DinfDistDown.vcxproj
│ └── DinfDistDown.vcxproj.filters
├── DinfDistUp
│ ├── DinfDistUp.vcproj
│ ├── DinfDistUp.vcxproj
│ └── DinfDistUp.vcxproj.filters
├── DinfFlowDir
│ ├── DinfFlowDir.vcproj
│ ├── DinfFlowDir.vcxproj
│ └── DinfFlowDir.vcxproj.filters
├── DinfRevAccum
│ ├── DinfRevAccum.vcproj
│ ├── DinfRevAccum.vcxproj
│ └── DinfRevAccum.vcxproj.filters
├── DinfTransLimAccum
│ ├── DinfTransLimAccum.vcproj
│ ├── DinfTransLimAccum.vcxproj
│ └── DinfTransLimAccum.vcxproj.filters
├── DinfUpDependence
│ ├── DinfUpDependence.vcproj
│ ├── DinfUpDependence.vcxproj
│ └── DinfUpDependence.vcxproj.filters
├── DropAnalysis
│ ├── DropAnalysis.vcproj
│ ├── DropAnalysis.vcxproj
│ └── DropAnalysis.vcxproj.filters
├── EditRaster
│ ├── EditRaster.vcxproj
│ └── EditRaster.vcxproj.filters
├── FlowDirCond
│ ├── FlowdirCond.vcxproj
│ └── FlowdirCond.vcxproj.filters
├── GageWatershed
│ ├── GageWatershed.vcproj
│ ├── GageWatershed.vcxproj
│ └── GageWatershed.vcxproj.filters
├── GridNet
│ ├── GridNet.vcproj
│ ├── GridNet.vcxproj
│ └── GridNet.vcxproj.filters
├── Inunmap
│ ├── Inunmap.vcxproj
│ └── Inunmap.vcxproj.filters
├── LengthArea
│ ├── LengthArea.vcxproj
│ └── LengthArea.vcxproj.filters
├── MoveOutletsToStream
│ ├── MoveOutletsToStream.vcproj
│ ├── MoveOutletsToStream.vcxproj
│ └── MoveOutletsToStream.vcxproj.filters
├── PeukerDouglas
│ ├── PeukerDouglas.vcproj
│ ├── PeukerDouglas.vcxproj
│ └── PeukerDouglas.vcxproj.filters
├── PitRemove
│ ├── PitRemove.vcproj
│ ├── PitRemove.vcxproj
│ └── PitRemove.vcxproj.filters
├── RetLimFlow
│ ├── RetLimFlow.vcxproj
│ └── RetLimFlow.vcxproj.filters
├── SetRegion
│ ├── SetRegion.vcxproj
│ └── SetRegion.vcxproj.filters
├── SinmapSI
│ ├── SinmapSI.vcxproj
│ └── SinmapSI.vcxproj.filters
├── SlopeArea
│ ├── SlopeArea.vcproj
│ ├── SlopeArea.vcxproj
│ └── SlopeArea.vcxproj.filters
├── SlopeAreaRatio
│ ├── SlopeAreaRatio.vcproj
│ ├── SlopeAreaRatio.vcxproj
│ └── SlopeAreaRatio.vcxproj.filters
├── SlopeAveDown
│ ├── SlopeAveDown.vcproj
│ ├── SlopeAveDown.vcxproj
│ └── SlopeAveDown.vcxproj.filters
├── StreamNet
│ ├── StreamNet.vcproj
│ ├── StreamNet.vcxproj
│ └── StreamNet.vcxproj.filters
├── TWI
│ ├── TWI.vcxproj
│ └── TWI.vcxproj.filters
├── TauDEM.rc
├── TauDEM_Build_Configurations
│ ├── common_debug_32.props
│ ├── common_debug_64.props
│ ├── common_release_32.props
│ ├── common_release_64.props
│ └── win32_library.props
├── Taudem5PC.sln
├── Threshold
│ ├── Threshold.vcproj
│ ├── Threshold.vcxproj
│ └── Threshold.vcxproj.filters
├── ogrtest
│ ├── ogrtest.vcxproj
│ └── ogrtest.vcxproj.filters
└── resource.h
├── Taudem5PCVS2019
├── AreaD8
│ ├── AreaD8.vcproj
│ ├── AreaD8.vcxproj
│ └── AreaD8.vcxproj.filters
├── AreaDinf
│ ├── AreaDinf.idc
│ ├── AreaDinf.vcproj
│ ├── AreaDinf.vcxproj
│ ├── AreaDinf.vcxproj.filters
│ └── ClassDiagram1.cd
├── CatchHydroGeo
│ ├── CatchHydroGeo.vcxproj
│ └── CatchHydroGeo.vcxproj.filters
├── CatchOutlets
│ ├── CatchOutlets.vcxproj
│ └── CatchOutlets.vcxproj.filters
├── ConnectDown
│ ├── ConnectDown.vcproj
│ ├── ConnectDown.vcxproj
│ └── ConnectDown.vcxproj.filters
├── Create_Outlet
│ ├── Create_Outlet.vcxproj
│ └── Create_Outlet.vcxproj.filters
├── D8FlowDir
│ ├── D8FlowDir.vcproj
│ ├── D8FlowDir.vcxproj
│ └── D8FlowDir.vcxproj.filters
├── D8FlowPathExtremeUp
│ ├── D8FlowPathExtremeUp.vcproj
│ ├── D8FlowPathExtremeUp.vcxproj
│ └── D8FlowPathExtremeUp.vcxproj.filters
├── D8HDistToStrm
│ ├── D8HDistToStrm.vcxproj
│ └── D8HDistToStrm.vcxproj.filters
├── D8VDistToStrm
│ ├── D8VDistToStrm.vcxproj
│ └── D8VDistToStrm.vcxproj.filters
├── DinfAvalanche
│ ├── DinfAvalanche.vcproj
│ ├── DinfAvalanche.vcxproj
│ └── DinfAvalanche.vcxproj.filters
├── DinfConcLimAccum
│ ├── DinfConcLimAccum.vcproj
│ ├── DinfConcLimAccum.vcxproj
│ └── DinfConcLimAccum.vcxproj.filters
├── DinfDecayAccum
│ ├── DinfDecayAccum.vcproj
│ ├── DinfDecayAccum.vcxproj
│ └── DinfDecayAccum.vcxproj.filters
├── DinfDistDown
│ ├── DinfDistDown.vcproj
│ ├── DinfDistDown.vcxproj
│ └── DinfDistDown.vcxproj.filters
├── DinfDistUp
│ ├── DinfDistUp.vcproj
│ ├── DinfDistUp.vcxproj
│ └── DinfDistUp.vcxproj.filters
├── DinfFlowDir
│ ├── DinfFlowDir.vcproj
│ ├── DinfFlowDir.vcxproj
│ └── DinfFlowDir.vcxproj.filters
├── DinfRevAccum
│ ├── DinfRevAccum.vcproj
│ ├── DinfRevAccum.vcxproj
│ └── DinfRevAccum.vcxproj.filters
├── DinfTransLimAccum
│ ├── DinfTransLimAccum.vcproj
│ ├── DinfTransLimAccum.vcxproj
│ └── DinfTransLimAccum.vcxproj.filters
├── DinfUpDependence
│ ├── DinfUpDependence.vcproj
│ ├── DinfUpDependence.vcxproj
│ └── DinfUpDependence.vcxproj.filters
├── DropAnalysis
│ ├── DropAnalysis.vcproj
│ ├── DropAnalysis.vcxproj
│ └── DropAnalysis.vcxproj.filters
├── EditRaster
│ ├── EditRaster.vcxproj
│ └── EditRaster.vcxproj.filters
├── FlowDirCond
│ ├── FlowdirCond.vcxproj
│ └── FlowdirCond.vcxproj.filters
├── GageWatershed
│ ├── GageWatershed.vcproj
│ ├── GageWatershed.vcxproj
│ └── GageWatershed.vcxproj.filters
├── GridNet
│ ├── GridNet.vcproj
│ ├── GridNet.vcxproj
│ └── GridNet.vcxproj.filters
├── Inunmap
│ ├── Inunmap.vcxproj
│ └── Inunmap.vcxproj.filters
├── LengthArea
│ ├── LengthArea.vcxproj
│ └── LengthArea.vcxproj.filters
├── MoveOutletsToStream
│ ├── MoveOutletsToStream.vcproj
│ ├── MoveOutletsToStream.vcxproj
│ └── MoveOutletsToStream.vcxproj.filters
├── PeukerDouglas
│ ├── PeukerDouglas.vcproj
│ ├── PeukerDouglas.vcxproj
│ └── PeukerDouglas.vcxproj.filters
├── PitRemove
│ ├── PitRemove.vcproj
│ ├── PitRemove.vcxproj
│ └── PitRemove.vcxproj.filters
├── RetLimFlow
│ ├── RetLimFlow.vcxproj
│ └── RetLimFlow.vcxproj.filters
├── SetRegion
│ ├── SetRegion.vcxproj
│ └── SetRegion.vcxproj.filters
├── SinmapSI
│ ├── SinmapSI.vcxproj
│ └── SinmapSI.vcxproj.filters
├── SlopeArea
│ ├── SlopeArea.vcproj
│ ├── SlopeArea.vcxproj
│ └── SlopeArea.vcxproj.filters
├── SlopeAreaRatio
│ ├── SlopeAreaRatio.vcproj
│ ├── SlopeAreaRatio.vcxproj
│ └── SlopeAreaRatio.vcxproj.filters
├── SlopeAveDown
│ ├── SlopeAveDown.vcproj
│ ├── SlopeAveDown.vcxproj
│ └── SlopeAveDown.vcxproj.filters
├── StreamNet
│ ├── StreamNet.vcproj
│ ├── StreamNet.vcxproj
│ └── StreamNet.vcxproj.filters
├── TWI
│ ├── TWI.vcxproj
│ └── TWI.vcxproj.filters
├── TauDEM.rc
├── TauDEM_Build_Configurations
│ ├── common_debug_32.props
│ ├── common_debug_64.props
│ ├── common_release_32.props
│ ├── common_release_64.props
│ └── win32_library.props
├── Taudem5PC.sln
├── Threshold
│ ├── Threshold.vcproj
│ ├── Threshold.vcxproj
│ └── Threshold.vcxproj.filters
├── ogrtest
│ ├── ogrtest.vcxproj
│ └── ogrtest.vcxproj.filters
└── resource.h
├── UpdateNotes.txt
├── Utilities
└── DEMVerifier
│ ├── Makefile
│ └── demverifier.c
├── WindowsInstaller
├── setup.iss
├── taudem.bmp
└── taudem.svg
├── license.txt
├── pyfiles
├── ArcGISParameterRegionTool.py
├── ArcGISStabilityIndex.py
├── ConectDown.py
├── D8ContributingArea.py
├── D8DistanceToStreams.py
├── D8ExtremeUpslope.py
├── D8FlowDirection.py
├── DinfAvalancheRunout.py
├── DinfConcenLimitAccum.py
├── DinfContributingArea.py
├── DinfDecayingAccumulation.py
├── DinfDistDown.py
├── DinfDistUp.py
├── DinfFlowDirection.py
├── DinfReverseAccumulation.py
├── DinfTransLimitAccum.py
├── DinfUpslopeDependence.py
├── GageWatershed.py
├── GridNetwork.py
├── LengthAreaStreamSource.py
├── MoveOutletsToStreams.py
├── PeukerDouglas.py
├── PeukerDouglasStreamDef.py
├── PitRemove.py
├── SIRegionTool.py
├── SlopeAreaCombination.py
├── SlopeAreaStreamDefinition.py
├── SlopeAveDown.py
├── SlopeOverAreaRatio.py
├── StabilityIndex.py
├── StreamDefByThreshold.py
├── StreamDefWithDropAnalysis.py
├── StreamDropAnalysis.py
├── StreamReachAndWatershed.py
├── TauDEM Tools 10 2.tbx
├── TauDEM Tools.tbx
├── TopographicWetnessIndex.py
├── Utils.py
└── WatershedGridToShapefile.py
└── src
├── .gitignore
├── CMakeLists.txt
├── CatchHydroGeo.cpp
├── CatchHydroGeomn.cpp
├── CatchOutlets.cpp
├── CatchOutlets.h
├── CatchOutletsmn.cpp
├── ConnectDown.cpp
├── ConnectDown.h
├── ConnectDownmn.cpp
├── D8FlowDirmn.cpp
├── D8FlowPathExtremeUpmn.cpp
├── D8HDistToStrm.cpp
├── D8HDistToStrmmn.cpp
├── D8VDistToStrm.cpp
├── D8VDistToStrmmn.cpp
├── D8flowpathextremeup.cpp
├── DinfAvalanche.cpp
├── DinfAvalanchemn.cpp
├── DinfConcLimAccum.cpp
├── DinfConcLimAccummn.cpp
├── DinfDecayAccummn.cpp
├── DinfDistDown.cpp
├── DinfDistDown.h
├── DinfDistDownmn.cpp
├── DinfDistUp.cpp
├── DinfDistUp.h
├── DinfDistUpmn.cpp
├── DinfFlowDirmn.cpp
├── DinfRevAccum.cpp
├── DinfRevAccummn.cpp
├── DinfTransLimAccum.cpp
├── DinfTransLimAccummn.cpp
├── DinfUpDependence.cpp
├── DinfUpDependencemn.cpp
├── DropAnalysis.cpp
├── DropAnalysis.h
├── DropAnalysismn.cpp
├── EditRaster.cpp
├── EditRastermn.cpp
├── InunMap.cpp
├── InunMap.h
├── InunMapmn.cpp
├── LengthArea.cpp
├── LengthAreamn.cpp
├── MoveOutletsToStrm.cpp
├── MoveOutletsToStrm.h
├── MoveOutletsToStrmmn.cpp
├── Node.cpp
├── Node.h
├── PeukerDouglas.cpp
├── PeukerDouglasmn.cpp
├── PitRemovemn.cpp
├── ReadOutlets.cpp
├── RetLimFlowmn.cpp
├── RetlimFlow.cpp
├── SINMAPErrorCodes.h
├── SetRegion.cpp
├── SetRegionmn.cpp
├── SinmapSI.cpp
├── SinmapSImn.cpp
├── SlopeArea.cpp
├── SlopeAreaRatio.cpp
├── SlopeAreaRatiomn.cpp
├── SlopeAreamn.cpp
├── SlopeAveDown.cpp
├── SlopeAveDownmn.cpp
├── TWI.cpp
├── TWImn.cpp
├── Threshold.cpp
├── Thresholdmn.cpp
├── aread8.cpp
├── aread8.h
├── aread8mn.cpp
├── areadinf.cpp
├── areadinf.h
├── areadinfmn.cpp
├── commonLib.cpp
├── commonLib.h
├── createpart.h
├── d8.cpp
├── d8.h
├── dinf.cpp
├── dinfdecayaccum.cpp
├── flood.cpp
├── flood.h
├── flowdircond.cpp
├── flowdirconditionmn.cpp
├── gagewatershed.cpp
├── gagewatershedmn.cpp
├── gridnet.cpp
├── gridnetmn.cpp
├── initneighbor.h
├── linearpart.h
├── linklib.h
├── makefile
├── ogrtest.cpp
├── ogrtestmn.cpp
├── partition.h
├── retlimro.h
├── sedimentlib.h
├── sindex.h
├── streamnet.cpp
├── streamnet.h
├── streamnetmn.cpp
├── tardemlib.h
├── tiffIO.cpp
└── tiffIO.h
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 |
4 | .idea
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 | # External tool builders
19 | .externalToolBuilders/
20 | # Locally stored "Eclipse launch configurations"
21 | *.launch
22 | # CDT-specific
23 | .cproject
24 | # PDT-specific
25 | .buildpath
26 | ## Visual Studio
27 | ## Ignore Visual Studio temporary files, build results, and
28 | ## files generated by popular Visual Studio add-ons.
29 | # User-specific files
30 | *.suo
31 | *.user
32 | *.sln.docstates
33 | # Build results
34 | [Dd]ebug/
35 | [Rr]elease/
36 | *_i.c
37 | *_p.c
38 | *.ilk
39 | *.meta
40 | *.obj
41 | *.pch
42 | *.pdb
43 | *.pgc
44 | *.pgd
45 | *.rsp
46 | *.sbr
47 | *.tlb
48 | *.tli
49 | *.tlh
50 | *.vspscc
51 | .builds
52 | *.dotCover
53 | ## TODO: If you have NuGet Package Restore enabled, uncomment this
54 | #packages/
55 | # Visual C++ cache files
56 | ipch/
57 | *.aps
58 | *.ncb
59 | *.opensdf
60 | *.sdf
61 | # Visual Studio profiler
62 | *.psess
63 | *.vsp
64 | # ReSharper is a .NET coding add-in
65 | _ReSharper*
66 | # Installshield output folder
67 | [Ee]xpress
68 | # DocProject is a documentation generator add-in
69 | DocProject/buildhelp/
70 | DocProject/Help/*.HxT
71 | DocProject/Help/*.HxC
72 | DocProject/Help/*.hhc
73 | DocProject/Help/*.hhk
74 | DocProject/Help/*.hhp
75 | DocProject/Help/Html2
76 | DocProject/Help/html
77 | # Click-Once directory
78 | publish
79 | # Others
80 | [Bb]in
81 | [Oo]bj
82 | sql
83 | TestResults
84 | *.Cache
85 | ClientBin
86 | stylecop.*
87 | ~$*
88 | *.dbmdl
89 | Generated_Code #added for RIA/Silverlight projects
90 | # Backup & report files from converting an old project file to a newer
91 | # Visual Studio version. Backup files are not needed, because we have git ;-)
92 | _UpgradeReport_Files/
93 | Backup*/
94 | UpgradeLog*.XML
95 | ############
96 | ## Windows
97 | # Windows image file caches
98 | Thumbs.db
99 | # Folder config file
100 | Desktop.ini
101 | #############
102 | ## Python
103 | *.py[co]
104 | # Packages
105 | *.egg
106 | *.egg-info
107 | dist
108 | build
109 | eggs
110 | parts
111 | bin
112 | var
113 | sdist
114 | develop-eggs
115 | .installed.cfg
116 | # Installer logs
117 | pip-log.txt
118 | # Unit test / coverage reports
119 | .coverage
120 | .tox
121 | #Translations
122 | *.mo
123 | #Mr Developer
124 | .mr.developer.cfg
125 | # Mac crap
126 | .DS_Store
127 | /aread8
128 | /areadinf
129 | /d8flowdir
130 | /d8flowpathextremeup
131 | /d8hdisttostrm
132 | /dinfavalanche
133 | /dinfconclimaccum
134 | /dinfdecayaccum
135 | /dinfdistdown
136 | /dinfdistup
137 | /dinfflowdir
138 | /dinfrevaccum
139 | /dinftranslimaccum
140 | /dinfupdependence
141 | /dropanalysis
142 | /gridnet
143 | /lengtharea
144 | /moveoutletstostrm
145 | /peukerdouglas
146 | /pitremove
147 | /slopearea
148 | /slopearearatio
149 | /slopeavedown
150 | /streamnet
151 | /threshold
152 | # ignore folders related to installer
153 | WindowsInstaller/GDAL_32/
154 | WindowsInstaller/GDAL_64/
155 | WindowsInstaller/Output/
156 | WindowsInstaller/TauDEM_exe/
157 | WindowsInstaller/TauDEMArcGIS/
158 | *.msi
159 | *.exe
160 |
161 | Taudem5PCVS2015/Taudem5PC.VC.opendb
162 | *.opendb
163 | Taudem5PCVS2015/Taudem5PC.VC.db
164 | pyfiles/.idea/
165 | *.db
166 |
--------------------------------------------------------------------------------
/GCC.sh:
--------------------------------------------------------------------------------
1 | # Install gcc-7 compiler from repository. Has to be run sudo.
2 | # This was not run as a script, instead these were done by hand
3 |
4 | add-apt-repository -y ppa:ubuntu-toolchain-r/test
5 | apt update
6 | apt install -y gcc-7 g++-7
7 |
8 | # To set these as the default compilers (code from Tony https://github.com/Castronova/docker-image-build/blob/master/cuahsi/singleuser/install-taudem.sh)
9 | sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-7 --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-7 --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-7
10 | sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 10
11 |
12 | # Instructions from Tony that could be used to revert or toggle between alternatives
13 | #sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-7 --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-7 --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-7
14 | #
15 | #sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-5 --slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-5 --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-5
16 | #
17 | #sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 10
18 | #sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10
19 | #
20 | #Now, gcc-7 is the default compiler. To change back to gcc-5, you need to run :
21 | #sudo update-alternatives --config gcc
22 | #Then select gcc-5.
23 | # e.g.
24 | # echo 1 | update-alternatives --config gcc
25 | # echo 2 | update-alternatives --config gcc
26 |
--------------------------------------------------------------------------------
/GDAL.sh:
--------------------------------------------------------------------------------
1 | # Getting GDAL
2 | wget http://download.osgeo.org/gdal/2.3.0/gdal230.zip gdal230.zip
3 | unzip gdal230.zip
4 | cd gdal-2.3.0
5 | ./configure --prefix=$HOME/TauDEMDependencies/gdal
6 | make
7 | make install
8 |
9 | # The following 3 lines should also be appended to .bashrc
10 | export PATH=$HOME/TauDEMDependencies/gdal/bin:$PATH
11 | export LD_LIBRARY_PATH=$HOME/TauDEMDependencies/gdal/lib:$LD_LIBRARY_PATH
12 | export GDAL_DATA=$HOME/TauDEMDependencies/gdal/share/gdal
13 | # Test
14 | gdalinfo --version
--------------------------------------------------------------------------------
/MPICH2.sh:
--------------------------------------------------------------------------------
1 | # Script to setup MPICH
2 | wget http://www.mpich.org/static/downloads/3.2.1/mpich-3.2.1.tar.gz
3 |
4 | # Now following instructions in README
5 | tar xzf mpich-3.2.1.tar.gz
6 | mkdir mpich
7 | cd mpich-3.2.1
8 | ./configure --prefix=$HOME/TauDEMDependencies/mpich/mpich-install 2>&1 | tee c.txt
9 | make 2>&1 | tee m.txt
10 | make install 2>&1 | tee mi.txt
11 |
12 | # Add the following to .bashrc
13 | PATH=$HOME/TauDEMDependencies/mpich/mpich-install/bin:$PATH ; export PATH
--------------------------------------------------------------------------------
/Notes/GDALRasterFormats.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dtarb/TauDEM/b2b48d7df977126a08a13fa2e7e06aa69f7fc400/Notes/GDALRasterFormats.xlsx
--------------------------------------------------------------------------------
/Notes/OGRVectorFormats.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dtarb/TauDEM/b2b48d7df977126a08a13fa2e7e06aa69f7fc400/Notes/OGRVectorFormats.xlsx
--------------------------------------------------------------------------------
/README.txt:
--------------------------------------------------------------------------------
1 | TauDEM (Terrain Analysis Using Digital Elevation Models) is a suite of Digital Elevation Model (DEM) tools for the extraction and analysis of hydrologic information from topography as represented by a DEM.
2 |
3 | For more information on the development of TauDEM please refer to the wiki https://github.com/dtarb/TauDEM/wiki.
4 |
5 | For the latest release and detailed documentation please refer to the website: http://hydrology.usu.edu/taudem.
6 |
7 |
8 | Building on Linux
9 | -----------------
10 | Both make and Cmake options are available to accommodate different preferences and system demands
11 | Using make:
12 | > cd TauDEM
13 | > mkdir bin
14 | > cd src
15 | > make
16 | The executables are written to bin directory
17 |
18 | Using Cmake:
19 | > cd src && mkdir build && cd build
20 | > cmake ..
21 | > make && make install
22 | The executables are written to /usr/local/taudem directory. This can be changed at the second last line (following DESTINATION) if desired.
23 |
24 | Dependencies
25 | ------------
26 | Dependencies include GDAL, MPI and C++ 2011.
27 | On Windows Dependencies are provided in the Windows Installer
28 |
29 | On Linux dependencies can be tricky. I've added the following scripts to help, though you may need to adjust based on your system.
30 | GDAL: GDAL.sh installs from GDAL source. You could also try
31 | apt-get install gdal-bin libgdal-dev
32 | apt-get install gdal-bin=2.1.3+dfsg-1~xenial2
33 | apt-get install libmpich-dev (on Bionic 18.04 LTS) [Suggested by another user - not verified]
34 |
35 | C++: The script GCC.sh contains some commands I've used to get the required compiler.
36 |
37 | MPI: MPICH2.sh installs from mpich.org stable distribution source.
38 | sudo apt-get install openmpi-bin may also be an option, but I have not tried this.
39 |
40 | Testing
41 | -------
42 | See the repository https://github.com/dtarb/TauDEM-Test-Data for test data and scripts that exercise every function. These can also serve as examples for using some of the functions.
43 |
44 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/AreaD8/AreaD8.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {6eb98ef8-3b0c-4bd0-bc9c-5fd1c4c3659a}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | Common
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/AreaDinf/AreaDinf.idc:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/AreaDinf/AreaDinf.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {6d209b4f-2ab9-4bf9-97f0-b026d575d726}
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/AreaDinf/ClassDiagram1.cd:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/CatchHydroGeo/CatchHydroGeo.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {8066c8c3-4600-48c0-bfe1-febb8bc97c16}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/CatchOutlets/CatchOutlets.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Common
6 |
7 |
8 | Common
9 |
10 |
11 | Common
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/ConnectDown/ConnectDown.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {538eb14f-555c-4746-a7b1-3a95fb2d52d8}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/Create_Outlet/Create_Outlet.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {d41a4e39-86ca-4013-8018-11181922c1ef}
10 |
11 |
12 |
13 |
14 | Source Files
15 |
16 |
17 | Source Files
18 |
19 |
20 | Common
21 |
22 |
23 | Common
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/D8FlowDir/D8FlowDir.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {3e9222f5-da9f-4ace-bb57-f69e4db1a99b}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/D8FlowPathExtremeUp/D8FlowPathExtremeUp.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {d976b05e-cd07-4d6d-9333-bf5eacd435d6}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/D8HDistToStrm/D8HDistToStrm.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {a1ab768c-358b-4ef2-8873-f467713f3320}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/D8VDistToStrm/D8VDistToStrm.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/DinfAvalanche/DinfAvalanche.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {5198fa35-03cd-4a0d-a2a0-6a1a63c383cf}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/DinfConcLimAccum/DinfConcLimAccum.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {c2442bc5-27d0-4f3f-9384-02692ecc6043}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/DinfDecayAccum/DinfDecayAccum.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {2b01cfdf-1ca8-4897-abe3-444d6b256265}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/DinfDistDown/DinfDistDown.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {056fcfc0-facf-4eb7-9645-1c296734a746}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/DinfDistUp/DinfDistUp.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {9fe77eb0-8bf0-4986-908c-5fb15c6ede77}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/DinfFlowDir/DinfFlowDir.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {03225bae-276a-42eb-b146-b39cfc8a3c89}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/DinfRevAccum/DinfRevAccum.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {fcd50e30-874b-4212-b7a6-4a20cbc010c4}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/DinfTransLimAccum/DinfTransLimAccum.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {4ee96cb3-8567-4487-b60d-c714ef82a6bb}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/DinfUpDependence/DinfUpDependence.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7ad15e91-942e-4ec1-a9a4-a9bee614d992}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/DropAnalysis/DropAnalysis.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {092986fd-3bc2-4b60-bb67-2cfbf3bbad38}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/EditRaster/EditRaster.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7950a40e-a4de-416b-a3e8-ff247183dcb9}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/FlowDirCond/FlowdirCond.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {157053b2-c7d2-4a18-bb54-e7ce30ad0a2b}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/GageWatershed/GageWatershed.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {ddcf7342-7706-407b-b983-5d6dbbfa4fea}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/GridNet/GridNet.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {fe24d0ba-1cd8-4f09-a90e-93125e26b1eb}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/Inunmap/Inunmap.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/LengthArea/LengthArea.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {6bd4fd66-02f1-438a-a1f3-20846be04db7}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/MoveOutletsToStream/MoveOutletsToStream.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {7f607bea-8fd4-4ce8-8b5a-c134d167c81a}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/PeukerDouglas/PeukerDouglas.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {5fb2cd42-3430-4d9f-9d75-81c1b48a9d5d}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/PitRemove/PitRemove.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {0a1e01ce-fcec-4fe9-9ddd-6cb2d7c037cb}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/RetLimFlow/RetLimFlow.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Common
6 |
7 |
8 | Common
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {96b3a526-e946-4042-b9cf-f2a72ff1f772}
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/SetRegion/SetRegion.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7950a40e-a4de-416b-a3e8-ff247183dcb9}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/SinmapSI/SinmapSI.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Common
7 |
8 |
9 | Common
10 |
11 |
12 |
13 |
14 |
15 | {c3052280-7db2-4c96-bccf-d13f6687a3bb}
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/SlopeArea/SlopeArea.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7182d5ba-c8c5-497f-9d54-a911c20ee058}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/SlopeAreaRatio/SlopeAreaRatio.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {ff09ae55-16f3-4fda-a45d-d3e4eb6a6866}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/SlopeAveDown/SlopeAveDown.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {446f4938-b77d-4ec2-b622-d57333a4d5a0}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/StreamNet/StreamNet.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {f5f1c423-c511-4648-a92b-5fc5b9283454}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/TWI/TWI.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {fccbc4fa-34c1-44a7-9819-7d4caaa4c405}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/TauDEM.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "afxres.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (United States) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
20 | #pragma code_page(1252)
21 |
22 | #ifdef APSTUDIO_INVOKED
23 | /////////////////////////////////////////////////////////////////////////////
24 | //
25 | // TEXTINCLUDE
26 | //
27 |
28 | 1 TEXTINCLUDE
29 | BEGIN
30 | "resource.h\0"
31 | END
32 |
33 | 2 TEXTINCLUDE
34 | BEGIN
35 | "#include ""afxres.h""\r\n"
36 | "\0"
37 | END
38 |
39 | 3 TEXTINCLUDE
40 | BEGIN
41 | "\r\n"
42 | "\0"
43 | END
44 |
45 | #endif // APSTUDIO_INVOKED
46 |
47 |
48 | /////////////////////////////////////////////////////////////////////////////
49 | //
50 | // Version
51 | //
52 |
53 | VS_VERSION_INFO VERSIONINFO
54 | FILEVERSION 5,3,8,0
55 | PRODUCTVERSION 5,3,8,0
56 | FILEFLAGSMASK 0x17L
57 | #ifdef _DEBUG
58 | FILEFLAGS 0x1L
59 | #else
60 | FILEFLAGS 0x0L
61 | #endif
62 | FILEOS 0x4L
63 | FILETYPE 0x1L
64 | FILESUBTYPE 0x0L
65 | BEGIN
66 | BLOCK "StringFileInfo"
67 | BEGIN
68 | BLOCK "040904b0"
69 | BEGIN
70 | VALUE "FileDescription", "TauDEM Application"
71 | VALUE "FileVersion", "5.3.8.0"
72 | VALUE "InternalName", "TauDEM 5"
73 | VALUE "LegalCopyright", "Copyright (C) 2016 GPL V3"
74 | VALUE "ProductName", "TauDEM"
75 | VALUE "ProductVersion", "5.3.8.0"
76 | END
77 | END
78 | BLOCK "VarFileInfo"
79 | BEGIN
80 | VALUE "Translation", 0x409, 1200
81 | END
82 | END
83 |
84 | #endif // English (United States) resources
85 | /////////////////////////////////////////////////////////////////////////////
86 |
87 |
88 |
89 | #ifndef APSTUDIO_INVOKED
90 | /////////////////////////////////////////////////////////////////////////////
91 | //
92 | // Generated from the TEXTINCLUDE 3 resource.
93 | //
94 |
95 |
96 | /////////////////////////////////////////////////////////////////////////////
97 | #endif // not APSTUDIO_INVOKED
98 |
99 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/TauDEM_Build_Configurations/common_debug_32.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | true
7 |
8 |
9 |
10 | C:\GDAL32\include;C:\Program Files (x86)\Microsoft SDKs\MPI\Include;%(AdditionalIncludeDirectories)
11 |
12 |
13 |
14 |
15 | Level3
16 |
17 |
18 | C:\GDAL32\lib;C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86;%(AdditionalLibraryDirectories)
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/TauDEM_Build_Configurations/common_debug_64.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | true
7 |
8 |
9 |
10 | C:\GDAL\include;C:\Program Files (x86)\Microsoft SDKs\MPI\Include;%(AdditionalIncludeDirectories)
11 |
12 |
13 |
14 |
15 | Level3
16 |
17 |
18 | C:\GDAL\lib;C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64;%(AdditionalLibraryDirectories)
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/TauDEM_Build_Configurations/common_release_32.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | false
7 |
8 |
9 |
10 | C:\GDAL32\include;C:\Program Files (x86)\Microsoft SDKs\MPI\Include;%(AdditionalIncludeDirectories)
11 | Level3
12 |
13 |
14 | C:\GDAL32\lib;C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86;%(AdditionalLibraryDirectories)
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/TauDEM_Build_Configurations/common_release_64.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | false
7 |
8 |
9 |
10 | C:\GDAL\include;C:\Program Files (x86)\Microsoft SDKs\MPI\Include;%(AdditionalIncludeDirectories)
11 |
12 |
13 |
14 |
15 | Level3
16 |
17 |
18 | C:\GDAL\lib;C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64;%(AdditionalLibraryDirectories)
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/TauDEM_Build_Configurations/win32_library.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | gdal_i.lib;msmpi.lib;%(AdditionalDependencies)
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/Threshold/Threshold.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7950a40e-a4de-416b-a3e8-ff247183dcb9}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/ogrtest/ogrtest.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Taudem5PCVS2015/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by TauDEM.rc
4 | //
5 |
6 | // Next default values for new objects
7 | //
8 | #ifdef APSTUDIO_INVOKED
9 | #ifndef APSTUDIO_READONLY_SYMBOLS
10 | #define _APS_NEXT_RESOURCE_VALUE 101
11 | #define _APS_NEXT_COMMAND_VALUE 40001
12 | #define _APS_NEXT_CONTROL_VALUE 1001
13 | #define _APS_NEXT_SYMED_VALUE 101
14 | #endif
15 | #endif
16 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/AreaD8/AreaD8.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {6eb98ef8-3b0c-4bd0-bc9c-5fd1c4c3659a}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | Common
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/AreaDinf/AreaDinf.idc:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/AreaDinf/AreaDinf.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {6d209b4f-2ab9-4bf9-97f0-b026d575d726}
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/AreaDinf/ClassDiagram1.cd:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/CatchHydroGeo/CatchHydroGeo.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {8066c8c3-4600-48c0-bfe1-febb8bc97c16}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/CatchOutlets/CatchOutlets.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Common
6 |
7 |
8 | Common
9 |
10 |
11 | Common
12 |
13 |
14 |
15 |
16 |
17 |
18 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/ConnectDown/ConnectDown.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {538eb14f-555c-4746-a7b1-3a95fb2d52d8}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/Create_Outlet/Create_Outlet.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {d41a4e39-86ca-4013-8018-11181922c1ef}
10 |
11 |
12 |
13 |
14 | Source Files
15 |
16 |
17 | Source Files
18 |
19 |
20 | Common
21 |
22 |
23 | Common
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/D8FlowDir/D8FlowDir.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {3e9222f5-da9f-4ace-bb57-f69e4db1a99b}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/D8FlowPathExtremeUp/D8FlowPathExtremeUp.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {d976b05e-cd07-4d6d-9333-bf5eacd435d6}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/D8HDistToStrm/D8HDistToStrm.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {a1ab768c-358b-4ef2-8873-f467713f3320}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/D8VDistToStrm/D8VDistToStrm.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/DinfAvalanche/DinfAvalanche.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {5198fa35-03cd-4a0d-a2a0-6a1a63c383cf}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/DinfConcLimAccum/DinfConcLimAccum.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {c2442bc5-27d0-4f3f-9384-02692ecc6043}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/DinfDecayAccum/DinfDecayAccum.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {2b01cfdf-1ca8-4897-abe3-444d6b256265}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/DinfDistDown/DinfDistDown.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {056fcfc0-facf-4eb7-9645-1c296734a746}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/DinfDistUp/DinfDistUp.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {9fe77eb0-8bf0-4986-908c-5fb15c6ede77}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/DinfFlowDir/DinfFlowDir.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {03225bae-276a-42eb-b146-b39cfc8a3c89}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/DinfRevAccum/DinfRevAccum.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {fcd50e30-874b-4212-b7a6-4a20cbc010c4}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/DinfTransLimAccum/DinfTransLimAccum.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {4ee96cb3-8567-4487-b60d-c714ef82a6bb}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/DinfUpDependence/DinfUpDependence.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7ad15e91-942e-4ec1-a9a4-a9bee614d992}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/DropAnalysis/DropAnalysis.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {092986fd-3bc2-4b60-bb67-2cfbf3bbad38}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/EditRaster/EditRaster.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7950a40e-a4de-416b-a3e8-ff247183dcb9}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/FlowDirCond/FlowdirCond.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {157053b2-c7d2-4a18-bb54-e7ce30ad0a2b}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/GageWatershed/GageWatershed.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {ddcf7342-7706-407b-b983-5d6dbbfa4fea}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/GridNet/GridNet.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {fe24d0ba-1cd8-4f09-a90e-93125e26b1eb}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/Inunmap/Inunmap.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/LengthArea/LengthArea.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {6bd4fd66-02f1-438a-a1f3-20846be04db7}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/MoveOutletsToStream/MoveOutletsToStream.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {7f607bea-8fd4-4ce8-8b5a-c134d167c81a}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/PeukerDouglas/PeukerDouglas.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {5fb2cd42-3430-4d9f-9d75-81c1b48a9d5d}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/PitRemove/PitRemove.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {0a1e01ce-fcec-4fe9-9ddd-6cb2d7c037cb}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/RetLimFlow/RetLimFlow.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Common
6 |
7 |
8 | Common
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {96b3a526-e946-4042-b9cf-f2a72ff1f772}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/SetRegion/SetRegion.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7950a40e-a4de-416b-a3e8-ff247183dcb9}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/SinmapSI/SinmapSI.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Common
7 |
8 |
9 | Common
10 |
11 |
12 |
13 |
14 |
15 | {c3052280-7db2-4c96-bccf-d13f6687a3bb}
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/SlopeArea/SlopeArea.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7182d5ba-c8c5-497f-9d54-a911c20ee058}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/SlopeAreaRatio/SlopeAreaRatio.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {ff09ae55-16f3-4fda-a45d-d3e4eb6a6866}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/SlopeAveDown/SlopeAveDown.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {446f4938-b77d-4ec2-b622-d57333a4d5a0}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/StreamNet/StreamNet.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 | {f5f1c423-c511-4648-a92b-5fc5b9283454}
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/TWI/TWI.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Common
8 |
9 |
10 | Common
11 |
12 |
13 |
14 |
15 | {fccbc4fa-34c1-44a7-9819-7d4caaa4c405}
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/TauDEM.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "afxres.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (United States) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
20 | #pragma code_page(1252)
21 |
22 | #ifdef APSTUDIO_INVOKED
23 | /////////////////////////////////////////////////////////////////////////////
24 | //
25 | // TEXTINCLUDE
26 | //
27 |
28 | 1 TEXTINCLUDE
29 | BEGIN
30 | "resource.h\0"
31 | END
32 |
33 | 2 TEXTINCLUDE
34 | BEGIN
35 | "#include ""afxres.h""\r\n"
36 | "\0"
37 | END
38 |
39 | 3 TEXTINCLUDE
40 | BEGIN
41 | "\r\n"
42 | "\0"
43 | END
44 |
45 | #endif // APSTUDIO_INVOKED
46 |
47 |
48 | /////////////////////////////////////////////////////////////////////////////
49 | //
50 | // Version
51 | //
52 |
53 | VS_VERSION_INFO VERSIONINFO
54 | FILEVERSION 5,3,8,0
55 | PRODUCTVERSION 5,3,8,0
56 | FILEFLAGSMASK 0x17L
57 | #ifdef _DEBUG
58 | FILEFLAGS 0x1L
59 | #else
60 | FILEFLAGS 0x0L
61 | #endif
62 | FILEOS 0x4L
63 | FILETYPE 0x1L
64 | FILESUBTYPE 0x0L
65 | BEGIN
66 | BLOCK "StringFileInfo"
67 | BEGIN
68 | BLOCK "040904b0"
69 | BEGIN
70 | VALUE "FileDescription", "TauDEM Application"
71 | VALUE "FileVersion", "5.3.8.0"
72 | VALUE "InternalName", "TauDEM 5"
73 | VALUE "LegalCopyright", "Copyright (C) 2016 GPL V3"
74 | VALUE "ProductName", "TauDEM"
75 | VALUE "ProductVersion", "5.3.8.0"
76 | END
77 | END
78 | BLOCK "VarFileInfo"
79 | BEGIN
80 | VALUE "Translation", 0x409, 1200
81 | END
82 | END
83 |
84 | #endif // English (United States) resources
85 | /////////////////////////////////////////////////////////////////////////////
86 |
87 |
88 |
89 | #ifndef APSTUDIO_INVOKED
90 | /////////////////////////////////////////////////////////////////////////////
91 | //
92 | // Generated from the TEXTINCLUDE 3 resource.
93 | //
94 |
95 |
96 | /////////////////////////////////////////////////////////////////////////////
97 | #endif // not APSTUDIO_INVOKED
98 |
99 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/TauDEM_Build_Configurations/common_debug_32.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | true
7 |
8 |
9 |
10 | C:\GDAL32\include;C:\Program Files (x86)\Microsoft SDKs\MPI\Include;%(AdditionalIncludeDirectories)
11 |
12 |
13 |
14 |
15 | Level3
16 |
17 |
18 | C:\GDAL32\lib;C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86;%(AdditionalLibraryDirectories)
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/TauDEM_Build_Configurations/common_debug_64.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | true
7 |
8 |
9 |
10 | C:\GDAL\include;C:\Program Files (x86)\Microsoft SDKs\MPI\Include;%(AdditionalIncludeDirectories)
11 |
12 |
13 |
14 |
15 | Level3
16 |
17 |
18 | C:\GDAL\lib;C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64;%(AdditionalLibraryDirectories)
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/TauDEM_Build_Configurations/common_release_32.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | false
7 |
8 |
9 |
10 | C:\GDAL32\include;C:\Program Files (x86)\Microsoft SDKs\MPI\Include;%(AdditionalIncludeDirectories)
11 | Level3
12 |
13 |
14 | C:\GDAL32\lib;C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86;%(AdditionalLibraryDirectories)
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/TauDEM_Build_Configurations/common_release_64.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | false
7 |
8 |
9 |
10 | C:\GDAL\include;C:\Program Files (x86)\Microsoft SDKs\MPI\Include;%(AdditionalIncludeDirectories)
11 |
12 |
13 |
14 |
15 | Level3
16 |
17 |
18 | C:\GDAL\lib;C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64;%(AdditionalLibraryDirectories)
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/TauDEM_Build_Configurations/win32_library.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | gdal_i.lib;msmpi.lib;%(AdditionalDependencies)
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/Threshold/Threshold.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {7950a40e-a4de-416b-a3e8-ff247183dcb9}
6 |
7 |
8 |
9 |
10 | Common
11 |
12 |
13 | Common
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/ogrtest/ogrtest.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Taudem5PCVS2019/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by TauDEM.rc
4 | //
5 |
6 | // Next default values for new objects
7 | //
8 | #ifdef APSTUDIO_INVOKED
9 | #ifndef APSTUDIO_READONLY_SYMBOLS
10 | #define _APS_NEXT_RESOURCE_VALUE 101
11 | #define _APS_NEXT_COMMAND_VALUE 40001
12 | #define _APS_NEXT_CONTROL_VALUE 1001
13 | #define _APS_NEXT_SYMED_VALUE 101
14 | #endif
15 | #endif
16 |
--------------------------------------------------------------------------------
/UpdateNotes.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dtarb/TauDEM/b2b48d7df977126a08a13fa2e7e06aa69f7fc400/UpdateNotes.txt
--------------------------------------------------------------------------------
/Utilities/DEMVerifier/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile to compile demverifier.c
2 |
3 | CC=cc
4 | LIBS=-lgdal
5 |
6 | pitremove_verifier: demverifier.c
7 | $(CC) demverifier.c $(LIBS) -o demverifier
8 |
9 | clean:
10 | rm -f demverifier
11 |
12 |
--------------------------------------------------------------------------------
/Utilities/DEMVerifier/demverifier.c:
--------------------------------------------------------------------------------
1 | /*
2 | ============================================================================
3 | Name : demverifier.c
4 | Author : Ahmet Yildirim
5 | Version : 1.0
6 | Description : Checks the elevation differences between two DEM files and reports the result.
7 | ============================================================================
8 | */
9 |
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 |
18 | /* maximum elevation difference between two cells to be regarded as an "error" */
19 | const float error = 0.000000000001f;
20 |
21 | float* get_tif_data(char* tif_file, int* tif_width, int* tif_height) {
22 | GDALDatasetH hDataset;
23 |
24 | hDataset = GDALOpen(tif_file, GA_ReadOnly);
25 | if (hDataset == NULL ) {
26 | fprintf(stderr, "ERROR: Failed to open the file %s\n", tif_file);
27 | return NULL ;
28 | }
29 | GDALRasterBandH hBand;
30 |
31 | hBand = GDALGetRasterBand(hDataset, 1);
32 | int width1 = GDALGetRasterXSize(hDataset);
33 | int height1 = GDALGetRasterYSize(hDataset);
34 | double nodata1 = GDALGetRasterNoDataValue(hBand, NULL );
35 |
36 | float* data = (float *) CPLMalloc(sizeof(float) * width1 * height1);
37 | if (!data) {
38 | fprintf(stderr, "ERROR: Failed to allocate data of size %d \n", width1 * height1);
39 | return NULL;
40 | }
41 | GDALRasterIO(hBand, GF_Read, 0, 0, width1, height1, data, width1, height1,
42 | GDT_Float32, 0, 0);
43 |
44 | *tif_width = width1;
45 | *tif_height = height1;
46 | return data;
47 | }
48 |
49 | int compare_tiffs(char* tif_file1, char* tif_file2) {
50 | GDALAllRegister();
51 | int tif_width1, tif_height1;
52 | int tif_width2, tif_height2;
53 |
54 | float* data1 = get_tif_data(tif_file1, &tif_width1, &tif_height1);
55 | if (!data1)
56 | return 1;
57 |
58 | float* data2 = get_tif_data(tif_file2, &tif_width2, &tif_height2);
59 | if (!data2)
60 | return 1;
61 |
62 | if ((tif_width1 != tif_width2) || (tif_height1 != tif_height2)) {
63 | fprintf(stderr, "ERROR: Resolutions is not matching\n");
64 | return 1;
65 | }
66 |
67 | int x, y;
68 | int insdetected = 0;
69 | float d1, d2;
70 | for (y = 0; y < tif_height1; y++) {
71 | for (x = 0; x < tif_width1; x++) {
72 | d1 = data1[y * tif_width1 + x];
73 | d2 = data2[y * tif_width1 + x];
74 |
75 | if (abs(d1 - d2) > error) {
76 | printf("Inconsistency detected at x:%d, y:%d\n", x, y);
77 | printf("Data1: %f, Data2: %f\n", d1, d2);
78 | insdetected = 1;
79 | }
80 | }
81 | }
82 |
83 | free(data1);
84 | free(data2);
85 |
86 | if (insdetected == 0)
87 | printf("No inconsistency detected!\n");
88 |
89 | return 0;
90 | }
91 |
92 | int main(int argc, char* argv[]) {
93 | if (argc != 3) {
94 | printf("USAGE: program firstdemfilepath seconddemfilepath\n");
95 | return 1;
96 | }
97 |
98 | return compare_tiffs(argv[1], argv[2]);
99 | }
100 |
--------------------------------------------------------------------------------
/WindowsInstaller/taudem.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dtarb/TauDEM/b2b48d7df977126a08a13fa2e7e06aa69f7fc400/WindowsInstaller/taudem.bmp
--------------------------------------------------------------------------------
/license.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) 2014 David Tarboton, Utah State University
2 |
3 | This program is free software; you can redistribute it and/or
4 | modify it under the terms of the GNU General Public License
5 | version 3, 2007 as published by the Free Software Foundation.
6 |
7 | This program is distributed in the hope that it will be useful,
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 | GNU General Public License for more details.
11 |
12 | A copy of the full GNU General Public License is included in file
13 | GPLv3license.txt. This is also available at:
14 | http://www.gnu.org/copyleft/gpl.html.
15 |
16 | TauDEM may also be available under alternative licenses (multi licensing model).
17 | This is so that it may be sold or licensed for use in proprietary applications.
18 | If you wish to use or incorporate this program (or parts of it) into
19 | other software that does not meet the GNU General Public License
20 | conditions contact the author to discuss a licensing agreement.
21 | David G. Tarboton
22 | Utah State University
23 | 8200 Old Main Hill
24 | Logan, UT 84322-8200
25 | USA
26 | http://www.engineering.usu.edu/dtarb/
27 | email: dtarb@usu.edu
28 |
29 | If you contribute code to this repository you grant permission for the copyright for
30 | the code you contribute to be assigned to David Tarboton, Utah State University and
31 | distributed according to the GPL license above and any other licensing agreement that
32 | he may choose.
33 |
--------------------------------------------------------------------------------
/pyfiles/ArcGISParameterRegionTool.py:
--------------------------------------------------------------------------------
1 | # created by: Pabitra Dash
2 |
3 | import arcpy
4 | import os
5 | import subprocess
6 |
7 | # get the input parameters
8 | dem_grid = arcpy.GetParameterAsText(0)
9 | desc = arcpy.Describe(dem_grid)
10 | dem_grid = str(desc.catalogPath)
11 |
12 | # parameter 1 is the region creation option - ignore this parameter
13 |
14 | region_grid = arcpy.GetParameterAsText(2)
15 | if arcpy.Exists(region_grid):
16 | desc = arcpy.Describe(region_grid)
17 | region_grid = str(desc.catalogPath)
18 |
19 | region_feature_class = arcpy.GetParameterAsText(3)
20 | if arcpy.Exists(region_feature_class):
21 | desc = arcpy.Describe(region_feature_class)
22 | region_feature_class = str(desc.catalogPath)
23 |
24 | region_feature_class_selected_attribute = arcpy.GetParameterAsText(4)
25 | output_region_grid = arcpy.GetParameterAsText(5)
26 | calibration_table_text_file = arcpy.GetParameterAsText(6)
27 |
28 | # construct command to execute
29 | current_script_dir = os.path.dirname(os.path.realpath(__file__))
30 | # put quotes around file paths in case they have spaces
31 | dem_grid = '"' + dem_grid + '"'
32 | if len(region_grid) > 0:
33 | region_grid = '"' + region_grid + '"'
34 |
35 | if len(region_feature_class) > 0:
36 | region_feature_class = '"' + region_feature_class + '"'
37 |
38 | output_region_grid = '"' + output_region_grid + '"'
39 | calibration_table_text_file = '"' + calibration_table_text_file + '"'
40 |
41 | py_script_to_execute = os.path.join(current_script_dir, 'SIRegionTool.py')
42 | py_script_to_execute = '"' + py_script_to_execute + '"'
43 | cmd = py_script_to_execute + \
44 | ' --dem ' + dem_grid + \
45 | ' --parreg ' + output_region_grid + \
46 | ' --att ' + calibration_table_text_file
47 |
48 | if len(region_grid) > 0:
49 | cmd += ' --parreg-in ' + region_grid
50 |
51 | if len(region_feature_class) > 0:
52 | cmd += ' --shp ' + region_feature_class
53 | cmd += ' --shp-att-name ' + region_feature_class_selected_attribute
54 |
55 | # show executing command
56 | arcpy.AddMessage('\nEXECUTING COMMAND:\n' + cmd)
57 |
58 | # Capture the contents of shell command and print it to the arcgis dialog box
59 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
60 | arcpy.AddMessage('\nProcess started:\n')
61 | start_message = "Please wait. It may take few seconds. Computation is in progress ..."
62 | arcpy.AddMessage(start_message)
63 | for line in process.stdout.readlines():
64 | if isinstance(line, bytes): # true in Python 3
65 | line = line.decode()
66 | if start_message not in line:
67 | arcpy.AddMessage(line)
68 |
--------------------------------------------------------------------------------
/pyfiles/ArcGISStabilityIndex.py:
--------------------------------------------------------------------------------
1 | # Created by: Pabitra Dash
2 |
3 | import os
4 | import subprocess
5 |
6 | import arcpy
7 |
8 | # get the input parameters
9 | slp_raster_file = arcpy.GetParameterAsText(0)
10 | desc = arcpy.Describe(slp_raster_file)
11 | slp_raster_file = str(desc.catalogPath)
12 |
13 | sca_raster_file = arcpy.GetParameterAsText(1)
14 | desc = arcpy.Describe(sca_raster_file)
15 | sca_raster_file = str(desc.catalogPath)
16 |
17 | cal_raster_file = arcpy.GetParameterAsText(2)
18 | desc = arcpy.Describe(cal_raster_file)
19 | cal_raster_file = str(desc.catalogPath)
20 |
21 | capl_text_file = arcpy.GetParameterAsText(3)
22 | min_terr_recharge = arcpy.GetParameterAsText(4)
23 | max_terr_recharge = arcpy.GetParameterAsText(5)
24 | si_raster_file = arcpy.GetParameterAsText(6)
25 | sat_raster_file = arcpy.GetParameterAsText(7)
26 | temp_output_files_directory = arcpy.GetParameterAsText(8)
27 | is_delete_intermediate_output_files = arcpy.GetParameterAsText(9)
28 |
29 | # create the cis_inputs.txt file from the provided above parameters
30 | this_script_dir = os.path.dirname(os.path.realpath(__file__))
31 |
32 | si_control_file = os.path.join(temp_output_files_directory, 'Si_Control.txt')
33 | si_control_file = r'' + si_control_file
34 |
35 | with open(si_control_file, 'w') as file_obj:
36 | file_obj.write('# input parameters for combined stability index computation with road impact\n')
37 | file_obj.write('# input files\n')
38 | file_obj.write('slp=' + slp_raster_file + '\n')
39 | file_obj.write('sca=' + sca_raster_file + '\n')
40 | file_obj.write('cal=' + cal_raster_file + '\n')
41 | file_obj.write('calpar=' + capl_text_file + '\n')
42 |
43 | file_obj.write('# output files\n')
44 | file_obj.write('si=' + si_raster_file + '\n')
45 | file_obj.write('sat=' + sat_raster_file + '\n')
46 |
47 | file_obj.write('# Additional parameters' + '\n')
48 | file_obj.write('minimumterrainrecharge=' + min_terr_recharge + '\n')
49 | file_obj.write('maximumterrainrecharge=' + max_terr_recharge + '\n')
50 | file_obj.write('# temporary output file directory\n')
51 | file_obj.write('temporary_output_files_directory=' + temp_output_files_directory + '\n')
52 | if str(is_delete_intermediate_output_files) == 'true':
53 | file_obj.write('is_delete_intermediate_output_files=True\n')
54 | else:
55 | file_obj.write('is_delete_intermediate_output_files=False\n')
56 |
57 | # put quotes around file paths in case they have spaces
58 | si_control_file = '"' + si_control_file + '"'
59 | py_script_to_execute = os.path.join(this_script_dir, 'StabilityIndex.py')
60 | py_script_to_execute = '"' + py_script_to_execute + '"'
61 | cmd = py_script_to_execute + \
62 | ' --params ' + si_control_file
63 |
64 | # show executing command
65 | arcpy.AddMessage('\nEXECUTING COMMAND:\n' + cmd)
66 |
67 | # Capture the contents of shell command and print it to the arcgis dialog box
68 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
69 | arcpy.AddMessage('\nProcess started:\n')
70 | start_message = "Please wait a few seconds. Computation is in progress ..."
71 | arcpy.AddMessage('\n' + start_message + '\n')
72 | for line in process.stdout.readlines():
73 | if isinstance(line, bytes): # true in Python 3
74 | line = line.decode()
75 |
76 | if start_message not in line:
77 | arcpy.AddMessage(line)
78 |
--------------------------------------------------------------------------------
/pyfiles/ConectDown.py:
--------------------------------------------------------------------------------
1 | # Script Name: ConnectDown
2 | #
3 | # Created By: Nazmus Sazib
4 | # Date: 11/16/2015
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | p=str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D8 Flow Direction Grid: " + p)
16 | coord_sys = desc.spatialReference
17 | arcpy.AddMessage("Spatial Reference: " + str(coord_sys.name))
18 |
19 | inlyr1 = arcpy.GetParameterAsText(1)
20 | desc = arcpy.Describe(inlyr1)
21 | ad8 = str(desc.catalogPath)
22 | arcpy.AddMessage("Input D8Contributing Area Grid: " + ad8)
23 |
24 | inlyr2 = arcpy.GetParameterAsText(2)
25 | desc = arcpy.Describe(inlyr2)
26 | ws = str(desc.catalogPath)
27 | arcpy.AddMessage("Input Watershed Grid: " + ws)
28 |
29 | mvdistance = arcpy.GetParameterAsText(3)
30 | arcpy.AddMessage("Number of Grid cell: " + mvdistance)
31 |
32 | # Input Number of Processes
33 | inputProc = arcpy.GetParameterAsText(4)
34 | arcpy.AddMessage("Input Number of Processes: " + inputProc)
35 |
36 | # Output
37 | om = arcpy.GetParameterAsText(5)
38 | arcpy.AddMessage("Output Outlet file: "+om)
39 |
40 | # Output
41 | omd = arcpy.GetParameterAsText(6)
42 | arcpy.AddMessage("Output MovedOutlet file: "+omd)
43 |
44 | # Construct command
45 | cmd = 'mpiexec -n ' + inputProc + ' ConnectDown -p ' + '"' + p + '"' + ' -ad8 ' + '"' + \
46 | ad8 + '"' + ' -w ' + '"' + ws + '"' + ' -o ' + '"' + om + '"' + ' -od ' + '"' + omd + '"' + ' -d ' + mvdistance
47 |
48 | arcpy.AddMessage("\nCommand Line: "+cmd)
49 |
50 | # Submit command to operating system
51 | os.system(cmd)
52 |
53 | # Capture the contents of shell command and print it to the arcgis dialog box
54 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
55 |
56 | message = "\n"
57 | for line in process.stdout.readlines():
58 | if isinstance(line, bytes): # true in Python 3
59 | line = line.decode()
60 | message = message + line
61 | arcpy.AddMessage(message)
62 |
63 |
64 |
--------------------------------------------------------------------------------
/pyfiles/D8DistanceToStreams.py:
--------------------------------------------------------------------------------
1 | # Script Name: D8DistanceToStreams
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | p = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D8 Flow Direction Grid: " + p)
16 |
17 | inlyr1 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr1)
19 | src = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Stream Raster Grid: " + src)
21 |
22 | thresh = arcpy.GetParameterAsText(2)
23 | arcpy.AddMessage("Threshold: " + thresh)
24 |
25 | # Input Number of Processes
26 | inputProc = arcpy.GetParameterAsText(3)
27 | arcpy.AddMessage("Number of Processes: " + inputProc)
28 |
29 | # Output
30 | dist = arcpy.GetParameterAsText(4)
31 | arcpy.AddMessage("Output Distance To Streams: " + dist)
32 |
33 | # Construct command
34 | cmd = 'mpiexec -n ' + inputProc + ' D8HDistToStrm -p ' + '"' + p + '"' + ' -src ' + '"' + src + '"' + \
35 | ' -dist ' + '"' + dist + '"' + ' -thresh ' + thresh
36 |
37 | arcpy.AddMessage("\nCommand Line: "+cmd)
38 |
39 | # Submit command to operating system
40 | os.system(cmd)
41 |
42 | # Capture the contents of shell command and print it to the arcgis dialog box
43 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
44 |
45 | message = "\n"
46 | for line in process.stdout.readlines():
47 | if isinstance(line, bytes): # true in Python 3
48 | line = line.decode()
49 | message = message + line
50 | arcpy.AddMessage(message)
51 |
52 | # Calculate statistics on the output so that it displays properly
53 | arcpy.AddMessage('Calculate Statistics\n')
54 | arcpy.CalculateStatistics_management(dist)
55 |
--------------------------------------------------------------------------------
/pyfiles/D8ExtremeUpslope.py:
--------------------------------------------------------------------------------
1 | # Script Name: D8ExtremeUpslope
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | p = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D8 Flow Direction Grid: " + p)
16 |
17 | inlyr2 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr2)
19 | sa = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Value Grid: " + sa)
21 |
22 | maximumupslope = arcpy.GetParameterAsText(2)
23 | arcpy.AddMessage("Maximum Upslope: " + maximumupslope)
24 |
25 | edgecontamination = arcpy.GetParameterAsText(3)
26 | arcpy.AddMessage("Edge Contamination: " + edgecontamination)
27 |
28 | ogrfile=arcpy.GetParameterAsText(4)
29 | if arcpy.Exists(ogrfile):
30 | desc = arcpy.Describe(ogrfile)
31 | shfl1 = str(desc.catalogPath)
32 | extn = os.path.splitext(shfl1)[1] # get extension of a file
33 |
34 | # if extention is shapfile do not convert into gjson other wise convert
35 | if extn == ".shp":
36 | shfl = shfl1
37 | else:
38 | arcpy.AddMessage("Extracting json outlet file from: " + shfl1)
39 | basename = os.path.basename(shfl1) # get last part of the path
40 | dirname = os.path.dirname(p) # get directory
41 | arcpy.env.workspace = dirname # does not work without specifying the workspace
42 | arcpy.FeaturesToJSON_conversion(shfl1,basename + ".json") # convert feature to json
43 | shfl = os.path.join(dirname,basename + ".json")
44 | arcpy.AddMessage("Using Outlets file: " + shfl)
45 |
46 | # Input Number of Processes
47 | inputProc = arcpy.GetParameterAsText(5)
48 | arcpy.AddMessage("Number of Processes: " + inputProc)
49 |
50 | # Output
51 | ssa = arcpy.GetParameterAsText(6)
52 | arcpy.AddMessage("Output Extreme Value Grid: " + ssa)
53 |
54 | # Construct command
55 | cmd = 'mpiexec -n ' + inputProc + ' D8FlowPathExtremeUp -p ' + '"' + p + '"' + ' -sa ' + '"' + sa + '"' + \
56 | ' -ssa ' + '"' + ssa + '"'
57 | if arcpy.Exists(ogrfile):
58 | cmd = cmd + ' -o ' + '"' + shfl + '"'
59 | if maximumupslope == 'false':
60 | cmd = cmd + ' -min '
61 | if edgecontamination == 'false':
62 | cmd = cmd + ' -nc '
63 |
64 | arcpy.AddMessage("\nCommand Line: "+cmd)
65 |
66 | # Submit command to operating system
67 | os.system(cmd)
68 |
69 | # Capture the contents of shell command and print it to the arcgis dialog box
70 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
71 |
72 | message = "\n"
73 | for line in process.stdout.readlines():
74 | if isinstance(line, bytes): # true in Python 3
75 | line = line.decode()
76 | message = message + line
77 | arcpy.AddMessage(message)
78 |
79 | # Calculate statistics on the output so that it displays properly
80 | arcpy.AddMessage('Calculate Statistics\n')
81 | arcpy.CalculateStatistics_management(ssa)
82 | # remove converted json file
83 | extn_json = os.path.splitext(shfl)[1] # get extension of the converted json file
84 | if extn_json == ".json":
85 | os.remove(shfl)
86 |
--------------------------------------------------------------------------------
/pyfiles/D8FlowDirection.py:
--------------------------------------------------------------------------------
1 | # Script Name: D8FlowDirection
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/22/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Input
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | fel = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Pit Filled Elevation file: " + fel)
16 |
17 | # Input Number of Processes
18 | inputProc = arcpy.GetParameterAsText(1)
19 | arcpy.AddMessage(" Number of Processes: " + inputProc)
20 |
21 | # Outputs
22 | p = arcpy.GetParameterAsText(2)
23 | arcpy.AddMessage("Output D8 Flow Direction File: " + p)
24 | sd8 = arcpy.GetParameterAsText(3)
25 | arcpy.AddMessage("Output D8 Slope File: " + sd8)
26 |
27 | # Construct command
28 | cmd = 'mpiexec -n ' + inputProc + ' D8FlowDir -fel ' + '"' + fel + '"' + ' -p ' + '"' + p + '"' + \
29 | ' -sd8 ' + '"' + sd8 + '"'
30 | arcpy.AddMessage("\nCommand Line: " + cmd)
31 |
32 | # Submit command to operating system
33 | os.system(cmd)
34 |
35 | # Capture the contents of shell command and print it to the arcgis dialog box
36 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
37 |
38 | message = "\n"
39 | for line in process.stdout.readlines():
40 | if isinstance(line, bytes): # true in Python 3
41 | line = line.decode()
42 | message = message + line
43 | arcpy.AddMessage(message)
44 |
45 | # Calculate statistics on the output so that it displays properly
46 | arcpy.AddMessage('Calculate Statistics\n')
47 | arcpy.CalculateStatistics_management(p)
48 | arcpy.CalculateStatistics_management(sd8)
49 |
--------------------------------------------------------------------------------
/pyfiles/DinfAvalancheRunout.py:
--------------------------------------------------------------------------------
1 | # Script Name: DinfAvalancheRunout
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | fel = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Pit Filled Elevation Grid: " + fel)
16 |
17 | inlyr1 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr1)
19 | ang = str(desc.catalogPath)
20 | arcpy.AddMessage("Input D-Infinity Flow Direction Grid: " + ang)
21 |
22 | inlyr2 = arcpy.GetParameterAsText(2)
23 | desc = arcpy.Describe(inlyr2)
24 | ass = str(desc.catalogPath)
25 | arcpy.AddMessage("Input Avalanche Source Site Grid: " + ass)
26 |
27 | propthresh = arcpy.GetParameterAsText(3)
28 | arcpy.AddMessage("Input Proportion Threshold: " + propthresh)
29 |
30 | alphthresh = arcpy.GetParameterAsText(4)
31 | arcpy.AddMessage("Input Alpha Angle Threshold: " + alphthresh)
32 |
33 | pathdistance = arcpy.GetParameterAsText(5)
34 | arcpy.AddMessage("Path Distance Method: " + pathdistance)
35 |
36 | # Input Number of Processes
37 | inputProc = arcpy.GetParameterAsText(6)
38 | arcpy.AddMessage("Number of Processes: " + inputProc)
39 |
40 | # Output
41 | rz = arcpy.GetParameterAsText(7)
42 | arcpy.AddMessage("Output Runout Zone Grid: " + rz)
43 |
44 | dfs = arcpy.GetParameterAsText(8)
45 | arcpy.AddMessage("Output Path Distance Grid: " + dfs)
46 |
47 | # Construct command
48 | cmd = 'mpiexec -n ' + inputProc + ' DinfAvalanche -fel ' + '"' + fel + '"' + ' -ang ' + '"' + ang + '"' + \
49 | ' -ass ' + '"' + ass + '"' + ' -rz ' + '"' + rz + '"' + ' -dfs ' + '"' + dfs + '"' + ' -thresh ' + \
50 | propthresh + ' -alpha ' + alphthresh
51 | if pathdistance == 'Straight Line':
52 | cmd = cmd + ' -direct '
53 |
54 | arcpy.AddMessage("\nCommand Line: " + cmd)
55 |
56 | # Submit command to operating system
57 | os.system(cmd)
58 |
59 | # Capture the contents of shell command and print it to the arcgis dialog box
60 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
61 |
62 | message = "\n"
63 | for line in process.stdout.readlines():
64 | if isinstance(line, bytes): # true in Python 3
65 | line = line.decode()
66 | message = message + line
67 | arcpy.AddMessage(message)
68 |
69 | # Calculate statistics on the output so that it displays properly
70 | arcpy.AddMessage('Calculate Statistics\n')
71 | arcpy.CalculateStatistics_management(rz)
72 | arcpy.CalculateStatistics_management(dfs)
73 |
--------------------------------------------------------------------------------
/pyfiles/DinfDecayingAccumulation.py:
--------------------------------------------------------------------------------
1 | # Script Name: DinfDecayingAccumulation
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | ang = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D-Infinity Flow Direction Grid: " + ang)
16 |
17 | decaymultiplier = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(decaymultiplier)
19 | dm = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Decay Multiplier Grid: " + dm)
21 |
22 | weightgrid = arcpy.GetParameterAsText(2)
23 | if arcpy.Exists(weightgrid):
24 | desc = arcpy.Describe(weightgrid)
25 | wg = str(desc.catalogPath)
26 | arcpy.AddMessage("Input Weight Grid: " + wg)
27 |
28 | ogrfile = arcpy.GetParameterAsText(3)
29 | if arcpy.Exists(ogrfile):
30 | desc = arcpy.Describe(ogrfile)
31 | shfl1 = str(desc.catalogPath)
32 | extn = os.path.splitext(shfl1)[1] # get extension of a file
33 | # if extention is shapfile do not convert into gjson other wise convert
34 | if extn == ".shp":
35 | shfl = shfl1
36 | else:
37 | arcpy.AddMessage("Extracting json outlet file from: " + shfl1)
38 | basename = os.path.basename(shfl1) # get last part of the path
39 | dirname = os.path.dirname(ang) # get directory
40 | arcpy.env.workspace = dirname # does not work without specifying the workspace
41 | arcpy.FeaturesToJSON_conversion(shfl1, basename + ".json") # convert feature to json
42 | shfl = os.path.join(dirname, basename + ".json")
43 | arcpy.AddMessage("Using Outlets file: " + shfl)
44 |
45 | edgecontamination = arcpy.GetParameterAsText(4)
46 | arcpy.AddMessage("Edge Contamination: " + edgecontamination)
47 |
48 | # Input Number of Processes
49 | inputProc = arcpy.GetParameterAsText(5)
50 | arcpy.AddMessage("Number of Processes: " + inputProc)
51 |
52 | # Output
53 | dsca = arcpy.GetParameterAsText(6)
54 | arcpy.AddMessage("Output Decayed Specific Catchment Area Grid: " + dsca)
55 |
56 | # Construct command
57 | cmd = 'mpiexec -n ' + inputProc + ' DinfDecayAccum -ang ' + '"' + ang + '"' + ' -dsca ' + '"' + dsca + \
58 | '"' + ' -dm ' + '"' + dm + '"'
59 | if arcpy.Exists(ogrfile):
60 | cmd = cmd + ' -o ' + '"' + shfl + '"'
61 | if arcpy.Exists(weightgrid):
62 | cmd = cmd + ' -wg ' + '"' + wg + '"'
63 | if edgecontamination == 'false':
64 | cmd = cmd + ' -nc '
65 |
66 | arcpy.AddMessage("\nCommand Line: " + cmd)
67 |
68 | # Submit command to operating system
69 | os.system(cmd)
70 |
71 | # Capture the contents of shell command and print it to the arcgis dialog box
72 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
73 |
74 | message = "\n"
75 | for line in process.stdout.readlines():
76 | if isinstance(line, bytes): # true in Python 3
77 | line = line.decode()
78 | message = message + line
79 | arcpy.AddMessage(message)
80 |
81 | # Calculate statistics on the output so that it displays properly
82 | arcpy.AddMessage('Calculate Statistics\n')
83 | arcpy.CalculateStatistics_management(dsca)
84 | # remove converted json file
85 | if arcpy.Exists(ogrfile):
86 | extn_json = os.path.splitext(shfl)[1] # get extension of the converted json file
87 | if extn_json == ".json":
88 | os.remove(shfl)
89 |
--------------------------------------------------------------------------------
/pyfiles/DinfDistDown.py:
--------------------------------------------------------------------------------
1 | # Script Name: DinfDistDown
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | ang = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D-Infinity Flow Direction Grid: " + ang)
16 |
17 | inlyr1 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr1)
19 | fel = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Pit Filled Elevation Grid: " + fel)
21 |
22 | inlyr2 = arcpy.GetParameterAsText(2)
23 | desc = arcpy.Describe(inlyr2)
24 | src = str(desc.catalogPath)
25 | arcpy.AddMessage("Input Stream Raster Grid: " + src)
26 |
27 | statisticalmethod = arcpy.GetParameterAsText(3)
28 | arcpy.AddMessage("Statistical Method: " + statisticalmethod)
29 |
30 | distancemethod = arcpy.GetParameterAsText(4)
31 | arcpy.AddMessage("Distance Method: " + distancemethod)
32 |
33 | edgecontamination = arcpy.GetParameterAsText(5)
34 | arcpy.AddMessage("Edge Contamination: " + edgecontamination)
35 |
36 | weightgrid = arcpy.GetParameterAsText(6)
37 | if arcpy.Exists(weightgrid):
38 | desc = arcpy.Describe(weightgrid)
39 | wg = str(desc.catalogPath)
40 | arcpy.AddMessage("Input Weight Path Grid: " + wg)
41 |
42 | # Input Number of Processes
43 | inputProc = arcpy.GetParameterAsText(7)
44 | arcpy.AddMessage("Number of Processes: " + inputProc)
45 |
46 | # Output
47 | dd = arcpy.GetParameterAsText(8)
48 | arcpy.AddMessage("Output D-Infinity Drop to Stream Grid: " + dd)
49 |
50 | # Construct command
51 | if statisticalmethod == 'Average':
52 | statmeth = 'ave'
53 | if statisticalmethod == 'Maximum':
54 | statmeth = 'max'
55 | if statisticalmethod == 'Minimum':
56 | statmeth = 'min'
57 | if distancemethod == 'Horizontal':
58 | distmeth = 'h'
59 | if distancemethod == 'Vertical':
60 | distmeth = 'v'
61 | if distancemethod == 'Pythagoras':
62 | distmeth = 'p'
63 | if distancemethod == 'Surface':
64 | distmeth = 's'
65 | cmd = 'mpiexec -n ' + inputProc + ' DinfDistDown -fel ' + '"' + fel + '"' + ' -ang ' + '"' + ang + '"' + \
66 | ' -src ' + '"' + src + '"' + ' -dd ' + '"' + dd + '"' + ' -m ' + statmeth + ' ' + distmeth
67 | if arcpy.Exists(weightgrid):
68 | cmd = cmd + ' -wg ' + '"' + wg + '"'
69 | if edgecontamination == 'false':
70 | cmd = cmd + ' -nc '
71 |
72 | arcpy.AddMessage("\nCommand Line: " + cmd)
73 |
74 | # Submit command to operating system
75 | os.system(cmd)
76 |
77 | # Capture the contents of shell command and print it to the arcgis dialog box
78 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
79 |
80 | message = "\n"
81 | for line in process.stdout.readlines():
82 | if isinstance(line, bytes): # true in Python 3
83 | line = line.decode()
84 | message = message + line
85 | arcpy.AddMessage(message)
86 |
87 | # Calculate statistics on the output so that it displays properly
88 | arcpy.AddMessage('Calculate Statistics\n')
89 | arcpy.CalculateStatistics_management(dd)
90 |
--------------------------------------------------------------------------------
/pyfiles/DinfDistUp.py:
--------------------------------------------------------------------------------
1 | # Script Name: DinfDistUp
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | ang = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D-Infinity Flow Direction Grid: " + ang)
16 |
17 | inlyr1 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr1)
19 | fel = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Pit Filled Elevation Grid: " + fel)
21 |
22 | inlyr2 = arcpy.GetParameterAsText(2)
23 | desc = arcpy.Describe(inlyr2)
24 | slp = str(desc.catalogPath)
25 | arcpy.AddMessage("Input Slope Grid: " + slp)
26 |
27 | propthresh=arcpy.GetParameterAsText(3)
28 | arcpy.AddMessage("Input Proportion Threshold: "+propthresh)
29 |
30 | statisticalmethod = arcpy.GetParameterAsText(4)
31 | arcpy.AddMessage("Statistical Method: " + statisticalmethod)
32 |
33 | distancemethod = arcpy.GetParameterAsText(5)
34 | arcpy.AddMessage("Distance Method: " + distancemethod)
35 |
36 | edgecontamination=arcpy.GetParameterAsText(6)
37 | arcpy.AddMessage("Edge Contamination: "+edgecontamination)
38 |
39 | # Input Number of Processes
40 | inputProc = arcpy.GetParameterAsText(7)
41 | arcpy.AddMessage("Number of Processes: " + inputProc)
42 |
43 | # Output
44 | du = arcpy.GetParameterAsText(8)
45 | arcpy.AddMessage("Output D-Infinity Distance Up: " + du)
46 |
47 | # Construct command
48 | if statisticalmethod == 'Average':
49 | statmeth = 'ave'
50 | if statisticalmethod == 'Maximum':
51 | statmeth = 'max'
52 | if statisticalmethod == 'Minimum':
53 | statmeth = 'min'
54 | if distancemethod == 'Horizontal':
55 | distmeth = 'h'
56 | if distancemethod == 'Vertical':
57 | distmeth = 'v'
58 | if distancemethod == 'Pythagoras':
59 | distmeth = 'p'
60 | if distancemethod == 'Surface':
61 | distmeth = 's'
62 | cmd = 'mpiexec -n ' + inputProc + ' DinfDistUp -fel ' + '"' + fel + '"' + ' -ang ' + '"' + ang + '"' + \
63 | ' -slp ' + '"' + slp + '"' + ' -du ' + '"' + du + '"' + ' -m ' + statmeth + ' ' + distmeth + \
64 | ' -thresh ' + propthresh
65 | if edgecontamination == 'false':
66 | cmd = cmd + ' -nc '
67 |
68 | arcpy.AddMessage("\nCommand Line: " + cmd)
69 |
70 | # Submit command to operating system
71 | os.system(cmd)
72 |
73 | # Capture the contents of shell command and print it to the arcgis dialog box
74 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
75 |
76 | message = "\n"
77 | for line in process.stdout.readlines():
78 | if isinstance(line, bytes): # true in Python 3
79 | line = line.decode()
80 | message = message + line
81 | arcpy.AddMessage(message)
82 |
83 | # Calculate statistics on the output so that it displays properly
84 | arcpy.AddMessage('Calculate Statistics\n')
85 | arcpy.CalculateStatistics_management(du)
86 |
--------------------------------------------------------------------------------
/pyfiles/DinfFlowDirection.py:
--------------------------------------------------------------------------------
1 | # Script Name: DinfFlowDirection
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/23/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Input
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | fel = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Pit Filled Elevation file: " + fel)
16 |
17 | # Input Number of Processes
18 | inputProc = arcpy.GetParameterAsText(1)
19 | arcpy.AddMessage("Number of Processes: " + inputProc)
20 |
21 | # Outputs
22 | ang = arcpy.GetParameterAsText(2)
23 | arcpy.AddMessage("Output Dinf Flow Direction File: " + ang)
24 | slp = arcpy.GetParameterAsText(3)
25 | arcpy.AddMessage("Output Dinf Slope File: " + slp)
26 |
27 | # Construct command
28 | cmd = 'mpiexec -n ' + inputProc + ' DinfFlowDir -fel ' + '"' + fel + '"' + ' -ang ' + '"' + ang + '"' + \
29 | ' -slp ' + '"' + slp + '"'
30 | arcpy.AddMessage("\nCommand Line: " + cmd)
31 |
32 | # Submit command to operating system
33 | os.system(cmd)
34 |
35 | # Capture the contents of shell command and print it to the arcgis dialog box
36 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
37 |
38 | message = "\n"
39 | for line in process.stdout.readlines():
40 | if isinstance(line, bytes): # true in Python 3
41 | line = line.decode()
42 | message = message + line
43 | arcpy.AddMessage(message)
44 |
45 | # Calculate statistics on the output so that it displays properly
46 | arcpy.AddMessage('Calculate Statistics\n')
47 | arcpy.CalculateStatistics_management(ang)
48 | arcpy.CalculateStatistics_management(slp)
49 |
--------------------------------------------------------------------------------
/pyfiles/DinfReverseAccumulation.py:
--------------------------------------------------------------------------------
1 | # Script Name: DinfReverseAccumulation
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | ang = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D-Infinity Flow Direction Grid: " + ang)
16 |
17 | inlyr1 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr1)
19 | dm = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Weight Grid: " + dm)
21 |
22 | # Input Number of Processes
23 | inputProc = arcpy.GetParameterAsText(2)
24 | arcpy.AddMessage("Number of Processes: " + inputProc)
25 |
26 | # Output
27 | racc = arcpy.GetParameterAsText(3)
28 | arcpy.AddMessage("Output Reverse Accumulation Grid: " + racc)
29 |
30 | dmax = arcpy.GetParameterAsText(4)
31 | arcpy.AddMessage("Output Maximum Downslope Grid: " + dmax)
32 |
33 | # Construct command
34 | cmd = 'mpiexec -n ' + inputProc + ' DinfRevAccum -ang ' + '"' + ang + '"' + ' -wg ' + '"' + dm + '"' + \
35 | ' -racc ' + '"' + racc + '"' + ' -dmax ' + '"' + dmax + '"'
36 |
37 | arcpy.AddMessage("\nCommand Line: " + cmd)
38 |
39 | # Submit command to operating system
40 | os.system(cmd)
41 |
42 | # Capture the contents of shell command and print it to the arcgis dialog box
43 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
44 |
45 | message = "\n"
46 | for line in process.stdout.readlines():
47 | if isinstance(line, bytes): # true in Python 3
48 | line = line.decode()
49 | message = message + line
50 | arcpy.AddMessage(message)
51 |
52 | # Calculate statistics on the output so that it displays properly
53 | arcpy.AddMessage('Calculate Statistics\n')
54 | arcpy.CalculateStatistics_management(racc)
55 | arcpy.CalculateStatistics_management(dmax)
56 |
--------------------------------------------------------------------------------
/pyfiles/DinfTransLimitAccum.py:
--------------------------------------------------------------------------------
1 | # Script Name: DinfTransLimitAccum
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | ang = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D-Infinity Flow Direction Grid: " + ang)
16 |
17 | inlyr1 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr1)
19 | tsup = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Supply Grid: " + tsup)
21 |
22 | inlyr2 = arcpy.GetParameterAsText(2)
23 | desc = arcpy.Describe(inlyr2)
24 | tc = str(desc.catalogPath)
25 | arcpy.AddMessage("Input Transport Capacity Grid: " + tc)
26 |
27 | inlyr3 = arcpy.GetParameterAsText(3)
28 | if arcpy.Exists(inlyr3):
29 | desc = arcpy.Describe(inlyr3)
30 | cs = str(desc.catalogPath)
31 | arcpy.AddMessage("Input Concentration Grid: " + cs)
32 |
33 | ogrfile=arcpy.GetParameterAsText(4)
34 | if arcpy.Exists(ogrfile):
35 | desc = arcpy.Describe(ogrfile)
36 | shfl1 = str(desc.catalogPath)
37 | extn = os.path.splitext(shfl1)[1] # get extension of a file
38 | # if extention is shapfile do not convert into gjson other wise convert
39 | if extn == ".shp":
40 | shfl = shfl1
41 | else:
42 | arcpy.AddMessage("Extracting json outlet file from: " + shfl1)
43 | basename = os.path.basename(shfl1) # get last part of the path
44 | dirname = os.path.dirname(ang) # get directory
45 | arcpy.env.workspace = dirname # does not work without specifying the workspace
46 | arcpy.FeaturesToJSON_conversion(shfl1, basename + ".json") # convert feature to json
47 | shfl = os.path.join(dirname, basename + ".json")
48 | arcpy.AddMessage("Input Outlets Shapefile: " + shfl)
49 |
50 | edgecontamination = arcpy.GetParameterAsText(5)
51 | arcpy.AddMessage("Edge Contamination: " + edgecontamination)
52 |
53 | # Input Number of Processes
54 | inputProc = arcpy.GetParameterAsText(6)
55 | arcpy.AddMessage("Number of Processes: " + inputProc)
56 |
57 | # Outputs
58 | tla = arcpy.GetParameterAsText(7)
59 | arcpy.AddMessage("Output Transport Limited Accumulation Grid: " + tla)
60 |
61 | tdep = arcpy.GetParameterAsText(8)
62 | arcpy.AddMessage("Output Deposition Grid: " + tdep)
63 |
64 | ctpt = arcpy.GetParameterAsText(9)
65 | if arcpy.Exists(inlyr3):
66 | arcpy.AddMessage("Output Concentration Grid: " + ctpt)
67 |
68 | # Construct command
69 | cmd = 'mpiexec -n ' + inputProc + ' DinfTransLimAccum -ang ' + '"' + ang + '"' + ' -tsup ' + '"' + \
70 | tsup + '"' + ' -tc ' + '"' + tc + '"' + ' -tla ' + '"' + tla + '"' + ' -tdep ' + '"' + tdep + '"'
71 | if arcpy.Exists(inlyr3):
72 | cmd = cmd + ' -cs ' + '"' + cs + '"' + ' -ctpt ' + '"' + ctpt + '"'
73 | if arcpy.Exists(ogrfile):
74 | cmd = cmd + ' -o ' + '"' + shfl + '"'
75 | if edgecontamination == 'false':
76 | cmd = cmd + ' -nc '
77 |
78 | arcpy.AddMessage("\nCommand Line: " + cmd)
79 |
80 | # Submit command to operating system
81 | os.system(cmd)
82 |
83 | # Capture the contents of shell command and print it to the arcgis dialog box
84 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
85 |
86 | message = "\n"
87 | for line in process.stdout.readlines():
88 | if isinstance(line, bytes): # true in Python 3
89 | line = line.decode()
90 | message = message + line
91 | arcpy.AddMessage(message)
92 |
93 | # Calculate statistics on the output so that it displays properly
94 | arcpy.AddMessage('Calculate Statistics\n')
95 | arcpy.CalculateStatistics_management(tla)
96 | arcpy.CalculateStatistics_management(tdep)
97 | if arcpy.Exists(inlyr3):
98 | arcpy.CalculateStatistics_management(ctpt)
99 | # remove converted json file
100 | if arcpy.Exists(ogrfile):
101 | extn_json = os.path.splitext(shfl)[1] # get extension of the converted json file
102 | if extn_json == ".json":
103 | os.remove(shfl)
104 |
--------------------------------------------------------------------------------
/pyfiles/DinfUpslopeDependence.py:
--------------------------------------------------------------------------------
1 | # Script Name: DinfUpslopeDependence
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | ang = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D-Infinity Flow Direction Grid: " + ang)
16 |
17 | inlyr1 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr1)
19 | dg = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Destination Grid: " + dg)
21 |
22 | # Input Number of Processes
23 | inputProc = arcpy.GetParameterAsText(2)
24 | arcpy.AddMessage("Number of Processes: " + inputProc)
25 |
26 | # Output
27 | dep = arcpy.GetParameterAsText(3)
28 | arcpy.AddMessage("Output Upslope Dependence Grid: " + dep)
29 |
30 | # Construct command
31 | cmd = 'mpiexec -n ' + inputProc + ' DinfUpDependence -ang ' + '"' + ang + '"' + ' -dg ' + '"' + dg + \
32 | '"' + ' -dep ' + '"' + dep + '"'
33 |
34 | arcpy.AddMessage("\nCommand Line: " + cmd)
35 |
36 | # Submit command to operating system
37 | os.system(cmd)
38 |
39 | # Capture the contents of shell command and print it to the arcgis dialog box
40 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
41 |
42 | message = "\n"
43 | for line in process.stdout.readlines():
44 | if isinstance(line, bytes): # true in Python 3
45 | line = line.decode()
46 | message = message + line
47 | arcpy.AddMessage(message)
48 |
49 | # Calculate statistics on the output so that it displays properly
50 | arcpy.AddMessage('Calculate Statistics\n')
51 | arcpy.CalculateStatistics_management(dep)
52 |
--------------------------------------------------------------------------------
/pyfiles/GageWatershed.py:
--------------------------------------------------------------------------------
1 | # Script Name: GageWatershed
2 | #
3 | # Created By: David Tarboton
4 | # Date: 1/25/14
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | p = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D8 Flow Direction Grid: " + p)
16 |
17 | ogrfile = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(ogrfile)
19 | shfl1 = str(desc.catalogPath)
20 | extn = os.path.splitext(shfl1)[1] # get extension of a file
21 |
22 | # if extention is shapfile do not convert into gjson other wise convert
23 | if extn == ".shp":
24 | shfl = shfl1
25 | else:
26 | arcpy.AddMessage("Extracting json outlet file from: " + shfl1)
27 | basename = os.path.basename(shfl1) # get last part of the path
28 | dirname = os.path.dirname(p) # get directory
29 | arcpy.env.workspace = dirname # does not work without specifying the workspace
30 | arcpy.FeaturesToJSON_conversion(shfl1, basename + ".json") # convert feature to json
31 | shfl = os.path.join(dirname, basename + ".json")
32 | arcpy.AddMessage("Using Outlets file: " + shfl)
33 |
34 | # Input Number of Processes
35 | inputProc = arcpy.GetParameterAsText(2)
36 | arcpy.AddMessage("Input Number of Processes: " + inputProc)
37 |
38 | # Output
39 | gw = arcpy.GetParameterAsText(3)
40 | arcpy.AddMessage("Output GageWatershed Grid: " + gw)
41 |
42 | # Output
43 | idf = arcpy.GetParameterAsText(4)
44 | arcpy.AddMessage("Output Downstream ID Text File: " + idf)
45 |
46 | # Construct command
47 | cmd = 'mpiexec -n ' + inputProc + ' GageWatershed'
48 | cmd = cmd+ ' -p ' + '"' + p + '"'
49 | cmd = cmd + ' -o ' + '"' + shfl + '"'
50 | cmd = cmd + ' -gw ' + '"' + gw + '"'
51 | if idf != '':
52 | cmd = cmd + ' -id ' + '"' + idf + '"'
53 |
54 | arcpy.AddMessage("\nCommand Line: " + cmd)
55 |
56 | # Submit command to operating system
57 | os.system(cmd)
58 |
59 | # Capture the contents of shell command and print it to the arcgis dialog box
60 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
61 |
62 | message = "\n"
63 | for line in process.stdout.readlines():
64 | if isinstance(line, bytes): # true in Python 3
65 | line = line.decode()
66 | message = message + line
67 | arcpy.AddMessage(message)
68 |
69 | # Calculate statistics on the output so that it displays properly
70 | arcpy.AddMessage('Calculate Statistics\n')
71 | arcpy.CalculateStatistics_management(gw)
72 | # remove converted json file
73 | if arcpy.Exists(ogrfile):
74 | extn_json = os.path.splitext(shfl)[1] # get extension of the converted json file
75 | if extn_json == ".json":
76 | os.remove(shfl)
77 |
78 |
--------------------------------------------------------------------------------
/pyfiles/LengthAreaStreamSource.py:
--------------------------------------------------------------------------------
1 | # Script Name: LengthAreaStreamSource
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | plen = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Length Grid: " + plen)
16 |
17 | inlyr1 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr1)
19 | ad8 = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Contributing Area Grid: " + ad8)
21 |
22 | threshold = arcpy.GetParameterAsText(2)
23 | arcpy.AddMessage("Threshold(M): " + threshold)
24 |
25 | exponent = arcpy.GetParameterAsText(3)
26 | arcpy.AddMessage("Exponent(y): " + exponent)
27 |
28 | # Input Number of Processes
29 | inputProc = arcpy.GetParameterAsText(4)
30 | arcpy.AddMessage("Number of Processes: " + inputProc)
31 |
32 | # Output
33 | ss = arcpy.GetParameterAsText(5)
34 | arcpy.AddMessage("Output Stream Source Grid: "+ss)
35 |
36 | # Construct command
37 | cmd = 'mpiexec -n ' + inputProc + ' LengthArea -plen ' + '"' + plen + '"' + ' -ad8 ' + '"' + ad8 +\
38 | '"' + ' -ss ' + '"' + ss + '"' + ' -par ' + threshold + ' ' + exponent
39 |
40 | arcpy.AddMessage("\nCommand Line: " + cmd)
41 |
42 | # Submit command to operating system
43 | os.system(cmd)
44 |
45 | # Capture the contents of shell command and print it to the arcgis dialog box
46 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
47 |
48 | message = "\n"
49 | for line in process.stdout.readlines():
50 | if isinstance(line, bytes): # true in Python 3
51 | line = line.decode()
52 | message = message + line
53 | arcpy.AddMessage(message)
54 |
55 | # Calculate statistics on the output so that it displays properly
56 | arcpy.AddMessage('Calculate Statistics\n')
57 | arcpy.CalculateStatistics_management(ss)
58 |
--------------------------------------------------------------------------------
/pyfiles/MoveOutletsToStreams.py:
--------------------------------------------------------------------------------
1 | # Script Name: MoveOuletsToStreams
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | p = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D8 Flow Direction Grid: " + p)
16 | coord_sys = desc.spatialReference
17 | arcpy.AddMessage("Spatial Reference: " + str(coord_sys.name))
18 |
19 | inlyr1 = arcpy.GetParameterAsText(1)
20 | desc = arcpy.Describe(inlyr1)
21 | src = str(desc.catalogPath)
22 | arcpy.AddMessage("Input Stream Raster Grid: " + src)
23 |
24 | inlyr2 = arcpy.GetParameterAsText(2)
25 | desc = arcpy.Describe(inlyr2)
26 | shfl1 = str(desc.catalogPath)
27 | extn = os.path.splitext(shfl1)[1] # get extension of a file
28 |
29 | # if extention is shapfile do not convert into gjson other wise convert
30 | if extn == ".shp":
31 | shfl = shfl1
32 | else:
33 | arcpy.AddMessage("Extracting json outlet file from: " + shfl1)
34 | basename = os.path.basename(shfl1) # get last part of the path
35 | dirname = os.path.dirname(p) # get directory
36 | arcpy.env.workspace = dirname # does not work without specifying the workspace
37 | arcpy.FeaturesToJSON_conversion(shfl1, basename + ".json") # convert feature to json
38 | shfl = os.path.join(dirname, basename + ".json")
39 |
40 | arcpy.AddMessage("Using Outlets ogrfile: " + shfl)
41 |
42 | maxdistance = arcpy.GetParameterAsText(3)
43 | arcpy.AddMessage("Minimum Threshold Value: " + maxdistance)
44 |
45 | # Input Number of Processes
46 | inputProc = arcpy.GetParameterAsText(4)
47 | arcpy.AddMessage("Input Number of Processes: " + inputProc)
48 |
49 | # Output
50 | om = arcpy.GetParameterAsText(5)
51 | arcpy.AddMessage("Output Outlet file: " + om)
52 |
53 | # Construct command
54 | cmd = 'mpiexec -n ' + inputProc + ' MoveOutletsToStreams -p ' + '"' + p + '"' + ' -src ' + '"' + src + \
55 | '"' + ' -o ' + '"' + shfl + '"' + ' -om ' + '"' + om + '"' + ' -md ' + maxdistance
56 |
57 | arcpy.AddMessage("\nCommand Line: " + cmd)
58 |
59 | # Submit command to operating system
60 | os.system(cmd)
61 |
62 | # Capture the contents of shell command and print it to the arcgis dialog box
63 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
64 |
65 | message = "\n"
66 | for line in process.stdout.readlines():
67 | if isinstance(line, bytes): # true in Python 3
68 | line = line.decode()
69 | message = message + line
70 | arcpy.AddMessage(message)
71 |
72 | #arcpy.DefineProjection_management(om, coord_sys)
73 | # remove converted json file
74 | if arcpy.Exists(inlyr2):
75 | extn_json = os.path.splitext(shfl)[1] # get extension of the converted json file
76 | if extn_json == ".json":
77 | os.remove(shfl)
78 |
--------------------------------------------------------------------------------
/pyfiles/PeukerDouglas.py:
--------------------------------------------------------------------------------
1 | # Script Name: PeukerDouglas
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | fel = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Elevation file: " + fel)
16 |
17 | centerweight = arcpy.GetParameterAsText(1)
18 | arcpy.AddMessage("Center Smoothing Weight: " + centerweight)
19 |
20 | sideweight = arcpy.GetParameterAsText(2)
21 | arcpy.AddMessage("Side Smoothing Weight: " + sideweight)
22 |
23 | diagonalweight = arcpy.GetParameterAsText(3)
24 | arcpy.AddMessage("Diagonal Smoothing Weight: " + diagonalweight)
25 |
26 | # Input Number of Processes
27 | inputProc = arcpy.GetParameterAsText(4)
28 | arcpy.AddMessage("Number of Processes: " + inputProc)
29 |
30 | # Output
31 | ss = arcpy.GetParameterAsText(5)
32 | arcpy.AddMessage("Output Stream Source file: " + ss)
33 |
34 | # Construct command
35 | cmd = 'mpiexec -n ' + inputProc + ' PeukerDouglas -fel ' + '"' + fel + '"' + ' -ss ' + '"' + ss + '"' + \
36 | ' -par ' + centerweight + ' ' + sideweight + ' ' + diagonalweight
37 |
38 | arcpy.AddMessage("\nCommand Line: " + cmd)
39 |
40 | # Submit command to operating system
41 | os.system(cmd)
42 |
43 | # Capture the contents of shell command and print it to the arcgis dialog box
44 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
45 |
46 | message = "\n"
47 | for line in process.stdout.readlines():
48 | if isinstance(line, bytes): # true in Python 3
49 | line = line.decode()
50 | message = message + line
51 | arcpy.AddMessage(message)
52 |
53 | # Calculate statistics on the output so that it displays properly
54 | arcpy.AddMessage('Calculate Statistics\n')
55 | arcpy.CalculateStatistics_management(ss)
56 |
--------------------------------------------------------------------------------
/pyfiles/PitRemove.py:
--------------------------------------------------------------------------------
1 | # Script Name: Remove Pits
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/21/11
5 |
6 | # Import ArcPy site-package and os modules
7 | #
8 | import arcpy
9 | import os
10 | import subprocess
11 |
12 | # Get and describe the first argument
13 | #
14 | inLyr = arcpy.GetParameterAsText(0)
15 | desc = arcpy.Describe(inLyr)
16 | inZfile = str(desc.catalogPath)
17 | arcpy.AddMessage("\nInput Elevation file: " + inZfile)
18 |
19 | considering4way = arcpy.GetParameterAsText(1)
20 | arcpy.AddMessage("Considering4way: " + considering4way)
21 |
22 | maskgrid = arcpy.GetParameterAsText(2)
23 | if arcpy.Exists(maskgrid):
24 | desc = arcpy.Describe(maskgrid)
25 | mkgr=str(desc.catalogPath)
26 | arcpy.AddMessage("Input Mask Grid: "+mkgr)
27 |
28 | # Get the Input No. of Processes
29 | #
30 | inputProc=arcpy.GetParameterAsText(3)
31 | arcpy.AddMessage(" Number of Processes: "+inputProc)
32 |
33 | # Get the output file
34 | #
35 | outFile = arcpy.GetParameterAsText(4)
36 | arcpy.AddMessage("Output Pit Removed Elevation file: " + outFile)
37 |
38 | # Construct the taudem command line. Put quotes around file names in case there are spaces
39 | # Construct command
40 | cmd = 'mpiexec -n ' + inputProc + ' pitremove -z ' + '"' + inZfile + '"' + ' -fel ' + '"' + outFile + '"'
41 | if considering4way == 'true':
42 | cmd = cmd + ' -4way '
43 | if arcpy.Exists(maskgrid):
44 | cmd = cmd + ' -depmask ' + '"' + mkgr + '"'
45 | if arcpy.Exists(maskgrid) and considering4way == 'true':
46 | cmd = cmd + ' -depmask ' + '"' + mkgr + '"' + ' -4way '
47 |
48 | arcpy.AddMessage("\nCommand Line: "+cmd)
49 | os.system(cmd)
50 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
51 |
52 | message = "\n"
53 | for line in process.stdout.readlines():
54 | if isinstance(line, bytes): # true in Python 3
55 | line = line.decode()
56 | message = message + line
57 | arcpy.AddMessage(message)
58 |
59 | # Calculate statistics so that grids display with correct bounds
60 | arcpy.AddMessage('Calculate Statistics\n')
61 | arcpy.CalculateStatistics_management(outFile)
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/pyfiles/SlopeAreaCombination.py:
--------------------------------------------------------------------------------
1 | # Script Name: SlopeAreaCombination
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | slp = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Slope Grid: " + slp)
16 |
17 | inlyr = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr)
19 | sca = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Area Grid: " + sca)
21 |
22 | slopeexponent = arcpy.GetParameterAsText(2)
23 | arcpy.AddMessage("Slope Exponent(m): " + slopeexponent)
24 |
25 | areaexponent = arcpy.GetParameterAsText(3)
26 | arcpy.AddMessage("Area Exponent(n): " + areaexponent)
27 |
28 | # Input Number of Processes
29 | inputProc = arcpy.GetParameterAsText(4)
30 | arcpy.AddMessage("Number of Processes: " + inputProc)
31 |
32 | # Output
33 | sa = arcpy.GetParameterAsText(5)
34 | arcpy.AddMessage("Output Slope Area Grid: " + sa)
35 |
36 | # Construct command
37 | cmd = 'mpiexec -n ' + inputProc + ' SlopeArea -slp ' + '"' + slp + '"' + ' -sca ' + '"' + sca + '"' + \
38 | ' -sa ' + '"' + sa + '"' + ' -par ' + slopeexponent + ' ' + areaexponent
39 |
40 | arcpy.AddMessage("\nCommand Line: " + cmd)
41 |
42 | # Submit command to operating system
43 | os.system(cmd)
44 |
45 | # Capture the contents of shell command and print it to the arcgis dialog box
46 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
47 |
48 | message = "\n"
49 | for line in process.stdout.readlines():
50 | if isinstance(line, bytes): # true in Python 3
51 | line = line.decode()
52 | message = message + line
53 | arcpy.AddMessage(message)
54 |
55 | # Calculate statistics on the output so that it displays properly
56 | arcpy.AddMessage('Calculate Statistics\n')
57 | arcpy.CalculateStatistics_management(sa)
58 |
--------------------------------------------------------------------------------
/pyfiles/SlopeAveDown.py:
--------------------------------------------------------------------------------
1 | # Script Name: SlopeAveDown
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | p = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput D8 Flow Direction Grid: " + p)
16 |
17 | inlyr1 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr1)
19 | fel = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Pit Filled Elevation Grid: " + fel)
21 |
22 | distance = arcpy.GetParameterAsText(2)
23 | arcpy.AddMessage("Distance: " + distance)
24 |
25 | # Input Number of Processes
26 | inputProc = arcpy.GetParameterAsText(3)
27 | arcpy.AddMessage("Number of Processes: " + inputProc)
28 |
29 | # Output
30 | slpd = arcpy.GetParameterAsText(4)
31 | arcpy.AddMessage("Output Slope Average Down Grid: " + slpd)
32 |
33 | # Construct command
34 | cmd = 'mpiexec -n ' + inputProc + ' SlopeAveDown -p ' + '"' + p + '"' + ' -fel ' + '"' + fel + '"' + \
35 | ' -slpd ' + '"' + slpd + '"' + ' -dn ' + distance
36 |
37 | arcpy.AddMessage("\nCommand Line: " + cmd)
38 |
39 | # Submit command to operating system
40 | os.system(cmd)
41 |
42 | # Capture the contents of shell command and print it to the arcgis dialog box
43 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
44 |
45 | message = "\n"
46 | for line in process.stdout.readlines():
47 | if isinstance(line, bytes): # true in Python 3
48 | line = line.decode()
49 | message = message + line
50 | arcpy.AddMessage(message)
51 |
52 | # Calculate statistics on the output so that it displays properly
53 | arcpy.AddMessage('Calculate Statistics\n')
54 | arcpy.CalculateStatistics_management(slpd)
55 |
--------------------------------------------------------------------------------
/pyfiles/SlopeOverAreaRatio.py:
--------------------------------------------------------------------------------
1 | # Script Name: SlopeOverAreaRatio
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/22/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Input
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | slp = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Slope Grid: " + slp)
16 |
17 | inlyr2 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr2)
19 | sca = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Secific Catchment Area Grid: " + sca)
21 |
22 | # Input Number of Processes
23 | inputProc = arcpy.GetParameterAsText(2)
24 | arcpy.AddMessage(" Number of Processes: " + inputProc)
25 |
26 | # Outputs
27 | sar = arcpy.GetParameterAsText(3)
28 | arcpy.AddMessage("Output Slope Divided By Area Ratio Grid: " + sar)
29 |
30 | # Construct command
31 | cmd = 'mpiexec -n ' + inputProc + ' SlopeAreaRatio -slp ' + '"' + slp + '"' + ' -sca ' + '"' + sca + '"' + \
32 | ' -sar ' + '"' + sar + '"'
33 | arcpy.AddMessage("\nCommand Line: " + cmd)
34 |
35 | # Submit command to operating system
36 | os.system(cmd)
37 |
38 | # Capture the contents of shell command and print it to the arcgis dialog box
39 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
40 |
41 | message = "\n"
42 | for line in process.stdout.readlines():
43 | if isinstance(line, bytes): # true in Python 3
44 | line = line.decode()
45 | message = message + line
46 | arcpy.AddMessage(message)
47 |
48 | # Calculate statistics on the output so that it displays properly
49 | arcpy.AddMessage('Calculate Statistics\n')
50 | arcpy.CalculateStatistics_management(sar)
51 |
--------------------------------------------------------------------------------
/pyfiles/StreamDefByThreshold.py:
--------------------------------------------------------------------------------
1 | # Script Name: StreamDefByThreshold
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | ssa = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Accumulated Stream Source Grid: " + ssa)
16 |
17 | maskgrid = arcpy.GetParameterAsText(1)
18 | if arcpy.Exists(maskgrid):
19 | desc = arcpy.Describe(maskgrid)
20 | mask = str(desc.catalogPath)
21 | arcpy.AddMessage("Input Mask Grid: " + mask)
22 |
23 | threshold = arcpy.GetParameterAsText(2)
24 | arcpy.AddMessage("Threshold: " + threshold)
25 |
26 | # Input Number of Processes
27 | inputProc = arcpy.GetParameterAsText(3)
28 | arcpy.AddMessage("Number of Processes: " + inputProc)
29 |
30 | # Output
31 | src = arcpy.GetParameterAsText(4)
32 | arcpy.AddMessage("Output Stream Raster Grid: " + src)
33 |
34 | # Construct command
35 | cmd = 'mpiexec -n ' + inputProc + ' Threshold -ssa ' + '"' + ssa + '"' + ' -src ' + '"' + src + '"' + \
36 | ' -thresh ' + threshold
37 | if arcpy.Exists(maskgrid):
38 | cmd = cmd + ' -mask ' + mask
39 |
40 | arcpy.AddMessage("\nCommand Line: " + cmd)
41 |
42 | # Submit command to operating system
43 | os.system(cmd)
44 |
45 | # Capture the contents of shell command and print it to the arcgis dialog box
46 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
47 |
48 | message = "\n"
49 | for line in process.stdout.readlines():
50 | if isinstance(line, bytes): # true in Python 3
51 | line = line.decode()
52 | message = message + line
53 | arcpy.AddMessage(message)
54 |
55 | # Calculate statistics on the output so that it displays properly
56 | arcpy.AddMessage('Calculate Statistics\n')
57 | arcpy.CalculateStatistics_management(src)
58 |
--------------------------------------------------------------------------------
/pyfiles/StreamDropAnalysis.py:
--------------------------------------------------------------------------------
1 | # Script Name: StreamDropAnalysis
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | fel = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Pit Filled Elevation Grid: " + fel)
16 |
17 | inlyr1 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr1)
19 | p = str(desc.catalogPath)
20 | arcpy.AddMessage("Input D8 Flow Direction Grid: " + p)
21 |
22 | inlyr2 = arcpy.GetParameterAsText(2)
23 | desc = arcpy.Describe(inlyr2)
24 | ad8 = str(desc.catalogPath)
25 | arcpy.AddMessage("Input D8 Contributing Area Grid: " + ad8)
26 |
27 | inlyr3 = arcpy.GetParameterAsText(3)
28 | desc = arcpy.Describe(inlyr3)
29 | ssa = str(desc.catalogPath)
30 | arcpy.AddMessage("Input Accumulated Stream Source Grid: " + ssa)
31 |
32 | ogrfile = arcpy.GetParameterAsText(4)
33 | desc = arcpy.Describe(ogrfile)
34 | shfl1 = str(desc.catalogPath)
35 | extn = os.path.splitext(shfl1)[1] # get extension of a file
36 | # if extention is shapfile do not convert into gjson other wise convert
37 | if extn == ".shp":
38 | shfl=shfl1
39 | else:
40 | arcpy.AddMessage("Extracting json outlet file from: " + shfl1)
41 | basename = os.path.basename(shfl1) # get last part of the path
42 | dirname = os.path.dirname(p) # get directory
43 | arcpy.env.workspace = dirname # does not work without specifying the workspace
44 | arcpy.FeaturesToJSON_conversion(shfl1, basename + ".json") # convert feature to json
45 | shfl = os.path.join(dirname, basename + ".json")
46 |
47 | arcpy.AddMessage("Using Outlets: " + shfl)
48 |
49 | minthresh = arcpy.GetParameterAsText(5)
50 | arcpy.AddMessage("Minimum Threshold Value: " + minthresh)
51 |
52 | maxthresh = arcpy.GetParameterAsText(6)
53 | arcpy.AddMessage("Maximum Threshold Value: " + maxthresh)
54 |
55 | numthresh = arcpy.GetParameterAsText(7)
56 | arcpy.AddMessage("Number of Threshold Values: " + numthresh)
57 |
58 | logspace = arcpy.GetParameterAsText(8)
59 | arcpy.AddMessage("Logarithmic Spacing: " + logspace)
60 |
61 | # Input Number of Processes
62 | inputProc = arcpy.GetParameterAsText(9)
63 | arcpy.AddMessage("Number of Processes: " + inputProc)
64 |
65 | # Output
66 | drp = arcpy.GetParameterAsText(10)
67 | arcpy.AddMessage("Output Drop Analysis Text File: " + drp)
68 |
69 | # Construct command
70 | cmd = 'mpiexec -n ' + inputProc + ' DropAnalysis -fel ' + '"' + fel + '"' + ' -p ' + '"' + p + '"' + \
71 | ' -ad8 ' + '"' + ad8 + '"' + ' -ssa ' + '"' + ssa + '"' + ' -o ' + '"' + shfl + '"' + ' -drp ' + \
72 | '"' + drp + '"' + ' -par ' + minthresh + ' ' + maxthresh + ' ' + numthresh + ' '
73 | if logspace == 'false':
74 | cmd = cmd + '1'
75 | else:
76 | cmd = cmd + '0'
77 |
78 | arcpy.AddMessage("\nCommand Line: " + cmd)
79 |
80 | # Submit command to operating system
81 | os.system(cmd)
82 |
83 | # Capture the contents of shell command and print it to the arcgis dialog box
84 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
85 | arcpy.AddMessage('\nProcess started:\n')
86 | for line in process.stdout.readlines():
87 | if isinstance(line, bytes): # true in Python 3
88 | line = line.decode()
89 | arcpy.AddMessage(line)
90 |
91 | # Calculate statistics on the output so that it displays properly
92 | #arcpy.AddMessage('Calculate Statistics\n')
93 | #arcpy.CalculateStatistics_management(drp) # DGT 12/7/19 does not make sense to calculate statistics on this drop file
94 | if arcpy.Exists(ogrfile):
95 | extn_json = os.path.splitext(shfl)[1] # get extension of the converted json file
96 | if extn_json == ".json":
97 | os.remove(shfl)
98 |
--------------------------------------------------------------------------------
/pyfiles/StreamReachAndWatershed.py:
--------------------------------------------------------------------------------
1 | # Script Name: StreamReachAndWatershed
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Inputs
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | fel = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Pit Filled Elevation Grid: " + fel)
16 | coord_sys = desc.spatialReference
17 | arcpy.AddMessage("Spatial Reference: " + str(coord_sys.name))
18 |
19 | inlyr1 = arcpy.GetParameterAsText(1)
20 | desc = arcpy.Describe(inlyr1)
21 | p = str(desc.catalogPath)
22 | arcpy.AddMessage("Input D8 Flow Direction Grid: " + p)
23 |
24 | inlyr2 = arcpy.GetParameterAsText(2)
25 | desc = arcpy.Describe(inlyr2)
26 | ad8 = str(desc.catalogPath)
27 | arcpy.AddMessage("Input D8 Drainage Area: " + ad8)
28 |
29 | inlyr3 = arcpy.GetParameterAsText(3)
30 | desc = arcpy.Describe(inlyr3)
31 | src = str(desc.catalogPath)
32 | arcpy.AddMessage("Input Stream Raster Grid: " + src)
33 |
34 | ogrfile = arcpy.GetParameterAsText(4)
35 | if arcpy.Exists(ogrfile):
36 | desc = arcpy.Describe(ogrfile)
37 | shfl1 = str(desc.catalogPath)
38 | extn = os.path.splitext(shfl1)[1] # get extension of a file
39 | # if extention is shapfile do not convert into gjson other wise convert
40 |
41 | if extn == ".shp":
42 | shfl = shfl1
43 | else:
44 | arcpy.AddMessage("Extracting json outlet file from: " + shfl1)
45 | basename = os.path.basename(shfl1) # get last part of the path
46 | dirname = os.path.dirname(p) # get directory
47 | arcpy.env.workspace = dirname # does not work without specifying the workspace
48 | arcpy.FeaturesToJSON_conversion(shfl1, basename + ".json") # convert feature to json
49 | shfl = os.path.join(dirname, basename + ".json")
50 |
51 | arcpy.AddMessage("Using Outlets " + shfl)
52 |
53 | delineate = arcpy.GetParameterAsText(5)
54 | arcpy.AddMessage("Delineate Single Watershed: " + delineate)
55 |
56 | # Input Number of Processes
57 | inputProc = arcpy.GetParameterAsText(6)
58 | arcpy.AddMessage("Number of Processes: " + inputProc)
59 |
60 | # Outputs
61 | ord = arcpy.GetParameterAsText(7)
62 | arcpy.AddMessage("Output Stream Order Grid: " + ord)
63 |
64 | tree = arcpy.GetParameterAsText(8)
65 | arcpy.AddMessage("Output Network Connectivity Tree: " + tree)
66 |
67 | coord = arcpy.GetParameterAsText(9)
68 | arcpy.AddMessage("Output Network Coordinates: " + coord)
69 |
70 | net = arcpy.GetParameterAsText(10)
71 | arcpy.AddMessage("Output Stream Reach file: " + net)
72 |
73 | w = arcpy.GetParameterAsText(11)
74 | arcpy.AddMessage("Output Watershed Grid: " + w)
75 |
76 | # Construct command
77 | cmd = 'mpiexec -n ' + inputProc + ' StreamNet -fel ' + '"' + fel + '"' + ' -p ' + '"' + p + '"' + \
78 | ' -ad8 ' + '"' + ad8 + '"' + ' -src ' + '"' + src + '"' + ' -ord ' + '"' + ord + '"' + ' -tree ' + \
79 | '"' + tree + '"' + ' -coord ' + '"' + coord + '"' + ' -net ' + '"' + net + '"' + ' -w ' + '"' + w + \
80 | '"'
81 | if arcpy.Exists(ogrfile):
82 | cmd = cmd + ' -o ' + '"' + shfl + '"'
83 | if delineate == 'true':
84 | cmd = cmd + ' -sw '
85 |
86 | arcpy.AddMessage("\nCommand Line: " + cmd)
87 |
88 | # Submit command to operating system
89 | os.system(cmd)
90 |
91 | # Capture the contents of shell command and print it to the arcgis dialog box
92 | process=subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
93 |
94 | message = "\n"
95 | for line in process.stdout.readlines():
96 | if isinstance(line, bytes): # true in Python 3
97 | line = line.decode()
98 | message = message + line
99 | arcpy.AddMessage(message)
100 |
101 | # Calculate statistics on the output so that it displays properly
102 | arcpy.AddMessage('Calculate Statistics\n')
103 | arcpy.CalculateStatistics_management(ord)
104 | #arcpy.DefineProjection_management(net, coord_sys)
105 |
106 | arcpy.CalculateStatistics_management(w)
107 | # remove converted json file
108 | if arcpy.Exists(ogrfile):
109 | extn_json = os.path.splitext(shfl)[1] # get extension of the converted json file
110 | if extn_json == ".json":
111 | os.remove(shfl)
112 |
--------------------------------------------------------------------------------
/pyfiles/TauDEM Tools 10 2.tbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dtarb/TauDEM/b2b48d7df977126a08a13fa2e7e06aa69f7fc400/pyfiles/TauDEM Tools 10 2.tbx
--------------------------------------------------------------------------------
/pyfiles/TauDEM Tools.tbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dtarb/TauDEM/b2b48d7df977126a08a13fa2e7e06aa69f7fc400/pyfiles/TauDEM Tools.tbx
--------------------------------------------------------------------------------
/pyfiles/TopographicWetnessIndex.py:
--------------------------------------------------------------------------------
1 | # Script Name: SlopeOverAreaRatio
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/22/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 | import os
9 | import subprocess
10 |
11 | # Input
12 | inlyr = arcpy.GetParameterAsText(0)
13 | desc = arcpy.Describe(inlyr)
14 | sca = str(desc.catalogPath)
15 | arcpy.AddMessage("\nInput Secific Catchment Area Grid: " + sca)
16 |
17 | inlyr2 = arcpy.GetParameterAsText(1)
18 | desc = arcpy.Describe(inlyr2)
19 | slp = str(desc.catalogPath)
20 | arcpy.AddMessage("Input Slope Grid: " + slp)
21 |
22 | # Input Number of Processes
23 | inputProc = arcpy.GetParameterAsText(2)
24 | arcpy.AddMessage("Number of Processes: " + inputProc)
25 |
26 | # Outputs
27 | twi = arcpy.GetParameterAsText(3)
28 | arcpy.AddMessage("Output Topographic Wetness Index Grid: " + twi)
29 |
30 | # Construct command
31 | cmd = 'mpiexec -n ' + inputProc + ' TWI -sca ' + '"' + sca + '"' + ' -slp ' + '"' + slp + '"' + ' -twi ' + \
32 | '"' + twi + '"'
33 | arcpy.AddMessage("\nCommand Line: " + cmd)
34 |
35 | # Submit command to operating system
36 | os.system(cmd)
37 |
38 | # Capture the contents of shell command and print it to the arcgis dialog box
39 | process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
40 |
41 | message = "\n"
42 | for line in process.stdout.readlines():
43 | if isinstance(line, bytes): # true in Python 3
44 | line = line.decode()
45 | message = message + line
46 | arcpy.AddMessage(message)
47 |
48 | # Calculate statistics on the output so that it displays properly
49 | arcpy.AddMessage('Calculate Statistics\n')
50 | arcpy.CalculateStatistics_management(twi)
51 |
--------------------------------------------------------------------------------
/pyfiles/Utils.py:
--------------------------------------------------------------------------------
1 | __author__ = 'Pabitra'
2 |
3 | from collections import namedtuple
4 | from osgeo import gdal, osr
5 | from gdalconst import *
6 | import numpy as np
7 |
8 | NO_DATA_VALUE = -9999
9 |
10 |
11 | class ValidationException(Exception):
12 | pass
13 |
14 |
15 | FileDriver = namedtuple('FileDriver', 'ShapeFile, TifFile')
16 | GDALFileDriver = FileDriver("ESRI Shapefile", "GTiff")
17 |
18 |
19 | def initialize_output_raster_file(base_raster_file, output_raster_file, initial_data=0.0, data_type=gdal.GDT_Float32):
20 |
21 | """
22 | Creates an raster file based on the dimension, projection, and cell size of an input raster file using specified
23 | initial data value of specified data type
24 |
25 | :param base_raster_file: raster file based on which the new raster file to be created with initial_data
26 | :param output_raster_file: name and location of of the output raster file to be created
27 | :param initial_data: data to be used in creating the output raster file
28 | :param data_type: GDAL data type to be used in creating the output raster file
29 | :return: None
30 | """
31 | base_raster = gdal.Open(base_raster_file, GA_ReadOnly)
32 | geotransform = base_raster.GetGeoTransform()
33 | originX = geotransform[0]
34 | originY = geotransform[3]
35 | pixelWidth = geotransform[1]
36 | pixelHeight = geotransform[5]
37 | rows = base_raster.RasterYSize
38 | cols = base_raster.RasterXSize
39 |
40 | driver = gdal.GetDriverByName(GDALFileDriver.TifFile)
41 | number_of_bands = 1
42 | outRaster = driver.Create(output_raster_file, cols, rows, number_of_bands, data_type)
43 | outRaster.SetGeoTransform((originX, pixelWidth, 0, originY, 0, pixelHeight))
44 |
45 | # initialize the newly created tif file with zeros
46 | if data_type == gdal.GDT_Float32:
47 | grid_initial_data = np.zeros((rows, cols), dtype=np.float32)
48 | grid_initial_data[:] = float(initial_data)
49 | else:
50 | grid_initial_data = np.zeros((rows, cols), dtype=np.int)
51 | grid_initial_data[:] = int(initial_data)
52 |
53 | outband = outRaster.GetRasterBand(1)
54 | outband.SetNoDataValue(NO_DATA_VALUE)
55 | outband.WriteArray(grid_initial_data)
56 |
57 | # set the projection of the tif file same as that of the base_raster file
58 | outRasterSRS = osr.SpatialReference()
59 | outRasterSRS.ImportFromWkt(base_raster.GetProjectionRef())
60 | outRaster.SetProjection(outRasterSRS.ExportToWkt())
61 |
62 | outRaster = None
--------------------------------------------------------------------------------
/pyfiles/WatershedGridToShapefile.py:
--------------------------------------------------------------------------------
1 | # Script Name: WatershedGridToShapefile
2 | #
3 | # Created By: David Tarboton
4 | # Date: 9/29/11
5 |
6 | # Import ArcPy site-package and os modules
7 | import arcpy
8 |
9 | # Inputs
10 | inlyr = arcpy.GetParameterAsText(0)
11 | desc = arcpy.Describe(inlyr)
12 | w = str(desc.catalogPath)
13 | arcpy.AddMessage("\nInput Elevation file: " + w)
14 |
15 | # Output
16 | shfl = arcpy.GetParameterAsText(1)
17 | arcpy.AddMessage("Output Stream Source file: " + shfl)
18 |
19 | # Convert tiff to shp
20 | cmd = arcpy.RasterToPolygon_conversion(w, shfl, "NO_SIMPLIFY", "Value")
21 |
--------------------------------------------------------------------------------
/src/.gitignore:
--------------------------------------------------------------------------------
1 | *.o
2 |
--------------------------------------------------------------------------------
/src/CatchOutlets.h:
--------------------------------------------------------------------------------
1 | #include "linearpart.h"
2 |
3 |
4 | //int catchoutlets(char *pfile, char *streamnetsrc, char *streamnetlyr, char *outletsdatasrc, char *outletslayer, int lyrno, float maxdist);
5 | int catchoutlets(char *pfile, char *streamnetsrc,char *outletsdatasrc, double mindist, int gwstartno, double minarea);
6 | // Incomplete implementation no capability for layers within data sources yet
7 |
--------------------------------------------------------------------------------
/src/ConnectDown.h:
--------------------------------------------------------------------------------
1 | #include "linearpart.h"
2 |
3 | int connectdown(char *pfile, char *wfile, char *ad8file, char *outletdatasrc, char *outletlyr,char *movedoutletdatasrc,char *movedoutletlyr, int movedist);
4 |
--------------------------------------------------------------------------------
/src/DinfDistDown.h:
--------------------------------------------------------------------------------
1 | // DinfDistDown.h header file
2 | int nameadd(char *full,char *arg,char *suff);
3 | int dinfdistdown(char *angfile,char *felfile,char *slpfile,char *wfile,char *srcfile,
4 | char *dtsfile,int statmethod,int typemethod,int usew, int concheck);
5 | int hdisttostreamgrd(char *angfile, char *wfile, char *srcfile, char *dtsfile, int statmethod, int usew,
6 | int concheck);
7 | int vdroptostreamgrd(char *angfile, char *felfile, char *srcfile, char *dtsfile, int statmethod, int concheck);
8 | int pdisttostreamgrd(char *angfile, char *felfile, char *wfile, char *srcfile, char *dtsfile, int statmethod,
9 | int usew, int concheck);
10 | int sdisttostreamgrd(char *angfile, char *slpfile, char *wfile, char *srcfile, char *dtsfile,
11 | int statmethod, int usew, int concheck);
12 |
13 | #define MAXLN 4096
--------------------------------------------------------------------------------
/src/DinfDistUp.h:
--------------------------------------------------------------------------------
1 | // DinfDistUp.h header file
2 |
3 | int nameadd(char *full,char *arg,char *suff);
4 | int dinfdistup(char *angfile,char *felfile,char *slpfile,char *wfile,
5 | char *dtsfile,int statmethod,int typemethod,
6 | int usew, int concheck, float thresh);
7 | int hdisttoridgegrd(char *angfile, char *wfile, char *rtrfile, int statmethod,
8 | int concheck, float thresh,int useweight);
9 | int vrisetoridgegrd(char *angfile, char *felfile, char *rtrfile, int statmethod,
10 | int concheck, float thresh);
11 | int pdisttoridgegrd(char *angfile, char *felfile, char *wfile, char *rtrfile,
12 | int statmethod, int useweight, int concheck, float thresh);
13 | int sdisttoridgegrd(char *angfile, char *slpfile, char *wfile, char *rtrfile,
14 | int statmethod, int useweight, int concheck, float thresh);
15 | #define MAXLN 4096
--------------------------------------------------------------------------------
/src/DinfUpDependencemn.cpp:
--------------------------------------------------------------------------------
1 | /* DinfUpDependencemn main program to compute D-infinity upslope dependence.
2 |
3 | David Tarboton,Teklu K Tesfa
4 | Utah State University
5 | May 23, 2010
6 |
7 | */
8 |
9 | /* Copyright (C) 2010 David Tarboton, Utah State University
10 |
11 | This program is free software; you can redistribute it and/or
12 | modify it under the terms of the GNU General Public License
13 | version 2, 1991 as published by the Free Software Foundation.
14 |
15 | This program is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU General Public License for more details.
19 |
20 | A copy of the full GNU General Public License is included in file
21 | gpl.html. This is also available at:
22 | http://www.gnu.org/copyleft/gpl.html
23 | or from:
24 | The Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 | Boston, MA 02111-1307, USA.
26 |
27 | If you wish to use or incorporate this program (or parts of it) into
28 | other software that does not meet the GNU General Public License
29 | conditions contact the author to request permission.
30 | David G. Tarboton
31 | Utah State University
32 | 8200 Old Main Hill
33 | Logan, UT 84322-8200
34 | USA
35 | http://www.engineering.usu.edu/dtarb/
36 | email: dtarb@usu.edu
37 | */
38 |
39 | // This software is distributed from http://hydrology.usu.edu/taudem/
40 |
41 |
42 | #include
43 | #include
44 | #include
45 | #include
46 | #include "commonLib.h"
47 | #include "tardemlib.h"
48 |
49 |
50 | int main(int argc,char **argv)
51 | {
52 | char angfile[MAXLN],dgfile[MAXLN],depfile[MAXLN];
53 | int err,useOutlets=0,usew=0,contcheck=1,i;
54 |
55 | if(argc < 2)
56 | {
57 | printf("Error: To run this program, use either the Simple Usage option or\n");
58 | printf("the Usage with Specific file names option\n");
59 | goto errexit;
60 | }
61 |
62 | else if(argc > 2)
63 | {
64 | i = 1;
65 | // printf("You are running %s with the Specific File Names Usage option.\n", argv[0]);
66 | }
67 | else {
68 | i = 2;
69 | // printf("You are running %s with the Simple Usage option.\n", argv[0]);
70 | }
71 | while(argc > i)
72 | {
73 | if(strcmp(argv[i],"-ang")==0)
74 | {
75 | i++;
76 | if(argc > i)
77 | {
78 | strcpy(angfile,argv[i]);
79 | i++;
80 | }
81 | else goto errexit;
82 | }
83 | else if(strcmp(argv[i],"-dg")==0)
84 | {
85 | i++;
86 | if(argc > i)
87 | {
88 | strcpy(dgfile,argv[i]);
89 | i++;
90 | }
91 | else goto errexit;
92 | }
93 | else if(strcmp(argv[i],"-dep")==0)
94 | {
95 | i++;
96 | if(argc > i)
97 | {
98 | strcpy(depfile,argv[i]);
99 | i++;
100 | }
101 | else goto errexit;
102 | }
103 | else
104 | {
105 | goto errexit;
106 | }
107 | }
108 | if( argc == 2) {
109 | nameadd(angfile,argv[1],"ang");
110 | nameadd(dgfile,argv[1],"dg");
111 | nameadd(depfile,argv[1],"dep");
112 | }
113 | if((err=depgrd(angfile,dgfile,depfile)) != 0)
114 | printf("depgrd error %d\n",err);
115 |
116 | return 0;
117 |
118 | errexit:
119 | printf("Simple Usage:\n %s \n",argv[0]);
120 | printf("Usage with specific file names:\n %s -ang \n",argv[0]);
121 | printf("-dg -dp \n");
122 | printf(" is the name of the raw digital elevation model\n");
123 | printf(" is the D-infinity flow direction input file.\n");
124 | printf(" is the disturbance input grid file.\n");
125 | printf(" is the flow dependence grid file.\n");
126 | printf("The following are appended to the file names\n");
127 | printf("before the files are opened:\n");
128 | printf("ang D-infinity flow direction input file\n");
129 | printf("dg disturbance grid (input)\n");
130 | printf("dep dependence grid (input)\n");
131 | exit(0);
132 | }
133 |
--------------------------------------------------------------------------------
/src/DropAnalysis.h:
--------------------------------------------------------------------------------
1 | #include "linearpart.h"
2 |
3 |
4 | int dropan(char *areafile, char *dirfile, char *elevfile, char *ssafile, char *dropfile,
5 | char *outletfile, float threshmin, float threshmax, int nthresh, int steptype,
6 | float *threshopt);
7 |
8 |
--------------------------------------------------------------------------------
/src/EditRastermn.cpp:
--------------------------------------------------------------------------------
1 | /* Edit Raster main program to edit grid cell values and make minor changes where necessary.
2 |
3 | David Tarboton
4 | Utah State University
5 | November 24 2016
6 |
7 | */
8 |
9 | /* Copyright (C) 2016 David Tarboton, Utah State University
10 |
11 | This program is free software; you can redistribute it and/or
12 | modify it under the terms of the GNU General Public License
13 | version 2, 1991 as published by the Free Software Foundation.
14 |
15 | This program is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU General Public License for more details.
19 |
20 | A copy of the full GNU General Public License is included in file
21 | gpl.html. This is also available at:
22 | http://www.gnu.org/copyleft/gpl.html
23 | or from:
24 | The Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 | Boston, MA 02111-1307, USA.
26 |
27 | If you wish to use or incorporate this program (or parts of it) into
28 | other software that does not meet the GNU General Public License
29 | conditions contact the author to request permission.
30 | David G. Tarboton
31 | Utah State University
32 | 8200 Old Main Hill
33 | Logan, UT 84322-8200
34 | USA
35 | http://www.engineering.usu.edu/dtarb/
36 | email: dtarb@usu.edu
37 | */
38 |
39 | // This software is distributed from http://hydrology.usu.edu/taudem/
40 |
41 | #include
42 | #include
43 | #include
44 | #include
45 | #include "commonLib.h"
46 | #include "tardemlib.h"
47 |
48 | int editraster(char *rasterfile, char *newfile, char *changefile);
49 |
50 | int main(int argc,char **argv)
51 | {
52 | char rasterfile[MAXLN],changefile[MAXLN],newfile[MAXLN];
53 | int i = 1;
54 | if(argc <= 2) goto errexit;
55 | while (argc > i)
56 | {
57 | if (strcmp(argv[i], "-in") == 0)
58 | {
59 | i++;
60 | if (argc > i)
61 | {
62 | strcpy(rasterfile, argv[i]);
63 | i++;
64 | }
65 | else goto errexit;
66 | }
67 | else if (strcmp(argv[i], "-out") == 0)
68 | {
69 | i++;
70 | if (argc > i)
71 | {
72 | strcpy(newfile, argv[i]);
73 | i++;
74 | }
75 | else goto errexit;
76 | }
77 | else if (strcmp(argv[i], "-changes") == 0)
78 | {
79 | i++;
80 | if (argc > i)
81 | {
82 | strcpy(changefile, argv[i]);
83 | i++;
84 | }
85 | else goto errexit;
86 | }
87 | else goto errexit;
88 |
89 | }
90 | int err;
91 | if( (err=editraster(rasterfile, newfile, changefile)) != 0)
92 | printf("Threshold Error %d\n",err);
93 |
94 | return 0;
95 | errexit:
96 | printf("Editraster use:\n %s -in \n",argv[0]);
97 | printf("-out \n");
98 | printf("-changes \n");
99 | return 0;
100 | }
101 |
--------------------------------------------------------------------------------
/src/InunMap.h:
--------------------------------------------------------------------------------
1 |
2 | int inunmap(char *handfile, char*catchfile, char*maskfile, char*fcfile, int maskpits, char*hpfile, char *mapfile);
3 |
--------------------------------------------------------------------------------
/src/MoveOutletsToStrm.h:
--------------------------------------------------------------------------------
1 | #include "linearpart.h"
2 |
3 |
4 | int outletstosrc(char *pfile, char *srcfile, char *outletsdatasrc, char *outletslayer,int uselyrname,int lyrno, char *outletmoveddatasrc,char *outletmovedlayer, int maxdist);
5 |
--------------------------------------------------------------------------------
/src/Node.cpp:
--------------------------------------------------------------------------------
1 | /* TauDEM node functions that are part of D8 flow direction program.
2 |
3 | David G Tarboton, Teklu K Tesfa
4 | Utah State University
5 | May 23, 2010
6 |
7 | */
8 |
9 | /* Copyright (C) 2010 David Tarboton, Utah State University
10 |
11 | This program is free software; you can redistribute it and/or
12 | modify it under the terms of the GNU General Public License
13 | version 2, 1991 as published by the Free Software Foundation.
14 |
15 | This program is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU General Public License for more details.
19 |
20 | A copy of the full GNU General Public License is included in file
21 | gpl.html. This is also available at:
22 | http://www.gnu.org/copyleft/gpl.html
23 | or from:
24 | The Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 | Boston, MA 02111-1307, USA.
26 |
27 | If you wish to use or incorporate this program (or parts of it) into
28 | other software that does not meet the GNU General Public License
29 | conditions contact the author to request permission.
30 | David G. Tarboton
31 | Utah State University
32 | 8200 Old Main Hill
33 | Logan, UT 84322-8200
34 | USA
35 | http://www.engineering.usu.edu/dtarb/
36 | email: dtarb@usu.edu
37 | */
38 |
39 | // This software is distributed from http://hydrology.usu.edu/taudem/
40 |
41 | #include "Node.h"
42 | #include "stdlib.h"
43 |
44 | //Merge: used to union pixels/cells/nodes together in the same set
45 | void merge( Node *A, Node *B) {
46 | Node *ptr1= A;
47 | Node *ptr2= B;
48 | while( ptr1->parent != NULL ) ptr1 = ptr1->parent;
49 | while( ptr2->parent != NULL ) {
50 | ptr2 = ptr2->parent;
51 | }
52 | if( ptr1 != ptr2 )
53 | ptr2->parent = ptr1;
54 | }
55 |
56 | //Collapses the unioned tree to decrease run time
57 | void collapse( Node *A ) {
58 | Node *ptr = A;
59 | Node *tmp = A;
60 | Node *parent = ptr;
61 | while( parent->parent != NULL ) parent = parent->parent;
62 | while( tmp->parent != NULL ) {
63 | tmp = tmp->parent;
64 | ptr->parent = parent;
65 | }
66 | }
67 |
68 | //setAttr of whole set
69 | void setAttr( Node *A, int newAttr ) {
70 | Node *ptr1 = A;
71 | while( ptr1->parent != NULL ) ptr1 = ptr1->parent;
72 | ptr1-> attr = newAttr;
73 | }
74 |
75 | //getAttr of whole set
76 | int getAttr( Node *A ) {
77 | Node *ptr1 = A;
78 | while( ptr1->parent != NULL ) ptr1 = ptr1->parent;
79 | return ptr1->attr;
80 | }
81 |
82 | void setID( Node *A, int newID ) {
83 | Node *ptr1 = A;
84 | while( ptr1->parent != NULL ) ptr1 = ptr1->parent;
85 | ptr1-> ID = newID;
86 | }
87 |
88 | int getID( Node *A ) {
89 | Node *ptr1 = A;
90 | while( ptr1->parent != NULL ) ptr1 = ptr1->parent;
91 | return ptr1->ID;
92 | }
93 |
--------------------------------------------------------------------------------
/src/Node.h:
--------------------------------------------------------------------------------
1 | /* TauDEM node headers that are part of D8 flow direction program.
2 |
3 | David G Tarboton, Teklu K Tesfa
4 | Utah State University
5 | May 23, 2010
6 |
7 | */
8 |
9 | /* Copyright (C) 2010 David Tarboton, Utah State University
10 |
11 | This program is free software; you can redistribute it and/or
12 | modify it under the terms of the GNU General Public License
13 | version 2, 1991 as published by the Free Software Foundation.
14 |
15 | This program is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU General Public License for more details.
19 |
20 | A copy of the full GNU General Public License is included in file
21 | gpl.html. This is also available at:
22 | http://www.gnu.org/copyleft/gpl.html
23 | or from:
24 | The Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 | Boston, MA 02111-1307, USA.
26 |
27 | If you wish to use or incorporate this program (or parts of it) into
28 | other software that does not meet the GNU General Public License
29 | conditions contact the author to request permission.
30 | David G. Tarboton
31 | Utah State University
32 | 8200 Old Main Hill
33 | Logan, UT 84322-8200
34 | USA
35 | http://www.engineering.usu.edu/dtarb/
36 | email: dtarb@usu.edu
37 | */
38 |
39 | // This software is distributed from http://hydrology.usu.edu/taudem/
40 | struct Node {
41 | int x;
42 | int y;
43 | Node *parent;
44 | short attr;
45 | short ID;
46 | };
47 |
48 |
49 | void merge( Node *A, Node *B) ;
50 | void collapse( Node *A );
51 | void setAttr( Node *A, int newAttr );
52 | int getAttr( Node *A );
53 | void setID( Node *A, int newID );
54 | int getID( Node *A );
55 |
--------------------------------------------------------------------------------
/src/SINMAPErrorCodes.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef TD_ERROR_CODES
3 |
4 | #define TD_NO_ERROR 0
5 | #define TD_FAILED_GRID_OPEN 1
6 | #define TD_FAILED_GRID_SAVE 2
7 | #define TD_FAILED_MEMORY_ALLOC 3
8 | #define TD_STACK_LARGER_THAN_GRID 4
9 | #define TD_FAILED_TO_ENLARGE_STACK 5
10 | #define TD_DROPAN_ENCOUNTERED_ZERO 6
11 | #define TD_COORDINATE_OUTSIDE_GRID 7
12 | #define TD_CHANNEL_NETWORK_MISMATCH 8
13 | #define TD_FAILED_TREEFILE_OPEN 9
14 | #define TD_FAILED_COORDFILE_OPEN 10
15 | #define TD_NEGATIVE_SA_VALUE 11
16 | #define TD_NEGATIVE_OVERLAND_DIST 12
17 | #define TD_INVALID_TABLE_INDEX 13
18 | #define TD_INVALID_TABLE_ROW_INDEX 14
19 | #define TD_TABLE_ROW_MISSING_PARAM 15
20 | #define TD_INVALID_TABLE_COL_INDEX 16
21 | #define TD_PARAM_GRID_NO_DATA 17
22 | #define TD_FAILED_WTR_SHED_GRD_OPEN 18
23 | #define TD_FAILED_CONNECT_GRD_OPEN 19
24 | #define TD_FAILED_CREATE_SHP_FILE 20
25 | #define TD_INVALID_RAINFALL_SHPFILE 21
26 | #define TD_PARAM_COUNT_INCONSISTENT 22
27 | #define TD_INVALID_VARIANT_TYPE 23
28 | #define TD_UNEXPECTED_NODATA_IN_GRD 24
29 | #define TD_FAILED_SAVE_SHPFILE 25
30 | #define TD_FAILED_GRD_INIT 26
31 | #define TD_GRID_SIZE_MISMATCH 27
32 | #define TD_FAILED_SHPFILE_OPEN 28
33 | #define TD_FAILED_GET_HEADER 29
34 | #define TD_INVALID_ARRAY_SIZE 30
35 | #define TD_FAILED_FILE_OPEN 31
36 | #define TD_FLATROUT_NO_CONVERGENCE 32
37 | #define TD_Fortran_Allocate_Error 33
38 | #define TD_Topsetup_Zero_Area_Catchment 34
39 | #define TD_INVALID_SHPFILE 35
40 | #define TD_FIELD_NOT_FOUND 36
41 | #endif //TD_ERROR_CODES
--------------------------------------------------------------------------------
/src/SetRegionmn.cpp:
--------------------------------------------------------------------------------
1 | /* Set Region main program to set grid cell values for a grid processing region as part of RWD.
2 |
3 | David Tarboton
4 | Utah State University
5 | January 15, 2017
6 |
7 | */
8 |
9 | /* Copyright (C) 2017 David Tarboton, Utah State University
10 |
11 | This program is free software; you can redistribute it and/or
12 | modify it under the terms of the GNU General Public License
13 | version 2, 1991 as published by the Free Software Foundation.
14 |
15 | This program is distributed in the hope that it will be useful,
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 | GNU General Public License for more details.
19 |
20 | A copy of the full GNU General Public License is included in file
21 | gpl.html. This is also available at:
22 | http://www.gnu.org/copyleft/gpl.html
23 | or from:
24 | The Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 | Boston, MA 02111-1307, USA.
26 |
27 | If you wish to use or incorporate this program (or parts of it) into
28 | other software that does not meet the GNU General Public License
29 | conditions contact the author to request permission.
30 | David G. Tarboton
31 | Utah State University
32 | 8200 Old Main Hill
33 | Logan, UT 84322-8200
34 | USA
35 | http://www.engineering.usu.edu/dtarb/
36 | email: dtarb@usu.edu
37 | */
38 |
39 | // This software is distributed from http://hydrology.usu.edu/taudem/
40 |
41 | #include
42 | #include
43 | #include
44 | #include
45 | #include "commonLib.h"
46 | #include "tardemlib.h"
47 |
48 | int setregion(char *fdrfile, char *regiongwfile, char *newfile, int32_t regionID);
49 |
50 | int main(int argc,char **argv)
51 | {
52 | char fdrfile[MAXLN],regiongwfile[MAXLN],newfile[MAXLN];
53 | int32_t regionID = 1;
54 | int i = 1;
55 | if(argc <= 2) goto errexit;
56 | while (argc > i)
57 | {
58 | if (strcmp(argv[i], "-p") == 0)
59 | {
60 | i++;
61 | if (argc > i)
62 | {
63 | strcpy(fdrfile, argv[i]);
64 | i++;
65 | }
66 | else goto errexit;
67 | }
68 | else if (strcmp(argv[i], "-gw") == 0)
69 | {
70 | i++;
71 | if (argc > i)
72 | {
73 | strcpy(regiongwfile, argv[i]);
74 | i++;
75 | }
76 | else goto errexit;
77 | }
78 |
79 | else if (strcmp(argv[i], "-out") == 0)
80 | {
81 | i++;
82 | if (argc > i)
83 | {
84 | strcpy(newfile, argv[i]);
85 | i++;
86 | }
87 | else goto errexit;
88 | }
89 | else if (strcmp(argv[i], "-id") == 0)
90 | {
91 | i++;
92 | if (argc > i)
93 | {
94 | sscanf(argv[i], "%d", ®ionID);
95 | i++;
96 | }
97 | else goto errexit;
98 | }
99 | else goto errexit;
100 |
101 | }
102 | int err;
103 | if( (err= setregion(fdrfile, regiongwfile, newfile, regionID) != 0))
104 | printf("Set Region Error %d\n",err);
105 |
106 | return 0;
107 | errexit:
108 | printf("SetRetion use:\n %s -p \n",argv[0]);
109 | printf("-gw \n");
110 | printf("-out