Fax: +46 26 53 83 11. Homepage: www.hig.se/t-inst/ ..... manual editing of MIKE21 Bathymetry which is a time-consuming process. Alternatively, a. C++ program ...
Predicting Flood Inundation and Risk Using Geographic Information System and Hydrodynamic Model: A Technical Report on the Case Study at Eskilstuna
Xihua Yang, Guest Researcher Department of Technology, University of Gävle, SE-801 76 Gävle, Sweden (Host) School of Information Technology, Charles Sturt University, Bathurst, NSW 2795, Australia (Home)
Anders Grönlund and Solgerd Tanzilli The National Land Survey, 801 82 Gävle, Sweden
June 2001
Gävle GIS Institute, University of Gävle. Postal address: SE-801 76 Gävle, Sweden. Visiting address: Kungsängsvägen 2, Gävle. Phone: +46 26 64 85 00. Fax: +46 26 53 83 11. Homepage: www.hig.se/t-inst/gig
Foreword
High flows of water is a common problem in most rivers. Earlier generations were more aware of the risks to build close to the rivers and the highest water level was locally known. Nowadays, building permits are more and more frequent below that level. Furthermore, forestry methods with clear cuts and drainage of wetlands result in a more rapid effect of heavy rain fall on the water flow in the rivers. The Swedish Meteorological and Hydrological Institute (SMHI) measures the amount of rainfall in the catchment area and calculates the flow in the streams and rivers. When the flow become high a warning is given. The problem dealt with in this study is to model the water overflow and estimate the economical and environmental risks when areas along the rivers are flooded. To cope with this and similar problems the four governmental agencies Lantmäteriet (National Land Survey), Swedish Geological Survey (SGU), SMHI and the National Ship Administration jointly created the project KRIS-GISπ. This study is a feasibility study, where the Digital Landscape Model has been created by using topographic data from Lantmäteriet. SMHI has submitted values for the water flow and Lantmäteriet data on property and building values from the Land Information System. With these data as input the hydrological model MIKE21 has been used to simulate the water flow and inundation. Many thanks to the data providers and the company DHI, who provided a license for MIKE21 free of charge. Special thanks to the authors of this report and especially to Dr Xihua Yang, who managed to produce this work during his three months stay in Gävle. Gävle, June 28, 2001
Bengt Rystedt
2
Table of Content Content
Page
LIST OF FIGURES ..................................................................................................................4 LIST OF TABLES ...................................................................................................................5 1. SUMMARY .....................................................................................................................6 1.1. English Summary 1.2. Swedish Summary 2. THE PROBLEM ...............................................................................................................7 3. THE BACKGROUND ........................................................................................................7 4. THE STUDY AREA ..........................................................................................................8 5. THE DATA SETS AND PREPROCESSING............................................................................9 6. THE METHODS AND PROCEDURES ................................................................................11 6.1. The System ..............................................................................................................11 6.2. The Integration .......................................................................................................12 6.3. The Procedures .......................................................................................................14 7. THE RESULTS AND DISCUSSIONS ..................................................................................16 8. CONCLUSIONS AND FURTHER DIRECTIONS ...................................................................20 9. ACKNOWLEDGMENT ....................................................................................................22 10. REFERENCES ..............................................................................................................22 11. APPENDIX A: AML PROGRAM (MIKE21.AML)...........................................................23 12. APPENDIX B: C++ PROGRAM (TRANS.CPP) .................................................................27
3
List of Figures FIGURE 1. DIAGRAM OF THE INTEGRATED GIS AND HYDRODYNAMIC MODELLING SYSTEM......11 FIGURE 2. AN EXAMPLE BATHYMETRY (DT2) GENERATED USING C++ PROGRAM...................13 FIGURE 3. THE C++ PROGRAM INTERFACE FOR ASCII GRID TO MIKE21 CONVERSION. ........14 FIGURE 4. FLOWCHART OF THE DATA PROCESSING AND MODELLING PROCEDURES. .................15 FIGURE 5. AN ANIMATION OF THE FLOOD FLOW USING MIKE21 ANIMATE. .............................16 FIGURE 6. COMPARISONS OF AFFECTED AREAS RESULTED FROM DIFFERENT CELL SIZES (SPACING)……………………………………………………………………..........18 FIGURE 7. COMPARISONS OF AFFECTED AREAS RESULTED FROM DIFFERENT MANNING’S RESISTANCE NUMBERS...........................................................................................18 FIGURE 8. THE AFFECTED BUILDINGS (WITHIN THE POLYGON) WITH A 100 YEAR FLOOD EVENT.......................................................................................................................19
4
List of Tables TABLE 1. SUMMARY OF DEM GRIDS GENERATED FROM ORIGINAL ELEVATION DATA .................9 TABLE 2. LIST OF GIS DATA LAYERS PREPARED AND USED IN THE FLOOD STUDY. ...................10 TABLE 3. COMPARISONS OF MODEL RESULTS USING DIFFERENT SETTINGS. ..............................17
5
1
Summary
1.1
English Summary
This study is an attempt to develop an integrated methodology for flood prediction using geographic information systems (GIS) and hydrodynamic modelling and to obtain flood information for flood emergency planning. The feasibility of simulating a flood event along a river channel is explored in areas near residential development in Eskilstuna community, Sweden. Hydrologically corrected digital elevation models (DEM) were created using ANUDEM algorithms available in ARC/INFO GIS (TOPOGRID Module). Other relevant databases (such as real estate, buildings, river channels) are topologically corrected and attributed for analysis. These data are then used to prepare inputs to MIKE21 in the specific formats for the hydrodynamic modelling, and the outputs from MIKE21 are then transferred back to GIS for visualisation and analysis. Specific Arc Macro Language (AML) and C++ programs have been developed for these data conversion and integration. Snapshots at desired time steps and animations are generated in both the GIS and MIKE21 software. ARC/INFO GIS is used for data preparation, integration and analysis, and ArcView GIS is used to assist visualisation for end users. Field measurements were carried out to validate the hydrologic settings and assess the accuracy. The results of this study show that integration of GIS and hydrodynamic modelling is an efficient way to predict flood and obtain flood information for emergency response planning and evaluation of the degree of risk posed to local community. KEYWORDS: GIS, DEM, FLOOD, MIKE21, RISK 1.2
Swedish Summary
I denna studie redovisas ett försök att förutsäga effekter av höga vattenflöden genom att tillämpa geografisk informationsteknik tillsammans med hydrodynamisk modellering. Data till studien har hämtats från Lantmäteriet och SMHI. I första steget omformades Lantmäteriets topografiska data inklusive höjddata till en datamodell som kunde fungera som indata till MIKE21, en programvara från Danmarks Hydrologiska Institut, för simulering av vattnets utbredning vid olika flödesnivåer. Genom att även data om fastigheter och byggnader integrerades i datamodellen har även berörda ägare och skador på fast egendom kunnat uppskattas. För konvertering och anpassning av data till de olika programvaror som använts krävdes en del programmering i C++ och AML (ArcInfos programmeringsspråk). Studien har genomförts med Eskilstunaån och dess omgivning som försöksområde. Eskilstunaån rinner från Hjälmaren till Mälaren och är således ett ganska kort vattendrag. I studien ingick ett fältbesök för att validera modellens parametrar för flödesmotståndet, såväl i själva vattendraget som över ytorna vid sidan av vattendraget. Resultaten redovisas i form av tabeller och kartor producerade med GIS-programvaran ArcView. Genom att vid bestämda tider redovisa resultatet av simuleringen kan översvämningen visas som en animerad bildsekvens. Studien visar att integration av GIS med hydrodynamisk modellering är en effektiv metod för att förutsäga vattnets utbredning vid höga flöden och att erhålla information om vilka
6
fastigheter som riskerar att bli skadade. Därmed visas också möjligheterna att ta fram bra underlag för den kommunala beredskapsplaneringen.
2
The Problem
Spring and autumn floods frequently occur in northern and central Sweden which result in damage to property, crops and negative impacts on human welfare. It is of great value in the planning process at a regional and local level to be able to predict, prevent and remedy the effects of flooding in an efficient way. Modelling and simulations that combine the available data in an accurate way are crucial tools and form a basis for a suitable decision making system concerning civil emergency planning. This study is to predict flooding area and the associated risks for a flood event using a geographic information system (GIS) and hydraulic numerical modeling tool MIKE 21 (DHI, 2000a). It attempts to address these questions frequently asked in flood management and control: • • •
Which areas are to be flooded or at risk of a given flood event? What is the social and environmental cost of a flood? How soon will a flood reach to a sensitive point?
The specific objectives of this study are to: • • •
3
develop methods and procedures for integrating GIS and hydrologic model (MIKE21); estimate and map the flooding areas and risks at a designed flood (e.g. 100-year); and implement these modules in a GIS for visualisation and informed decision making.
The Background
Estimation of flood inundation and its risk is increasingly a major task in relevant national and local government bodies in Sweden and world-wide. Prediction of flood inundation is not straightforward since the flood inundation extent is highly dependent on topography and it changes with time (dynamic). When bankful flow depth is reached in a flood event, water ceases to be contained solely in the main river channel and water spills onto adjacent floodplains. This consists a one-D hydraulic routing procedure for channel flow, 2D over floodplain to enable simulation of flood water depth and hence inundation extent. These make the flood prediction a very complex process in both spatial an temporal contexts. Conventional engineering methods are time consuming, and visual display of the planning scheme for a catchment is rudimentary. Geographic information systems have the potential to overcome all these problems. These problems can be partially overcome by the integration of hydrodynamic model with GIS. Thus the outputs from model can be used in GIS along with other spatial data for analysis and visualisation. Incorporating MIKE 21's capabilities with a GIS allow for analysis of the full impacts on flood extents, flood depths, flood damage of present or future (e.g., "WHAT IF" scenarios). Flood damage assessment from a cost/benefit analysis can also be linked to an optimisation module. The optimisation module allows for investigating different strategies for alleviating and diverting floods. At all stages of the integrated process model results can be presented to decision-makers in a clear and easily understandable formats.
7
4
The Study Area
This case study is a part of the project called KRIS-GIS® which started from an exercise called Kolinda. In Kolinda the area for the exercise was Mälardalen. One of municipalities in Mälardalen is Eskilstuna, which is located about 100 km west to Stockholm. When the preliminary study for KRIS-GIS® started, Eskilstuna made eight scenarios over risks in the municipality. Flooding assessment is one of these consequences with a higher priority.
The Eskilstuna catchment area with available DEM has an average elevation of 20.5 m (MSL) ranging from 0 to 69.2 m (MSL). A subset area was selected along the river with an area of 84 km2 (6 km by 14 km) and used as working area in the hydrodynamic model. The surface elevations in the working area range from 0.7 m to 58.9 m (MSL) with an average of 19.7 m (MSL). Such a subset is just large enough to represent the river and the surrounding surfaces so that the computing time is reduced to minimum in the hydrodynamic model but without sacrifice to information loss. The river runs primarily from south to north between Hjälmaren Lake and Mälaren Lake with a total length of approximately 25 km. River elevations range from 23 m at the inlet (south) to 0 m (MSL) at the outlet (north). The river width at most locations is at the range between 50 m to 80 m, and depth from 4 m to 10 m. There are 12 dams (include flood gates) along the river for water regulation and flood control. The river banks are normally very low, some part of the river is even higher than the ground surface. Most buildings and residential areas are within a buffer zone of one km from the river, thus subject to flood and pose great risk if there is a severe flood event.
8
5
The Data Sets and Preprocessing
There are generally two types of data sets have been used in this study: spatial and nonspatial data. Spatial data include digital elevation model (DEM), channel network, dams or flood gates, watershed boundary and buildings/properties. Nonspatial data are inflow discharge, land/building values, weather data and channel geometric data. Most of these data sets were available from the National Land Survey (NLS) of Sweden at the time of the project commencement, but not topologically ready for GIS analysis. Thus significant time has been spent on data editing and preprocessing before these can be used in GIS and hydrological modelling. DEM is critical and most important among the spatial data sets. The DEM data received from the National Land Survey came in the form of ASCII files (10G5G.G to 10G8I.G) containing UTM coordinates and elevations in meters with 1 m vertical and 50 m horizontal resolutions. The DEM data were first merged to form the surface elevation for the whole study area (GRD58) which is about 84 km2. It is advantageous to combine the points into one file, rather than to process the files individually and later merge them on the GIS. This eliminates problems with edge effects. Then the merged DEM was further processed to remove peaks and sinks so that it is hydrologically correct for hydrodynamic modelling. The TOPOGRID module in ARC/INFO GIS was used to generate hydrologically corrected DEM (HYDRO58). The algorithm generates a DEM using an iterative technique of finite difference interpolation developed by Hutchinson (1989) which optimises flow model and maintains the integrity of the input data while simultaneously ensuring surface continuity. A subset DEM (SUB50) was then created and resampled to 100 m (SUB100) and 150 m (SUB150) resolutions respectively for later use in hydrodynamic model. These DEM subsets were further merged with river elevation grids (RIV50, RIV100 and RIV150) to create combined surface elevation grids (SUBHD50, SUBHD100, SUBHD150) which represent both river and land surface elevations and are used further to prepare MIKE21 model inputs. These DEM grids are summarised in Table 1: Table 1. Summary of DEM grids generated from original elevation data. DEM Grid
Xmin (m)
Ymin (m)
*HYDRO58 SUB50 SUB100 SUB150 SUBHD50 SUBHD100 SUBHD150
1529975 1536000 1536000 1536000 1536000 1536000 1536000
6574975 6577000 6577000 6577000 6577000 6577000 6577000
No. of No. of Rows Col.
Cell Size (m)
Elevation range (m)
401 280 140 93 280 140 93
50 50 100 150 50 100 150
0 – 69.2 0.7 – 58.9 0.7 – 58.9 0.7 – 58.9 0.7 – 58.9 0.7 – 58.9 0.7 – 58.9
301 120 60 40 120 60 40
Average elevation (m) 20.573 19.746 19.812 19.806 19.727 19.754 19.728
*: Note that HYDRO58 (the hydrologically corrected DEM) is the only grid needed as data source in the analysis and modelling, other grids can be generated from it using MIKE21.AML program or manual processing.
9
The building data came in ArcView Shape file with only line features. Specific procedures were developed to geocode the attributes using the internal topological relationships and to convert into polygon format. Very tiny building features were removed but 99% of them remained. We found that these procedures are effective, and further editing is performed to get rid of non-building features. Then polygon topology was built and attribute information generated for further analysis. The building values were estimated and added into the attributes based on the type of building and their areas (sizes). The property data also came in Shape file (AY_MILI.SHP) but its ‘value’ information came separately with a MS access file (TAXERING.MDB). The MDB file was then joined with the property layer through the common identification (FNR_FDS field) to create a property layer (AY_MILI) with correct value information (including land, building and total values and the use) for each block. These are to be used in flood risk assessment later. Channel network was created from the existing river data which are CAD drawing with double lines for river representation. The main channel was digitised and all necessary information was encoded including river elevation (Z), sections with different discharges (e.g. W100 and WDIM), and special nodes representing locations of dams or flood gates. The main river channel layer (MAIN) was also rasterised (using elevation Z item) and merged with the DEM grids to create the combined surface elevation for hydrodynamic modelling. Dams and flood gates are stored as point data layer, but their locations are transferred on to the channel data layer (MAIN) for hydrodynamic modelling and network analysis. These data are useful as control points (“Source and Sink”) in the hydrodynamic modelling. In addition, watershed boundary was generated from the hydrologically corrected DEM (HYDRO58). Contours, land use, orthographic aerial photo were also collected and used for visualisation and flood planning. These data layers are list in Table 2. Table 2. List of GIS data layers prepared and used in the flood study. Coverage Name *AY_MILI CONTOUR DAMS HUSL *MAIN RIVER WATERSHED ORTH
Description Property data layer with values Contour layer at 1 m interval Dams and flood gates Buildings Main river channel with River network Watershed boundary Orthographic aerial photo (.IMG)
Usage Risk assessment DEM creation and comparison Hydrodynamic modelling Risk assessment Hydrodynamic modelling Network analysis Hydrologic modelling Visualisation
*: Note that these data layers marked with * are directly used in the analysis and modelling, others are used as ancillary data and for visualisation.
10
6
The Methods and Procedures
6.1
The System
This research aims to develop an integrated approach incorporating a hydrodynamic model (MIKE21) with a GIS to predict a flood event in both spatial and temporal contexts. The research focus is, however, on the integration and the specialised data processing techniques to obtain flood information on 1) flood flow rates and discharges, 2) flooding inundating areas, 3) flood damage and risks. These information can be directly used for flood management and planning such as 1) evaluating flood control practices; 2) developing and screening flood management plans; and 3) predicting the downstream movement of flood and locate the buildings or properties are likely to be affected. Generally, there are four types of integration methods: 1) Embedding GIS-like functionalities into hydrological modeling packages; 2) Embedding hydrological modeling into GIS packages; 3) Loose coupling; 4) Tight coupling (Sui and Maggio, 1999). According to this classification, we chose a loose coupling method for this study since it suits our purpose and others are out of the scope of this study within our time frame (three months). In such an integration, GIS and hydrologic model remain separate, but loosely linked through data input and output (Figure 1). This is a modular approach, thus more generic, and every module can be easily replaced and updated once a better one becomes available. In this study, the system includes the GIS, the hydrodynamic model (MIKE21), GIS databases and interfacing executable programs. Most of these programs are to be developed using Arc Macro Language (AML) and C++ running in ARC/INFO and in Window’s environment.
Databas Flood area
DEM GRID
Interface
Mike21
GIS
Flood mapping
Figure 1. Diagram of the integrated GIS and hydrodynamic modelling system.
We chose ARC/INFO GIS since it is a professional GIS package and fully functional. It supports spatial editing, topology building, vector and grid modelling, macro language, network analysis and data import and export. These functions are used intensively in this study for spatial data preprocessing (as discussed in Section 5), vector and grid data editing, programming, and data conversion. We use version 7.2.1 which runs in a UNIX platform.
11
We chose MIKE21 for hydrodynamic modelling. MIKE21 is a two dimensional, finite difference hydrodynamic flow model available from the DHI Water & Environment (DHI, 2001b). MIKE21 solves the vertically integrated equations of continuity and conservation of momentum in two horizontal dimensions. We chose a two-dimensional flow model since we realised that one-dimensional models were not adequate to describe certain types of terrain, such as flood plain areas, overland topography, split flow scenarios, etc. In addition, MIKE21 has a modular structure where water quality modules and sediment transport modules are available as add-on modules to the MIKE21 hydrodynamic module. In addition, ArcView (Version 3.2) has been used for visualisation. All outputs are transferred into ArcView and a flood project file (FLOOD.APR) has been created for easy query, visualisation and mapping. It is where the end user and manager can access the research outcomes for informed decision making and planning. 6.2
The Integration
After the data preprocessing as presented in Section 5, the hydrologically corrected elevation GRID, combined with the river elevation, was converted to an ASCII file with an information header using the GRIDASCII command. An AML program (MIKE21.AML, see Appendix A) has been developed to perform all these data processing tasks and go all the way from DEM grid to produce an elevation XYZ input and an ASCII elevation grid (.ASC) in negative values (as required by MIKE21 model), and resample to different cell sizes (e.g, 50m, 100m and 150m). The program also allows user’s choice for the working area by selecting either the whole area or a subset. The XYZ elevation text file is to be used as the XYZ import file in the manual editing of MIKE21 Bathymetry which is a time-consuming process. Alternatively, a C++ program (Trans.cpp, see Appendix B), along with a C filter provided by Dr Tom Heinzer from US Bureau of Reclamation, was specifically designed for such translations between ARC/INFO and MIKE21 which converts the ASCII GRID file to a MIKE21 array file (DT2 file). In addition, this program also adds Land Value (e.g. 10) and boundaries (e.g. 5 cells around the working area) to the normal ASCII grid. The output from the program can then be directly visualised and manipulated within the MIKE21 Software and used as DT2 input file in the hydrodynamic module (see Figure 2). By using such automated processing, considerable time can be saved by avoiding the manual data editing of Bathymetry and boundary definition. In order to present and study simulation results of the hydrodynamic modelling in the ARC/INFO environment, procedures have also been made that allow for import of MIKE21 results to ARC/INFO where they can be used for further analysis and visualisation together with other geo-data set. These procedures include 1) convert the MIKE21 output (DFS2) to ARC/INFO ASCII grid file with an appropriate header; 2) convert to ARC/INFO grid (ASCIIGRID); 3) convert to polygon (GRIDPOLY); 4) dissolve and build topology to create a new polygon which represents the flood area (DISSOLVE). This polygon was overlayed (CLIP) with the real estate data layer to find out the affected properties and the damage. Part C of the AML program (MIKE21.AML) is specially designed for the above processing (Task 2-4) which generates the flood area polygon and the affected property data layer with value attributes after the MIKE21 output has been transferred into GIS (Task 1) through another C filter (M212ASCI) from Dr Tom Heinzer at US Bureau of Reclamation.
12
Figure 2. An example Bathymetry (DT2) generated using C++ program. To prepare a MIKE21 DT2 file by the above mentioned programs, follow these steps: 1) Run MIKE21.AML. Simply type ‘&run mike21’ at the Arc prompt such as: Arc: &run mike21 Then choose the tasks at the prompt (A for the whole area and B for a subset). 2) Run TRANS.EXE program TRANS.EXE is a windows program, just double click on this file and it will open a window (see Figure 3), then click on Transfer button. This program also allows batch processing. You need to list the ASCII file names and the paths in a text file (control.txt), and the program will convert all these files in the list. Here is an example of the control file: h:/m21/programs/subhd50.asc h:/m21/programs/subhd100.asc h:/m21/programs/subhd150.asc To transfer MIKE21 output back to GIS and produce flood area, follow these steps: 1) Run M212ASCI.EXE C program to transfer MIKE21 output to ASACII GRID; 2) Run MIKE21.AML (Part C) in ARC to generate flood area and extract flooded properties. 13
Figure 3. The C++ program interface for ASCII GRID to MIKE21 conversion.
6.3
The Procedures
The general procedures for setting up a Hydrodynamic model in Mike21 include: 1) 2) 3) 4) 5)
Collect input data (include XYZ file, background map, boundaries); Generate core Bathymetries (*.batsf); Interpolate core Bathymetries and export to *.dt2/*.dfs2 format; Generate the Flow Model (*.M21); and Result presentation.
However, the procedures in this study are slightly different with the above since this study involves flood risk assessment and the automated data processing techniques. The AML and C++ program developed in this study perform the above task 1) to 3); 4) is a rather easy task; and 5) can be easily done either in Mike21 Software or in ARC/INFO (or ArcView) after the appropriate data conversion. Most of the data processing procedures are already outlined in the previous sections (Section 5 and 6.2). In summary, the generally procedures in this study are: 1) 2) 3) 4) 5) 6)
Prepare hydrologically corrected DEM; Prepare other data sets (real estate, river channel, ) and their attributes; Run Mike21.aml and Trans.exe to generate MIKE21 Bathymetry input (DT2); Run MIKE21 hydrodynamic model; Transfer the model results to ARC/INFO and raster to polygon conversion; Overlay with property data layer to extract affected properties;
14
7) Analysis and Mapping; and 8) Visualisation. The whole procedures are illustrated in Figure 4.
Original ASCII DEM Grids (10G5G.G to 10G8I.G) ASCIIGRID (ARC)
Original Property Shape files (AY_MILI.SHP)
Value attributes (Taxing.mbd)
Value attributes (Taxing.csv)
DEM Grids (10G5G to 10G8I) MOSAIC (GRID) Merged grid (GRD58)
Property Arc coverage without land values (AY_MILI)
Value attributes (Taxing.dat)
TOPOGRID (ARC) Hydrologically corrected DEM (HYDRO58)
JOINITEM (ARC) Property layer with Value attributes (AY_MILI)
MIKE21.AML (ARC) XYZ file (.XYZ)
ASCII Grid (.ASC) Original buildings in Shape files
TRANS (C++) Bathymetry (.BATSF)
Bathymetry (.DT2) Buildings in polygon (HUSL)
MIKE21 Water Depth and Fluxs (DFS2) M212ASCI
MIKE21.AML
Building values
Flood Area (Polygon)
OVERLAY (ARC) Amilation
Risk and damage assessment
Air photos
Flood maps and visualisation
Figure 4. Flowchart of the data processing and modelling procedures.
15
7
The Results and Discussions
Due to uncertainty of some hydrological parameters (such as Manning’s coefficient), various hydrological settings are tested in the hydrodynamic model. The open boundary locations were chosen at the river inlet and outlet points which go through the selected working area (in and out). The cell size was set to 50 m, 100 m and 150m respectively; Manning resistance set to 5, 10 and 33 m1/3/s (default value is 33 m1/3/s); Flux at inlet set to 112 CMS based on the average 100 year flood discharge rates, and level at outlet set to –59.3 m based on the elevation at that point (subtracted by the maximum elevation, 60, so that all elevations are negative numbers). Dry and flooding value was set to 0.2 and 0.3, but increased if the model became unstable (e.g. blow-up problem). The model outputs are Water Depth (m), P and Q Fluxes (m3/s/m). Simulation results show that, assuming a 100 year flood event, P and Q fluxes range from 0 to 1.1 m3/s/m, the water depths range from 0 up to 4 meters. Model run times varied from 30 to 180 minutes depending on the settings. An animation of a resultant water depth is show in Figure 5.
Figure 5. An Animation of the flood flow using Mike21 Animate.
The water depth output from the model was converted into ARC/INFO grid, then the flooded area using internal ARC functions. By overlaying the resultant polygon of flooding area with
16
the real estate data, the flooding affected properties were extracted which was in turn used to estimate the damages or risks. These were done through the Part C in the AML program (Mike21.aml). Table 3 lists the GIS output data layers generated in this study. The first letter S indicates it is a subset, the following number indicates the cell size, then the Manning’s resistance number. In the actual GIS databases, these names ended with either ‘poly’ or ‘clip’ (e.g., S50r5poly, S50r5clip) indicating a polygon flood area data layer and a clipped property data layer (the resultant data layer by overlaying flood area with the property data layer). Table 3. Comparisons of model results using different settings. Output GIS data layer S50r5 S50r10 S50r33 S100r5 S100r10 S100r33 S150r5 S150r10 S150r33
Cell Size (m) 50 50 50 100 100 100 150 150 150
Manning number used 5 10 33 5 10 33 5 10 33
Flood area (km2) 14.00 1249 7.69 13.71 12.86 10.57 15.80 13.30 14.04
Number of properties affected 2183 1934 1285 1695 1593 1261 2267 1690 2012
% property affected 13.14 11.64 7.73 10.20 9.59 7.59 13.65 10.17 12.11
land value (Kr) 1348936 1380686 1008046 1102290 1077562 844396 1520117 1172278 1034886
House value (Kr) 3367012 3318924 2591532 3068089 2944780 2414893 3635195 2989935 3000778
Total value (Kr) 4715948 4699610 3599578 4170379 4022342 3259289 5155312 4162213 4035664
From those test settings, it seems that a cell size of 100 m best represents the river (with a width ranging from 50 to 80) and has good stability during the model run. A cell size of 50 m causes ‘Blow Up’ problem in most cases since it has the narrow channel and the connectivity problem. The model has a stable run with a 150 m spacing, but it does not best represent the actual size (width) of the river channel. The comparison is graphically show on Figure 6. Due to uncertainty and lack of measurements, we used several possible Manning’s resistance numbers (1 to 33) in the hydrodynamic model. Note that in MIKE21 using a greater number decreases the bed resistance and model runs less stable, a small number increases the bed resistance and model runs more stable (for details refer to DHI, 2001b). Figure 7 shows the comparisons using different Manning’s numbers but all other settings are the same. In summary, these outcomes have been generated in this study: • • • • • •
Topologically and hydrologically corrected GIS flood databases AML and C Programs for data processing, integration and data conversions Estimated flood area of a flood event (100 year flood) at a given time Time series of inundation extent of a flood event Buildings lands subject to flood and their associated values A series of flood maps, visualisation and report
17
a
b
c
Figure 6. Comparisons of affected areas using different cell sizes (spacing), where a is simulated flood area with spacing 50 m, b is the simulated flood area with spacing 100, c is the simulated flood area with spacing 150. The background is an aerial photo and blue line is the main river channel.
a
b
c
Figure 7. Comparisons of affected areas with different Manning’s resistance numbers, where a is the result using a Manning’s number of 33, b of 10, c of 5. The background is an aerial photograph and blue line is the main river channel.
18
The risk assessment was also made by the number of affected buildings (mostly residential houses) which might be useful for insurance and real estate companies. There are 17279 buildings in Eskilstuna region near the river and there are 2494 buildings to be affected in a 100 year flood (using a cell size of 100 m and a Manning’s number 33) which accounts for a percentage of 14.4% by building number. The affected buildings (within the polygon) are shown in Figure 8.
Figure 8. The affected buildings (within the polygon) with a 100 year flood event. Note that this was estimated using the buildings data layer (HUSL) rather than the real estate data layer. There were no real means to calibrate the simulations. Usually when flood events occur, flow and stage data are rarely recorded. However, we have tried to implement the best available modelling and GIS technology available to us, tempered of course by cost and resources. The modeling methods described in this report appear to give us a reasonable description of what may occur in designed flood scenarios (e.g., 100 year flood), and we will be applying this technology toward future emergency management planning endeavors. In addition, as a byproduct of such a project, the necessary data sets and their accuracy can be evaluated. These data types and accuracy can then be recommended for emergency planning for a community in a flood event. These will include such issues as data types, scales, accuracy, formats, attributes and standards. These will be documented in details in a separate report. It must be pointed out that our problem (river flooding) is a not a typical MIKE21 problem which mainly deals with hydraulic and related phenomena in lakes, estuaries, bays, coastal areas and seas, To make use of this model for river flooding, great care has to be taken to prepare the data and model settings so that the model understand them and treated as recognised modelling environment (e.g, lakes). We were aware that a new module, MIKE FLOOD, was about to release by the time of the completion of this research. However, such module is still based on 1D modelling technique, using a 2D model may still have its advantages in flooding simulation. 19
When using the MIKE21 model, a dimensionless flow parameter comes into play called the Courant number, defined as C = c (? t/? x) where ? t is the time step, ? x is the grid spacing, and c is the celerity, defined by c = sqrt(grh) where g is the gravitational constant and h is the average water depth. The Courant number describes how many grid points the celerity 'information' propagates within one time step. In MIKE21 when modeling flow, the Courant number should be kept under 5 (in general). For a cell size of 100 (? x = 100 metres), the constraint on ? t was usually around 10 seconds or less to meet the Courant condition. Three-dimensional effects dominate the leading edge or front of a flood wave, and these regions are characterized by substantial turbulence, which implies considerable energy dissipation. We are not actually modeling these effects, and it is uncertain how much error this introduces to what would be the 'actual' propagation of the wave front. This is a considerable concern, because the leading edge as a function of time is one of the main factors used in emergency management planning. DHI is currently researching methods to address this area. To simplify the modelling processing, we assumed that all flood gates or dams are fully open in a flood event, but this may be not true in a real flood scenario. Ignorance of the presence of dams or gates may result in changes of flood volume and directions. Therefore, further effort should be made to include dams and flood gates in the flood simulation.
8
Conclusions and Further Directions
A GIS using the ESRI suite of software running on UNIX/NT platforms was interfaced to DHI Water & Environment’s MIKE21 two-dimensional hydrodynamic flow model. DEM data were obtained for a study area, manipulated in the GIS, and translated into the MIKE21 modeling environment. Different scenarios were evaluated, and the results were translated back into the GIS for visualization and analysis of a flood event. During the execution of the flood project the automated process (AML and C++ programs) developed in this study has played an important role in maintaining and processing the variety of data sets that have been used for the modelling activities. To prepare the Bathymetry input for MIKE21 would take up to hours or days, or even longer if the XYZ file is to be prepared, depending on the user’s experience. With the automated processing, it only takes about 5 minutes for such a task, so the time-salving is one of the biggest advantages. The ‘loose coupling’ approach appears to be adequate for such a study within the limited timeframe. However, in further studies, other integration methods, such as the conceptual consideration in the integration, should be considered so that the integration is more generic and applicable to other relevant studies and areas. Comparisons have been made between the model outputs from MIKE21 and that from MIKE11 which was operated separately by another institution (Swedish Meteorological and Hydrological Institute, SMHI) on the same river. The model settings used in both models are similar except these otherwise not applicable. The visual examination shows that the results have good agreement between each other, particularly in flood water depth and the general shape of flooded area. But MIKE21 seems over-estimate the flood area, particularly in the low part of the floodplain area. One explanation is that we have not set up the dams and flood gates controls in MIKE21, nor the tilt system, thus the flood goes without constraint. This can be also explained by the nature and the underpinning algorithms in the 2D and 1D modelling
20
techniques (details see DHI User Manual). The major problem with MIKE21 in this study is the model stability or ‘Blow-up’ problem. The model stability is affected by too many factors such as boundary conditions, bed resistance (Manning’s number), Courant number (spacing and time steps) and flooding/drying specifications. Great care and time need to be take to carefully choose all these factors, sometime prioritise them, so that both accuracy and stability can be achieved. In fact, this is a common recognised problem, and the DHI is now dealing with this problem (‘Blow-Up’) and the improved version will become available soon (Karsson, personal communication, 2001). Anyway, to run the model correctly, one must have some understanding of the hydrologic methods used in the model, which helps to correctly set up the model inputs and parameters. To best represent the river and have a stable run of model (a lower Courant number), we recommend a cell size of 100 m which reasonably represents the river and achieves stable model runs in most cases. Most of the GIS data sets used in this study are adequate with acceptable accuracy. The key data sets used are DEM, real estate and river network. Among these, the DEM is the most important factor in the hydrodynamic modelling. The current DEM has 1 meter vertical resolution which is too coarse for such a modelling activity, a finer DEM (e.g., up to 0.1 m vertical resolution) would greatly improve the model quality. Furthermore, a low resolution DEM often does not contain detailed linear information such as embankments, roads, fences or tilts which either raise or depress the flood plain. Using a finer DEM allows these be incorporated into the DEM. Nevertheless, the vertical resolution seems more important than the horizontal resolution in the hydrodynamic modelling. It was clear from the results that a two-dimensional flow simulator was required to adequately describe the flow. MIKE21 seemed to function adequately once the appropriate set up was honored. A one-dimensional model would not have been able to model these scenarios properly. The C++ Translators between MIKE21 and ARC/INFO developed in this study worked very well. ARC/INFO GRID, ARCEDIT and Arc/View Spatial and 3D Analyst were the main GIS components used. In our further studies, more precise hydrologic variables are to be specified which best represent the reality. The man-make features (such as dams/flood gates and tilts) in flood control are to be incorporated into the modelling system. More accurate DEM data are to be acquired and used in the hydrodynamic modelling. More automated procedures on data processing and integration are to be developed and a user friendly decision support system (DSS) is to be developed for the emergency planning. Furthermore, the guest researcher has developed an integrated drainage network analysis system (IDNAS) (Yang et al., 2000a and 2000b). Such system simulates the water flows in a constrained channel network system. Integration of such a 1D channel network flow system with a 2D overland flow model will enable the dynamical simulation and visualisation of the water flow in both normal and flooding situations. This will add extra benefit to routine water management and planning for such tasks as pollution movement simulation and discharge capacity assessment.
21
9
Acknowledgment
This research was supported by grants from the Civil Emergency Plannning (ÖCB). A three month test license of Mike21 software was generous provided by the DHI Sweden at Växjö. The authors thank Professor Bengt Rystedt and Dr Bin Jiang at the University of Gävle who invited the guest researcher to Sweden and initiated the project. We thank Mr Dick Karsson from DHI Sweden in Göteborg and Mr Tahsin Yacoub from Swedish Meteorological and Hydrologic Institute (SMHI) at Norrköping for their help and time with MIKE21 model and hydrologic settings. We thank Dr Qingyuan Li, another visiting fellow from Chinese Academy of Surveying and Mapping (CASM) for his help with C++ programming, and Dr Tom Heinzer from US Bureau of Reclamation for providing his C filters. Thanks also go to Ms Karin Jöngren in the GIS Institute for her hospitality and assistance with Swedish. Last but not least, the guest researcher thanks his wife and daughter in Australia for their support and tolerance while he is away from home for such a long time.
10
References
DHI (2000a). MIKE 21 Short Introduction and Tutorial. Danish Hydraulic Institute. DHI (2000b). MIKE 21 User Guide. Danish Hydraulic Institute. Heinzer, T., Sebhat, M., Feinberg, B. and Kerper, D. (1999). The Use of GIS to Manage LIDAR Elevation Data and Facilitate Integration with the MIKE21 2-D Hydraulic Model in a Flood Inundation Decision Support System. Hutchinson, M.F. (1989). A new procedure for gridding elevation and stream line data with automatic removal os spurious pits. Journal of Hydrology, 106:211-232. Kjelds, J.T. and Müller, H.G. (1999). Integrated Flood Plain & Disaster Management using the MIKE 11 Decision Support System, Danish Hydraulic Institute, Agern Alle 5, DK-2970 Hørsholm, Denmark. Sui, D.Z. and Maggio, R.C. (1999). Integrating GIS with hydrological modeling: practices, problems, and prospects, Computers, Environment and Urban Systems 23:33-51. Yang, X., Zhou, Q., and Melville, M. (2000a). An Integrated drainage network analysis system for agricultural drainage management: Part 1. the system. Agricultural Water Management, 45(1):73-86. Yang, X., Zhou, Q., and Melville, M. (2000b). An Integrated drainage network analysis system for agricultural drainage management: Part 2. the application. Agricultural Water Management, 45(1):87-100.
22
11
Appendix A: AML Program (MIKE21.aml)
/********************************************************************** /* This AML script is designed to prepare HD model inputs for /* Mike21 at different spacing and working areas. /* File name: mike21.aml, Written by Xihua Yang in May 2001 /********************************************************************** &sv &sv &sv &sv &sv &sv &sv &sv &sv &sv &sv &sv &sv &sv &sv &sv &sv &sv
RIVER50 = river50 RIVER100 = river100 RIVER150 = river150 SUBRIVER50 = riv50 SUBRIVER100 = riv100 SUBRIVER150 = riv150 DEM = hydro58 SUBDEM = subdem MAX = 70 SUBMAX = 60 XMIN = 1529975 YMIN = 6574975 XMAX = 1545025 YMAX = 6595025 SUBXMIN = 1536000 SUBYMIN = 6577000 SUBXMAX = 1542000 SUBYMAX = 6591000
/* /* /* /* /* /* /* /*
River grid at 50 m River grid at 100 m River grid at 150 m Sub River grid at 50 m Sub River grid at 100 m Sub River grid at 150 m DEM grid Sub DEM grid
&type Please make a choice (a, b). &type -------------------------&type a - Prepare Mike21 HD input for whole area &type b - Prepare Mike21 HD input for sub area &type c - Process Mike21 HD output and create flood area &sv choice := [response 'Please enter a selection' ] &if %choice% = a &then &goto a &if %choice% = b &then &goto b &if %choice% = c &then &goto c &else &end &label a &type Prepare HD input of whole area with river elevation and DEM &if [exists %RIVER50% -grid] &then kill %RIVER50% all &if [exists %RIVER100% -grid] &then kill %RIVER100% all &if [exists %RIVER150% -grid] &then kill %RIVER150% all linegrid main %RIVER50% z 50 n %XMIN% %YMIN% 401 301 zero linegrid main %RIVER100% z 100 n %XMIN% %YMIN% 201 151 zero linegrid main %RIVER150% z 150 n
23
%XMIN% %YMIN% 134 100 zero grid &if [exists grd100 -grid] &then kill grd100 all &if [exists grd150 -grid] &then kill grd150 all grd100 = resample (hydro58, 100) grd150 = resample (hydro58, 150) hd50 = ( %RIVER50% over hydro58 ) - %MAX% hd100 = ( %RIVER100% over grd100 ) - %MAX% hd150 = ( %RIVER150% over grd150 ) - %MAX% quit /* Prepare Mike21 HD input of XYZ files for whole area &if [exists pt50 -cover] &then kill pt50 all &if [exists pt100 -cover] &then kill pt100 all &if [exists pt150 -cover] &then kill pt150 all gridpoint hd50 pt50 value build pt50 point gridpoint hd100 pt100 value build pt100 point gridpoint hd150 pt150 value build pt150 point &sys rm pt.* ungenerate point pt50 pt50.txt ungenerate point pt100 pt100.txt ungenerate point pt150 pt150.txt tables sel pt50.dat add from pt50.txt sel pt100.dat add from pt100.txt sel pt150.dat add from pt150.txt quit joinitem pt50.dat pt50.pat pt50.pat pt50-id joinitem pt100.dat pt100.pat pt100.pat pt100-id joinitem pt150.dat pt150.pat pt150.pat pt150-id &data arc info ARC SEL PT50.PAT OUTPUT /home/mentos/t-teach/xyg/mike21/hd50.txt INIT PRINT X, Y, VALUE SEL PT100.PAT OUTPUT /home/mentos/t-teach/xyg/mike21/hd100.txt INIT PRINT X, Y, VALUE SEL PT150.DAT OUTPUT /home/mentos/t-teach/xyg/mike21/hd150.txt INIT PRINT X, Y, VALUE Q STOP &end gridascii hd50 hd50.asc value gridascii hd100 hd100.asc value gridascii hd150 hd150.asc value &return &label b &type Prepare sub HD input with river elevation and surface DEM &if [exists %SUBRIVER50% -GRID] &then kill %SUBRIVER50% all &if [exists %SUBRIVER100% -GRID] &then kill %SUBRIVER100% all &if [exists %SUBRIVER150% -GRID] &then kill %SUBRIVER150% all &if [exists %SUBDEM% -GRID] &then kill %SUBDEM% all
24
gridclip %DEM% %SUBDEM% %SUBXMIN% %SUBYMIN% %SUBXMAX% %SUBYMAX% linegrid main %SUBRIVER50% z 50 n %SUBXMIN% %SUBYMIN% 280 120 zero linegrid main %SUBRIVER100% z 100 n %SUBXMIN% %SUBYMIN% 140 60 zero linegrid main %SUBRIVER150% z 150 n %SUBXMIN% %SUBYMIN% 93 40 zero grid &if [exists sub100 -grid] &then kill sub100 all &if [exists sub150 -grid] &then kill sub150 all sub100 = resample (%SUBDEM%, 100) sub150 = resample (%SUBDEM%, 150) subhd50 = ( %SUBRIVER50% over %SUBDEM% ) - %SUBMAX% subhd100 = ( %SUBRIVER100% over sub100 ) - %SUBMAX% subhd150 = ( %SUBRIVER150% over sub150 ) - %SUBMAX% quit /* Prepare Mike21 HD input of XYZ files &if [exists subpt50 -cover] &then kill subpt50 all &if [exists subpt100 -cover] &then kill subpt100 all &if [exists subpt150 -cover] &then kill subpt150 all gridpoint subhd50 subpt50 value buils subpt50 point gridpoint subhd100 subpt100 value build subpt100 point gridpoint subhd150 subpt150 value build subpt150 point &sys rm sub*.txt ungenerate point subpt50 subpt50.txt ungenerate point subpt100 subpt100.txt ungenerate point subpt150 subpt150.txt tables sel subpt50.dat add from subpt50.txt sel subpt100.dat add from subpt100.txt sel subpt150.dat add from subpt150.txt quit joinitem subpt50.dat subpt50.pat subpt50.pat subpt50-id joinitem subpt100.dat subpt100.pat subpt100.pat subpt100-id joinitem subpt150.dat subpt150.pat subpt150.pat subpt150-id &data arc info ARC SEL TEMP50.DAT OUTPUT /home/mentos/t-teach/xyg/mike21/subhd50.txt INIT PRINT X, Y, VALUE SEL TEMP100.DAT OUTPUT /home/mentos/t-teach/xyg/mike21/subhd100.txt INIT
25
PRINT X, Y, VALUE SEL TEMP150.DAT OUTPUT /home/mentos/t-teach/xyg/mike21/subhd150.txt INIT PRINT X, Y, VALUE Q STOP &end gridascii subhd50 subhd50.asc value gridascii subhd100 subhd100.asc value gridascii subhd150 subhd150.asc value &return &label c &sys ls *.txt &sv ASCGRD = [response 'Please enter an ASCII grid name for processing: .txt'] &if [exists %ASCGRD% -grid] &then kill %ASCGRD% all &if [exists %ASCGRD%temp -cover] &then kill %ASCGRD%temp all &if [exists %ASCGRD%poly -cover] &then kill %ASCGRD%poly all asciigrid %ASCGRD%.txt %ASCGRD% gridpoly %ASCGRD% %ASCGRD%temp ae mapext %ASCGRD%temp ec %ASCGRD%temp ef polygon sel all calc %ASCGRD%temp-id = 9 save &sys arc dissolve %ASCGRD%temp %ASCGRD%poly %ASCGRD%temp-id poly ec %ASCGRD%poly ef polygon asel all res area < 1000000 delete save q build %ASCGRD%poly poly kill %ASCGRD%temp all clip AY_MILI %ASCGRD%poly %ASCGRD%clip poly &return
26
12
Appendix B: C++ Program (Trans.cpp)
// transView.cpp : implementation of the CTransView class // #include "stdafx.h" #include "trans.h" #include "transDoc.h" #include "transView.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CTransView IMPLEMENT_DYNCREATE(CTransView, CView) BEGIN_MESSAGE_MAP(CTransView, CView) //{{AFX_MSG_MAP(CTransView) ON_COMMAND(id_transfer, Ontransfer) ON_COMMAND(id_exit, Onexit) //}}AFX_MSG_MAP // Standard printing commands ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CTransView construction/destruction CTransView::CTransView() { // TODO: add construction code here } CTransView::~CTransView() { } BOOL CTransView::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs return CView::PreCreateWindow(cs); } ///////////////////////////////////////////////////////////////////////////// // CTransView drawing void CTransView::OnDraw(CDC* pDC) {
27
CTransDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here } ///////////////////////////////////////////////////////////////////////////// // CTransView printing BOOL CTransView::OnPreparePrinting(CPrintInfo* pInfo) { // default preparation return DoPreparePrinting(pInfo); } void CTransView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add extra initialization before printing } void CTransView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add cleanup after printing } bool CTransView::transferOneFile(HEAD *head,int fileNum) //======= Opening the Control file ======== { // TODO: Add your command handler code here char ss[100]; FILE *infp; FILE *outfp; int i,j; float z; char *inputFileName=head->fileName; char outputFileName[50]; strcpy(outputFileName,inputFileName); for(i=0;outputFileName[i]!='.';i++) ; outputFileName[i]='\0'; strcat(outputFileName,".txt"); CDC *pDC=this->GetDC(); CRect *pRect;
if((infp = fopen(inputFileName,"r"))==NULL) { sprintf(ss,"can not open file",inputFileName); pRect=new CRect(360,35+i*20,660,35+fileNum*20+20); pDC->DrawText(ss,pRect,DT_LEFT); return false; } if((outfp = fopen(outputFileName,"w"))==NULL) { sprintf(ss,"Can not open file ",outputFileName); pRect=new CRect(100,30,600,60); pDC->DrawText(ss,pRect,DT_LEFT); return false; }
28
char tempStr[100]; //====== read head ====== if(fscanf(infp,"%s %d\n %d %d %d %d %d\n",
// // &head.fileName,&head.ncols,&head.nrows,&head.xMin,&head.yMin,&head.cellSpace,&head.noDataMark)ncols); fscanf(infp,"%s %d\n",tempStr,&head->nrows); fscanf(infp,"%s %d\n",tempStr,&head->xMin); fscanf(infp,"%s %d\n",tempStr,&head->yMin); fscanf(infp,"%s %d\n",tempStr,&head->cellSpace); fscanf(infp,"%s %d\n",tempStr,&head->noDataMark);
//=== write top 5 row 10.0 ==== fprintf(outfp,"ncols %d\n",head->ncols+10); fprintf(outfp,"ncols %d\n",head->nrows+10); fprintf(outfp,"xllcorner %d\n",head->xMin-5*head->cellSpace); fprintf(outfp,"yllcorner %d\n",head->yMin-5*head->cellSpace); fprintf(outfp,"cellsize %d\n",head->cellSpace); fprintf(outfp,"NODATA_value -9999\n"); for(i=0 ; iDrawText("The file control.txt cann't be open",pRect,DT_LEFT); return; } for(i=1; ;i++ )
30
{ if(fscanf(infp,"%s\n",&head.fileName)DrawText("All files have been transfered succucessfully",pRect,DT_LEFT); break ; } else { pRect=new CRect(10,35+i*20,300,35+i*20+20); pDC->DrawText(head.fileName,pRect,DT_LEFT); if(transferOneFile(&head,i)==false) break; } } } void CTransView::Onexit() { // TODO: Add your command handler code here exit(0); }
31