Implementing into GIS a Tool to Automate the Calculation of Physiographic Parameters of River Basins

The physiographic characterization of a basin is a fundamental element as it defines the hydrological behavior of that basin. The present work deals with the development and implementation of a tool that allows calculating in an automated manner the physiographic parameters of a basin, as well as those of the surface runoff and main river, besides other graphic elements: hypsometric curve, equivalent rectangle and profile of the main river. Such a tool was developed under Visual Basic 6 programming language and the spatial geographic component ArcObjects by ESRI; they enabled the development of a library as a final product (.dll), which can be loaded and implemented in ArcMap software. In the methodology a Conceptual Model was established, from which it was possible to identify the requirements and methods to obtain the parameters, as well as the conception and implementation of the Logical Model that includes the specific functions and also the input structures, processes and data output. Finally, the tool was tested with actual data from El Caracol river basin, located in central-southern Mexico, which showed the easiness and usefulness of it, besides the effectiveness of the results, not leaving aside the time and resources saved by the user when characterizing a basin, compared with other conventional processes.


Introduction
Nowadays, obtaining parameters from a hydrographic basin is generally performed manually, using printed cartography and undertaking painstaking processes, and the results are not always accurate, because precision depends on the criterion of the one performing the tasks.Therefore it was deemed necessary to develop a tool that facilitates the obtainment of said parameters in a simple, efficacious manner with good results in some of the most-used Geographic Information System (GIS), this under the premise that the implementation of the tool in GIS will facilitate the capture, preparation of spatial data, and later, the presentation and unfolding of results in an efficacious manner.Moreover, the development of the tool coupled to a GIS offers a powerful computing instrument for hydrologists.
The advancement in the study of hydrological aspects from computing technologies has enabled the development of GIS and hydrologic models to facilitate modeling in management and decision making about water resources.There are diverse advancements as for the development of applications for hydrological issues, this has contributed to the continuous development of this kind of tools together with GIS; but in spite of this, [1] Franco-Plata (2008) and [2] Rodríguez and Santos (2007) make it evident that there are few works oriented to obtain basin parameters.
Among the works referring to the obtaining of physiographic parameters from a basin distinguishable are HecPrepro (Hydrologic Engineering Center-PREPROcessor) and HecPrepro version 2.0 developed by [3] Hellweger (1997).[4] Ehslchlager (1991) developed an application in GRASS software, which generates information similar to that from the application Arc Hec-Prepro.[5] Díaz et al. (1999) used ArcInfo and ArcView 3.0 software to employ functions of analysis in the calculation of physiographic parameters.Arc-Hydro ( [6] Maidment, 2002) is a model of geospatial and temporary data to manage and administrate hydrologic information supported on ArcGIS.[7] Franco-Plata (2006), implemented a geomatic module to extract the physiographic parameters of a basin.[2] Rodríguez and Santos, (2007) retook the above mentioned work making adjustments and incorporating some missing parameters, with the purpose of making the module more efficacious on ArcView 3.2 platform.[1] Franco-Plata (2008) developed a hydrogeomatic module in the raster platform of the GIS Idrisi for the availability of water resources, it is worth underscoring that this application incorporated new hydrological calculations such as evapotranspiration, infiltration and surface runoff, to mention a few, besides the most indispensable physiographic calculations to characterize hydrographic basins, from a DEM and the basin limit.
As it is noticed, the evolution of the development of various platforms for hydrological analysis has experienced and created new concepts and ideas as for the treatment of information, since it is a support to accomplish the unification of some methods and techniques to evaluate hydrological issues.

Theoretical-Methodological Support
The reaction of a hydrological basin to precipitations is a phenomenon not still fully grasped; the studies on several components of the hydrological cycle and the relationships between them, in particular the process of rain-runoff, have been the object of many works ( [8] Chebani et al., 1992; [9] Llamas, 1993; [10] Ouarda et al., 2008).Hydrologic analysis uses various statistical methods to compare basins in views of evidencing the causes for the variations of hydrologic characteristics.For instance, it is sought to explain why two hydrologic basins under the same climatic conditions may have runoff regimes utterly different; physiographic characteristics have a very important role in hydrologic processes.
Several techniques are nowadays used to relate the design flows to the physiographic characteristics.For instance, [8] Cheibani et al. (1992) established an equation that produces the flow for the return period for ten years with the area of the basin, its mean slope and drainage density.[11] Campos-Aranda (2008) related monthly runoffs from several basins, their respective areas and distances between hydrometric stations in order to transfer the monthly runoffs of these basins to another for which there is no hydrometric information.Separately, [10]  Additionally, in hydrology there are many empirical equations, either for the calculations of concentration time of a basin or the determination of a design flow, all of these formulas use one or more physiographic parameters.[1] Franco-Plata (2008) mentions that the physic-ographic characteristics of a basin have a fundamental role in the study and behavior in the components of the hydrological cycle, therefore some parameters are required as input data in most hydrological models.Also, is considered as watershed physiographic parameters (Table 1) to that determined by initial data quantification, which involves managing the relief models and hydrological network deriving quantifiable characteristics of a watershed.
It is important to distinguish that numberless calculations can be obtained from a basin, but nonetheless this research focused on the physiographic characterization of a basin from its morphology, drainage and the characteristics of the main river.The morphometric characteristics of a hydrographic basin offer a physical description of their extension and forms, thus enabling comparisons between different hydrographic basins.
As for the technologies applied in the present study, GIS have been defined in various forms ( [12] Bernhardsen, 1999; [13]  point of view of the author assumed in this field, when comparing the definitions however, elements in common appear: spatial information, spatial data, spatially referenced data; all pinpoints at the spatial data as that which differences GIS from other specialized databases, representing the center around which all the possible applications of GIS orbit; hence, spatial data contains, in its most elemental concept, characteristics of localization (X, Y) and sort of thematic characteristic (Z), on which rests the base of all the operations possible to perform in a GIS.
Usually, the use of GIS applied to hydrological modeling offers benefits in the representation and simulation of problems that require interpretation and analysis of spatial information ( [17] Farías de Reyes and Reyes, 2001).[1] Franco-Plata (2008) mentions that GIS can actuate as a platform to experiment new ideas and concepts as for the processing of hydrological information, as they become a valuable support to attain the systemic integration of methods and techniques to carry out the evaluation of water resources as for water availability, from the natural water balance of a basin.Thus, the use of GIS has had a great boom in the hydrological sphere for the development of interfaces or applications of spatial and temporary simulation.

Material and Method
In the present work, ArcGIS Desktop was used because of the broad range of applications that can be generated by means of resorting to the component of ArcObjects with Visual Basic 6 (VB6), which allowed creating a DLL (Dynamic Link Library) that can be integrated into ArcGIS Desktop to carry out the calculation of the physiographic parameters of a basin.
VB6 programming language is oriented to create programs for Windows, being able to incorporate all the elements of this computing platform: windows, buttons, dialog and text boxes, option or selection boxes, displacement bars, graphics and menus, among other.Said objects were utilized with the intention of providing the tool with a better graphical appearance, since the properties and methods of these objects do not allow the developer the manipulation of geographical data or spatial objects for they are solely oriented to develop pure computing applications, thereby it was necessary to install the spatial component ArcObjects, which enabled the use of ESRI specific libraries, to manipulate the spatial objects and so being able to calculate the physiographic parameters of a basin.Then VB6 together with ArcObjects allowed automating some of the most important tasks, such as the selection of libraries, references, compilation and registration, generator of line number, generator of errors in code and the implementation of the tools that were employed, and the most important was the generation of a code that enabled the automation of all the processes to produce the physiographic parameters, among other things.
It is important to mention that ArcObjects technology uses and meets the regulations of the component object model (COM) and using it allows developing new tools, functions or creating work flows on ArcGIS.To fulfill the stated objective, the project underwent the following methodological stages proposed by [18] Franco et al.

Requirements Analysis
As previously indicated, the obtaining of physiographic parameters of a basin provides the adequate bases to accomplish an assessment of the hydrologic resources in a basin; such is the case referring to water availability.Therefore, the development of the application was glimpsed as one that will supply effectiveness and repercussion in saving time and resources oriented to obtain physiographic parameters, which would help hydrologists and all those specialists in water sciences, as for decision making and planning, as well as for the integrated management of these resources.
Moreover, noticeable was the necessity of having sufficient knowledge on hydrology, physiographic parameters, programming in Visual Basic 6 and ArcObjects in views of materializing the GIS tool for the automated and efficacious calculation of the physiographic parameters of a basin; we dealt with these issues resorting to experts in each of the indicated topics.

Conceptual Model
The conceptual model as a theoretical and strategic backbone of the project development allowed identifying the different interactions between each of the processes and parameters when obtaining the tool, with the aim of choosing the methods to develop for each element on the basis of the requirement analysis and information availability.In Figure 1, there is an instance of the conceptual model, in which the set of processes necessary to generate the physiographic parameters considered in the research is schematically represented; the inputs that will feed the processes are identified.By the end of this stage, the conceptual models to obtain the physiographic parameters, hypsometric curve, equivalent rectangle and profile of the main river were produced.

Geomatic Model
The geomatic model is the representation of a conceptual model, which indeed helps schematize and understand the stages of solving a problem, yet from a geomatic environment and perspective, in which the spatial aspect is  distinguished.For the general schematization flow diagrams were employed to represent the logical sequence followed to solve each of the conceptual models stated in the previous stage.In Figure 2, an instance of the geo-matic models generated for the project is shown.

Implementation
From the geomatic model obtained in the previous sec tion were selected the tools that allowed translating the model into the computing language to perform the automated processes required by the application.It was considered that the user interface was of the utmost importance to familiarize the user with the application and its elements, and thus make its adequate use and handling easy.
The hydrogeomatic interface called "HidroCuenca" was implemented in Visual Basic 6 with the ArcObjects spatial geographic component, in such manner that it is composed of 4 class modules, 22 modules with 65 scripts; as for Help, FlashMx 2004 was used.Once the implementation was installed, the tool was incorporated in ArcMap as a menu to amicably show the application tools (Figure 3).

Results
The main window of the GIS tool (Figure 4 and Table 2) shows the interface for the calculation of physiographic parameters; likewise, the necessary objects that allow processing input and output data are also displayed.

Application to a Case Study
In order to prove the functionality of the new generated GIS tool, an application exercise to El Caracol sub-basin in Mexico was made; this basin is found within that of Balsas River, which on its own belongs to the 18th Hydrological Region established by the program of Priority Hydrological Regions of the National Commission for the Knowledge and Use of Biodiversity (ComisiónNacional para el Conocimiento y Uso de la Biodiversidad, CONABIO) of the Federal Government.The study zone is located between the geographic coordinates 19˚42'04.39''N,17˚04'04.84''N,and 99˚38'11.51''W,97˚38'11.51''W(Figure 5).
To evaluate the physiographic parameters of the river basin three files were utilized; two in vector format (hydrological network and basin polygon) and one in raster format (DEM) (Figure 6).In this point is important to underline the exposed by [19] Pineda et al. (2012) when they said that it is very important to use data of good quality because results depend of these data.To carry out the automated calculation, the user must start in the "Hi-droCuenca" menu and click on "Cálculo de parámetros fisiográficos" to open the window shown in Figure 7, which is where the aforementioned files are entered.
Once the layers have been entered, is necessary to capture in the tool the name that will be assigned to the results and the folder in which these data will be stored; this in the "Salidas" (Outputs) section (shown in the "interface window" in Figure 7).Once the input and output have been indicated, by clicking on "Procesar" (To process) button so that the tool starts calculating the physiographic parameters of the basin under study and the results are unfolded: hypsometric curve (Figure 8); equivalent rectangle (Figure 9); Strahler drainage order (Figure 10); main river (Figure 11); and the longitudinal profile of the main river (Figure 12).
Likewise, the tool generates attribute tables associated to the results; these are the attributes with the physicographic parameters of the basin, those of the main river, and the attributes of the drainage network (Figure 13).
In views of having a means to compare and validate the obtained results, the same parameters were produced in the ordinary manner, in an exercise carried out manu ally from printed maps from the National Institute of Statistics and Geography (Instituto Nacional de Estadística y Geografía, INEGI).The results obtained from both procedures are shown in Table 3.
A comparative analysis of the values shown in the previous table allows verifying that processes carried out         in the GIS tool were correct, whose processing time lasted for about two hours.

Conclusions
The method employed in the research allowed designing and implementing a GIS tool for the calculation of the physiographic parameters of a basin; by means of applying said tool, it was possible to corroborate and mainly verify the saving of time and resources compared with other systems devoted to the obtaining of parameters.Even if it is true that the results may vary in a negligible way with other commercial systems utilized to obtain physiographic parameters, this can be due to the difference between the applied formulas or method.When comparing the obtained values with others generated by means of different frameworks, they reflect the usefulness of HidroCuenca tool and its application in a GIS platform and in projects in which the hydrological analysis of basins is necessary.
Although the development of applications in the hydrological sphere has been developing in a significant manner, it is worth distinguishing that the numbers of commissioned applications to calculate physiographic parameters are very few; therefore, the present work represents an important and innovative effort to calculate said parameters for a basin.The implementation of the developed GIS tool automated and simplified diverse tasks as for the calculation of physiographic parameters (to name a few: Strahler orders, direction of the flow of rivers, obtaining of main river, hypsometric curve, equivalent rectangle, profile of main river, etc.), thus preventing the users from using time resorting to other spatial analysis modules to obtain said parameters, instead a single interface is offered for this task in a simple, efficacious and automated manner.
In the international, national and regional spheres the topic of basin management becomes more important by the day; not only is it the interest and concern of the actors and those directly involved: communities, local organizations, municipalities, national institutions, etc., but also of donor and cooperating organizations.It is intended, due to this reason, to use information and geographic technologies to develop automated products that facilitate decision making for better water management.
Finally, it is important to underscore that in the presence of poor-quality input data, the interface does not guarantee the correct acquisition of physiographic parameters.
Ouarda et al. (2008) related the physiographic parameters of several sub-basins of Balsas, Lerma-Santiago and Panuco Rivers with the quantiles of different return periods.

Figure 1 .
Figure 1.Example of a conceptual model.

Figure 2 .
Figure 2. Example of a geomatic model.

Figure 3 .Figure 4 .
Figure 3. Access through a menu to the implemented tool.

Figure 5 .Figure 4
Figure 5. Localization of El Caracol river basin.Table 2. Explanation of the user interface components of the GIS tool to calculate the physiographic parameters of a basin (Figure 4).Letter Object Function A ComboBox List of shapefile and layer files (polylines).B ComboBox List of shapefile and layer files (polygons).C ComboBox List of files grid, raster dataset (DEM).D Button (CommandButton) Shows a textbox to enter data and establish an exit path.E Button (CommandButton) Terminates the application.F Text box (TextBox) Space established for the user to assign a word (letters or numbers) so that they identify their information, after being processed.G Text box (TextBox) Specifies the storing path of the final files.H Button (CommandButton) Executes the program to obtain the physiographic parameters of the basin.I Movie (ShockwaveFlash) Area that shows the hydrographic model in a flash file.J Button (CommandButton) Calls the help system of the application.K Movie (ShockwaveFlash) Displays the name of the institutions that developed the project and the name of the authors.

Figure 7 .
Figure 7. Window to enter the necessary data to calculate the physiographic parameters of a basin.Figure 6.Necessary input layers for the GIS tool.

Figure 9 .
Figure 9. Equivalent rectangle of El Caracol river basin.

Figure 10 .
Figure 10.Determination of Strahler drainage order for El Caracol river basin, the maximum order was six.

Figure 11 .
Figure 11.Determination of main river from the input drainage network.

Figure 12 .
Figure 12.Longitudinal profile of the main river.

Figure 13 .
Figure 13.Attribute tables with the main parameters.