1 /**********************************************************
2  * Version $Id$
3  *********************************************************/
4 
5 ///////////////////////////////////////////////////////////
6 //                                                       //
7 //                         SAGA                          //
8 //                                                       //
9 //      System for Automated Geoscientific Analyses      //
10 //                                                       //
11 //                     Tool Library                      //
12 //                      ta_channels                      //
13 //                                                       //
14 //-------------------------------------------------------//
15 //                                                       //
16 //               ChannelNetwork_Distance.h               //
17 //                                                       //
18 //                 Copyright (C) 2003 by                 //
19 //                      Olaf Conrad                      //
20 //                                                       //
21 //-------------------------------------------------------//
22 //                                                       //
23 // This file is part of 'SAGA - System for Automated     //
24 // Geoscientific Analyses'. SAGA is free software; you   //
25 // can redistribute it and/or modify it under the terms  //
26 // of the GNU General Public License as published by the //
27 // Free Software Foundation, either version 2 of the     //
28 // License, or (at your option) any later version.       //
29 //                                                       //
30 // SAGA is distributed in the hope that it will be       //
31 // useful, but WITHOUT ANY WARRANTY; without even the    //
32 // implied warranty of MERCHANTABILITY or FITNESS FOR A  //
33 // PARTICULAR PURPOSE. See the GNU General Public        //
34 // License for more details.                             //
35 //                                                       //
36 // You should have received a copy of the GNU General    //
37 // Public License along with this program; if not, see   //
38 // <http://www.gnu.org/licenses/>.                       //
39 //                                                       //
40 //-------------------------------------------------------//
41 //                                                       //
42 //    e-mail:     oconrad@saga-gis.org                   //
43 //                                                       //
44 //    contact:    Olaf Conrad                            //
45 //                Institute of Geography                 //
46 //                University of Goettingen               //
47 //                Goldschmidtstr. 5                      //
48 //                37077 Goettingen                       //
49 //                Germany                                //
50 //                                                       //
51 ///////////////////////////////////////////////////////////
52 
53 //---------------------------------------------------------
54 
55 
56 ///////////////////////////////////////////////////////////
57 //														 //
58 //														 //
59 //														 //
60 ///////////////////////////////////////////////////////////
61 
62 //---------------------------------------------------------
63 #ifndef HEADER_INCLUDED__ChannelNetwork_Distance_H
64 #define HEADER_INCLUDED__ChannelNetwork_Distance_H
65 
66 
67 ///////////////////////////////////////////////////////////
68 //														 //
69 //														 //
70 //														 //
71 ///////////////////////////////////////////////////////////
72 
73 //---------------------------------------------------------
74 #include "MLB_Interface.h"
75 
76 
77 ///////////////////////////////////////////////////////////
78 //														 //
79 //														 //
80 //														 //
81 ///////////////////////////////////////////////////////////
82 
83 //---------------------------------------------------------
84 class CChannelNetwork_Distance : public CSG_Tool_Grid
85 {
86 public:
87 	CChannelNetwork_Distance(void);
88 
89 
90 protected:
91 
92 	virtual int				On_Parameters_Enable	(CSG_Parameters *pParameters, CSG_Parameter *pParameter);
93 
94 	virtual bool			On_Execute				(void);
95 
96 
97 private:
98 
99 	double					m_Flow_B, m_Flow_K, m_Flow_R;
100 
101 	CSG_Grid				*m_pDEM, *m_pChannels, *m_pRoute, *m_pFlow_K, *m_pFlow_R,
102 							*m_pDistance, *m_pDistVert, *m_pDistHorz,
103 							*m_pFields, *m_pPasses, *m_pTime, *m_pSDR;
104 
105 
106 	bool					is_Channel				(int x, int y, bool bBoundary);
107 
108 	double					Get_Travel_Time			(int x, int y, int Direction);
109 
110 	bool					Get_D8					(int x, int y, int &Direction);
111 	bool					Set_D8					(int x, int y);
112 
113 	bool					Get_MFD					(int x, int y, CSG_Vector &Flow);
114 	bool					Set_MFD					(int x, int y);
115 
116 };
117 
118 
119 ///////////////////////////////////////////////////////////
120 //														 //
121 //														 //
122 //														 //
123 ///////////////////////////////////////////////////////////
124 
125 //---------------------------------------------------------
126 #endif // #ifndef HEADER_INCLUDED__ChannelNetwork_Distance_H
127