Mapinfo / TUFLOW Productivity Utilities



Contents

CONTENTS I

List of Figures iv

List of Tables v

1 Getting Started 1-1

1.1 Installation of MapInfo and TUFLOW Utility Programs 1-2

1.1.1 Modifying the location of the WBM_Utilities and MAP_Utilities toolbars 1-3

2 Toolbars, Menus and Brief Utility Descriptions 2-1

2.1 miTools Menu 2-1

2.2 MAP Utilities 2-5

2.2.1 MAP Utilities Toolbar 2-5

2.2.2 MAP Utilities Context Menu 2-7

2.3 WBM Utilities Toolbar 2-9

2.4 ISIS-TUFLOW Related Utilities 2-15

2.5 Other Utilities 2-15

3 Utility Instructions 3-1

3.1 Turn Off Selected Objects Layer [pic] 3-1

3.2 Close Selected Objects Tab File [pic] 3-1

3.3 Close All .Tabs Not In Current Layer Control [pic] 3-1

3.4 Make Selected Objects Layer Editable [pic] 3-2

3.5 Remove Switched-Off Layers From Layout [pic] 3-2

3.6 Make Layer Non-Selectable [pic] 3-2

3.7 Delete Selected Objects, Leave Editable Unchanged [pic] 3-3

3.8 Browse Selected Object(s) Table [pic] 3-3

3.9 Batch Export MIF Files [pic] 3-3

3.10 Export Current Editable Layer As A MIF File [pic] 3-4

3.11 Import MIF And Add As Top Layer [pic] 3-4

3.12 Batch import MIFs and add to current map window [pic] 3-5

3.13 Save current map window as an image with world file [pic] 3-6

3.14 Move Duplicate Nodes [pic] 3-6

3.15 About “WBM_Utilities” [pic] 3-7

3.16 Graph selected TS items [pic] 3-8

3.17 Peaks of selected TS Graph Window [pic] 3-11

3.18 Clip selected region [pic] 3-11

3.19 Polyline region split tool [pic] [pic] 3-11

3.20 Add region and clip to adjacent regions [pic] 3-13

3.21 TUFLOW cross-section and water level line tool [pic] 3-13

3.22 Create TUFLOW CN lines [pic] 3-16

3.23 Snap & trim CN/xsec plines to region boundary [pic] 3-17

3.24 Split 1d-nwk polyline using xsec polylines [pic] 3-18

3.25 Split polyline using a drawn line [pic] 3-19

3.26 Graph selected CSV cross-section [pic] 3-20

3.27 Open selected cross-section CSV in Excel [pic] 3-20

3.28 Graph selected CSV cross-section (with results) [pic] 3-21

3.29 Open selected cross-section CSV in Excel (with results) [pic] 3-21

3.30 Increment Selected Layer [pic] 3-22

3.31 Label Zpt or Zln layer with elevation [pic] 3-22

3.32 Filter TUFLOW layers [pic] 3-23

3.33 Turn off border of thematically mapped grid cells [pic] 3-24

3.34 Plot long-section of selected 1d_nwk element's D/S reach [pic] 3-26

3.35 Create XS CSV from ESRI DBF file [pic] 3-29

3.36 Run TUFLOW From MapInfo [pic] 3-30

3.37 ASC to ASC Interface [pic] 3-31

3.38 TUFLOW to GIS Interface [pic] 3-32

3.39 DAT to DAT Interface [pic] 3-33

3.40 Export CSV [pic] 3-33

3.41 Create CSV format Cross-Sections from VM Grid 3-34

3.42 TUFLOW Standard Styles 3-34

3.43 Convert GIS Table to TUFLOW File Format 3-35

3.44 Convert GIS pipe/pit layer into a TUFLOW 1d_nwke 3-36

3.45 Close all Queryn (temporary) Tables 3-37

3.46 Relocate Info Tool Window on Screen (to top left corner) 3-37

3.47 Name 1d Networks and Cross-Sections 3-37

3.47.1 Name networks using chainages or sequential numbers 3-37

3.47.2 Name channels based on the upstream node or upstream XS IDs 3-38

3.47.3 Name channels based on 'mid' cross-section IDs 3-39

3.47.4 Name 'end' cross-sections based on the downstream channel ID 3-39

3.48 Export HEC-RAS Cross-Sections to ESTRY CSV Format 3-39

3.49 Import Geo-Referenced JPG Imagery 3-40

4 Tool Updates / Bug Reporting 4-1

List of Figures

FIGURE 1-1 MAP UTILITY TOOLBAR 1-1

Figure 1-2 WBM Utilities 1-1

Figure 1-3 miTools Menu 1-2

Figure 2-1 The "Map Layer Tools" Context Menu 2-8

Figure 2-2 The "Selection Tools" Context Menu 2-8

List of Tables

TABLE 2-1 MITOOLS MENU 2-1

Table 2-2 Map Utilities Toolbar 2-5

Table 2-3 WBM Utilities Toolbar 2-9

Table 2-4 ISIS Related Utilities 2-15

Table 2-5 Other Utilities 2-15

Getting Started

The MapInfo and TUFLOW Productivity Utilities (miTools), have been developed specifically to improve the efficiency of setting up and reviewing TUFLOW© models, as well as improving the day to day ease of using MapInfo Professional (MI Pro) Version 7.0 and newer.

Licensing of the utilities is on a per company basis, with an annual software support and upgrade (maintenance) agreement. The concept is to ensure that the utilities are updated to keep pace with the development of TUFLOW, and to a lesser degree, the future enhancements of MI Pro.

The toolbars are illustrated in Figure 1-1 and Figure 1-2 and the miTools menu is illustrated in Figure 1-3. This manual describes the utilities, and their use, in the following Sections:

• Section 1.1 - Installation of the utilities

• Section 2 - Toolbars and brief utility descriptions

• Section 3 – Utility instructions

• Section 4 – Tool Updates / Bug Reporting

[pic]

Figure 1-1 Map Utility Toolbar

[pic]

Figure 1-2 WBM Utilities

[pic]

Figure 1-3 miTools Menu

1.1 Installation of MapInfo and TUFLOW Utility Programs

Copy all the files into a directory called “C:\BMT_WBM\miTools”. All files must be located in this directory, as many of the programs look for specific files in this location.

To install the MapBasic programs permanently, there are two methods that can be used. The method used depends both on personal preference and on the version of MI Pro being used and whether a Startup workspace file (Startup.wor) has been automatically created in the MapInfo Professional installation folder. For simplicity, Method 1 is now recommended.

Method 1: Install the tools in MI Pro using MI Pro's Tool Manager. From the "Tools" menu, select "Tool Manager...". From the Tool Manager dialog (shown), select "Add Tool". Fill out the Add Tool dialog as shown and select "OK" (note: the location of the miTools utility is "C:\BMT_WBM\miTools\miTools.mbx"). From the Tool Manager dialog ensure the 'Loaded' and 'Autoload' checkboxes are ticked, and then select "OK". The next time MapInfo is started the miTools will automatically load.

[pic]

Method 2: Modify MapInfo’s startup workspace file, called “Startup.wor”, using a text editor. The file is usually located in the folder "C:\Program Files\MapInfo\Professional" on 32 bit operating systems and "C:\Program Files (x86)\MapInfo\Professional" on 64 bit operating systems. To edit the file, ensure you have sufficient user privileges. If you are using Windows7, you will also need to copy the file to a temporary location, then modify it, then replace the original file with the modified one. The contents of the startup.wor file will typically look something like the following.

[pic]

To the Startup.wor file, add the following line…

Run Application "C:\BMT_WBM\miTools\miTools.MBX"

Save and exit the Startup.wor file. The next time you start MI Pro the miTools will automatically load.

1.1.1 Modifying the location of the WBM_Utilities and MAP_Utilities toolbars

The position of the toolbars can be permanently altered by modifying the row and column number references contained in files Map_Utilities.ini and WBM_Utilities.ini. Please note that the top row and left toolbar position is 0, 0.

Tool tips will be displayed when the mouse pointer is placed over the icons. A more detailed explanation of the utilities is contained in the following sections.

Toolbars, Menus and Brief Utility Descriptions

Each of the toolbars and the associated buttons (icons) are described in the following sections. For easy reference, the icons in the tables below are hyperlinked to the relevant section in the Instructions chapter, Chapter 3.

2.1 miTools Menu

The miTools menu is briefly described in Table 2-1

Table 2-1 miTools Menu

|[pic] |

|MENU |DESCRIPTION |

|Import and Export Utilities |Provides the user with options to use the following utilities: |

| |Batch export MIF files |

| |Export current editable layer as a MIF file |

| |Import MIF and add as top layer |

| |Batch import MIFs and add to current map window |

|ISIS Related Tools |Provides the user with the options to use the following ISIS related utilities |

| |Extract Cross-Sections from DAT to CSV files |

| |Name Channels based on upstream Node ID |

|HEC-RAS Related Tools |Provides the user with the options to use the following HEC-RAS related utilities |

| |Export HEC-RAS Cross-Sections to ESTRY CSV Format |

| |The utility reads in 2D and 3D HEC-RAS (RAS Mapper) geometry files and extracts |

| |cross-sections and saves them as ESTRY format CSV files. The utility will trim off overbank |

| |portions of cross-sections or set them to material number/Manning's n of -1. |

|Create CSV format Cross-Sections from |Enables the user to extract csv format cross sections for use in TUFLOW from a Vertical |

|VM Grid |Mapper DEM. The utility will create and export CSV format ESTRY cross-sections for every |

| |cross-section line in a 1d_xs or 1d_tab file. Each cross-section will be named as per the |

| |name in the "source" field. As of the 2012_02 build of the miTools, the source can include |

| |relative path references. |

|Convert GIS Table to TUFLOW File Format|Allows the user to add the required TUFLOW attributes to any specified MapInfo file. The |

| |required attributes are determined from the empty MIF file specified by the user. The |

| |utility ensures that the projection and co-ordinates of the original data and objects are |

| |fully retained (not rounded as occurs in MID/MIF exporting, editing and importing approach). |

|Convert GIS pipe/pit layer into a |Converts GIS pipe and/or pit datasets into standard TUFLOW 1d_nwke tables, while retaining |

|TUFLOW 1d_nwke |all the clients original field data and allowing the conversion of the clients data columns |

| |into the TUFLOW columns with user specified conversion formula (e.g. conversion of feet to |

| |metres, datum shifts, etc). |

|Name 1d networks and cross-sections |[pic] |

| |Name networks using chainages or sequential numbers |

| |The utility names the ID field of 1d network files (e.g. 1d_nwk(e) and 1d_isis) using a range|

| |of options including chainage, sequential numbers, etc. Very useful for assigning meaningful|

| |unique 1d channel ID's. |

| |Name channels based on the upstream node or upstream XS IDs |

| |The utility names the ID field of each channel in a 1d network file (e.g. 1d_nwk(e) and |

| |1d_isis) using the ID of any node or cross-section snapped (or within a 0.5m tolerance) of |

| |the upstream end of a given channel. |

| |Name channels based on 'mid' cross-section IDs |

| |The utility names the ID field of each channel in a 1d network file (e.g. 1d_nwk(e) and |

| |1d_isis) using the ID of any cross-section crossing a given channel (i.e. a 'mid' |

| |cross-section). |

| |Name 'end' cross-sections based on the downstream channel ID |

| |The utility names the Source field of each cross-section in a 1d table links file (e.g. |

| |1d_tab and 1d_xs) using the ID of any channel with its upstream end snapped (or within a 0.5m|

| |tolerance) of the given cross-section (i.e. the downstream channel). Very useful for naming |

| |cross-sections based on river running distance. |

|Imagery Tools |Provides the user with the options to use the following Image processing / creation tools |

| |Import Geo-Referenced JPG Imagery |

| |The tool will import all geo-referenced image files located within the selected folder into |

| |the current window. Images files must have a geo-referenced file that is compatible with |

| |MapInfo. The tools will automatically apply the selected projection to each file and create |

| |the corresponding TAB files, thereby avoiding the repetitive process of selecting a |

| |projection for every image. |

| |Save current map window as an image with world file |

| |Saves the front window as an image (jpg, tiff, bmp or gif) and creates a world file for use |

| |is SMS, HEC-RAS and other geo-referenced products. Options also exist to generate world |

| |files suitable for MIKE by DHI products and to change the projection of the world file. |

| |(Please note: The tool is also accessed via the [pic] button on the MAP_Utilities toolbar) |

|Edit TUFLOW Default Styles |Allows the user to set the default TUFLOW region, polyline and symbol styles for use in the |

| |input MapInfo layers for TUFLOW. The styles are applied based on the prefix of the given |

| |Table’s name. The styles are used in a number of the utilities to set MapInfo’s current |

| |object styles so that newly created objects will automatically be the correct style. |

|Close all Queryn (temporary) Tables |Closes all the temporary "Queryn" tables in the current MapInfo session. |

|Relocate Info Tool Window on Screen (to|Repositions MapInfo's Information Window to the top left corner of the screen. The |

|top left corner) |Information Window sometimes does not appear on-screen when selected, and this utility should|

| |resolve the issue. |

2.2 MAP Utilities

The MAP Utilities consist of a custom toolbar and a range of items added to the contextual menu in MapInfo. The contextual menu items are accessed by right-mouse clicking within a MapInfo Map window. The toolbar and contextual menu items are briefly described in the following sections.

2.2.1 MAP Utilities Toolbar

The MAP Utilities are briefly described in Table 2-2.

Table 2-2 Map Utilities Toolbar

|[pic] |

|ICON |DESCRIPTION |

|(Hyperlinked) | |

|[pic] |Turn Off Selected Objects Layer (Map_Utilities.mbx) |

| |Turns off the MapInfo layer associated with the currently selected object. This is particularly useful for |

| |editing the appearance of maps with large numbers of layers and/or with long filenames. |

|[pic] |Close Selected Objects TAB File (Map_Utilities.mbx) |

| |Closes the MapInfo table associated with the currently selected object. |

|[pic] |Close all .TABs not in Layer Control (Map_Utilities.mbx) |

| |Closes all MapInfo tables not included in the current map window. This is particularly useful for removing |

| |references in MapInfo workspace file for files that are not used. The workspace can then be efficiently exported|

| |using MapInfo’s “Workspace Packager” utility. |

|[pic] |Make Selected Objects Layer Editable (Map_Utilities.mbx) |

| |Makes the MapInfo table associated with the currently selected object editable in the current map window. |

|[pic] |Remove Switched-off Layers from Layout (Map_Utilities.mbx) |

| |Removes tables that are not ‘visible’ from the current map window (i.e. removes them from the layer control). |

| |This is particularly useful for removing unused references, which can then be closed using the “Close Selected |

| |Objects TAB File” utility [pic]. This avoids references in the workspace file for files that are not used. The |

| |workspace can then be efficiently exported using MapInfo’s “Workspace Packager” utility. |

|[pic] |Make Layer Non-Selectable (Map_Utilities.mbx) |

| |Makes the MapInfo table associated with the currently selected object ‘non-selectable’ in the current map window.|

|[pic] |Delete selected objects, leave editable unchanged (Map_Utilities.mbx) |

| |Deletes the selected objects, irrespective of what layer they are on and whether that layer is editable, and |

| |leaves the current editable layer unchanged. |

|[pic] |Browse the selected object(s) Table (Map_Utilities.mbx) |

| |Opens the Table containing the selected object(s) in a new MapInfo Browser Window. It avoids having to open a |

| |new browser window and having to scroll through the Table List which can often be exceedingly long and difficult |

| |to find the one you require. |

| |Import_Export_Icon_Option.ini |

| |As of miTools build 2010_03, the user can specify how the icons for the import and export MIF utilities |

|Icon |(discussed below) appear. The default appearance is the same as earlier releases of the miTools (i.e. Option 1).|

|Option |To change the appearance, edit the Import_Export_Icon_Option.ini file and change the option to one of the |

|1. [pic] |following: |

|2. [pic] |Option 1 (default): The arrows on the export icons point left. |

|3. [pic] |Option 2: The arrows on the export icons point right. |

| |Option 3: The arrows on the export icons point up. |

|[pic] |Batch export MIF files (BatchExport_MIF.mbx) |

| |A utility that exports multiple MID/MIF files in a ‘batch’, selected from a list of all open TAB files. The |

| |TUFLOW 1d and 2d MI files are automatically put to the top of the list for easy selection by the user. |

|[pic] |Export current editable layer as a MIF file (Export_Current_Editable_Layer.mbx) |

| |Exports the MapInfo table associated with the current ‘editable’ layer (in MID/MIF format). The tool will |

| |automatically test whether the table requires saving and packing. As of miTools release 2012_02, checkboxes have|

| |been added to the dialogs to allow the users to turn off the save and pack massage and never show them again |

| |(i.e. automatically save and pack the current editable layer as/if required). |

|[pic] |Import MIF and add as top layer (Import_MIF_to_Map.mbx) |

| |Imports a MID/MIF file and automatically adds the layer to the top of the current map window’s layer control. If|

| |the MID/MIF is in the ‘empty’ folder, the utility will prompt the user to automatically save the file into the |

| |‘MI’ directory. |

|[pic] |Batch import MIFs and add to current map window (Batch_Import_MIF_to_Map.mbx) |

| |Batch import MID/MIF format files and automatically add them to the current map window. |

|[pic] |Save current map window as an image with world file (Register_Window.mbx) |

| |Saves the front window as an image (jpg, tiff, bmp or gif) and creates a world file for use is SMS, HEC-RAS and |

| |other geo-referenced products. Options also exist to generate world files suitable for MIKE by DHI products and |

| |to change the projection of the world file. |

|[pic] |Turn on/off move duplicate nodes (Move_Duplicate_Nodes.mbx) |

| |Turns the move duplicate nodes feature on and off for all currently open map windows. |

|[pic] |Export Table to CSV file (BatExport_TAB_DATA_to_CSV.mbx) |

| |Exports the selected MapInfo Tables into CSV format. Column headings are preserved for use in the CSV file. |

| |Utility supports the exporting of single or multiple tables at a time. |

2.2.2 MAP Utilities Context Menu

The MAP Utility context menu items are briefly illustrated and described below.

The first context menu item added is "Map Layer Tools", illustrated in Figure 2-1. Many of the utilities that form part of the menu are also accessed from the Map Utilities toolbar, and are discussed briefly in Section 2.2.1 and in detail in Section 3. Other utilities, such as the batch MIF exporter, have also been added to the menu.

The second context menu item added is "Selection Tools", illustrated in Figure 2-2. The menu was added in the 2010_03 release and includes a range of selection options to help filter the type of objects the user selects, e.g. all the point objects. The utility allows filtering of all of MapInfo's different object types. The utility is useful, for example, for selecting all the pits from a 1d_nwk(e) layer.

[pic]

Figure 2-1 The "Map Layer Tools" Context Menu

[pic]

Figure 2-2 The "Selection Tools" Context Menu

2.3 WBM Utilities Toolbar

The MAP Utilities are briefly described in Table 2-3.

Table 2-3 WBM Utilities Toolbar

|[pic] |

|ICON |DESCRIPTION |

|(Hyperlinked) | |

|[pic] |About “WBM_Utilities” (WBM_Utilities.mbx) |

| |Provides a brief description of the toolbar, gives an email address for reporting any bugs, constructive |

| |suggestions including further developments and new utility ideas. |

|[pic] |Graph Selected TS Items (TS_Graph.mbx) |

| |Graphs the TUFLOW MID/MIF time-series (TS) results data for selected TS objects. |

|[pic] |Peaks of Selected TS Graph Window (TS_Graph.mbx) |

| |Summarises the maximum and minimum of the saved TS values for the active TS Graph window. For new TS format |

| |results, where simulation max and min values are saved to columns 2 to 5 in the tables attribute data, the values|

| |and times are displayed when selected from the listbox. The utility also allows filtering of the graphs - i.e. |

| |to display only a sub-set of all the TS objects selected, such as the flows (Q) only). |

|[pic] |Clip Selected Region (Region_Tools.mbx) |

| |Trims the selected region to remove overlap with any regions in the same layer. This is particularly useful for |

| |cleaning up catchment boundaries and TUFLOW materials layers. It is also much quicker than the manual MapInfo |

| |process, and technically provides a better result as it inserts vertices into the regions at the points where the|

| |overlap and trimming occurs, hence ensuring the resulting regions truly snap together. |

|[pic] |Polyline Region Split Tool (Region_Tools.mbx) |

| |Splits a region (polygon) in the current editable layer into two regions, based upon a polyline drawn through the|

|[pic] |object. The region that is automatically selected once the ‘split-line’ is drawn, is the polygon that the |

| |mid-point of the split-line lies within. The “N” version does NOT retain the values of the original object once |

| |it is split. The “V” version retains the VALUES of the original polygon such that the 2 split polygons retain |

| |the original object’s tabular data. Useful for adding further definition to catchment plans, TUFLOW materials |

| |layers and so on. |

|[pic] |Add Region and Clip to Adjacent Regions (Region_Tools.mbx) |

| |Drawing utility to add a region and automatically trim it to remove the overlap. The overlap is removed in the |

| |same manner as the “Clip Selected Region” utility (i.e. by adding in vertices to the regions to be snapped to, |

| |and truly snapping and removing the overlap with adjacent regions). The utility is particularly useful for |

| |adding additional sub-catchments to catchment plans, TUFLOW materials layers and so on. |

|[pic] |TUFLOW Cross-Section and Water Level Line Tool (TUFLOW_WLL_Tool.mbx) |

| |Draws fixed-length cross-sections (XS) and TUFLOW water level lines (WLL) for selected 1d_nwk objects or |

| |1d_nwk(e) table. The utility draws either XS at the mid point or ends of a given channel, or draws WLL at the |

| |start and end of each channel with additional WLL along the channel using a range of user specified options. The|

| |utility uses a pre-defined or user defined line style for creating the objects. WLL are drawn perpendicular to |

| |the selected objects, and at vertices, the angle of the WLL is adjusted to bisect the ‘angle’ of the direction |

| |change. The resulting XS or WLLs can then be trimmed off to the inactive code (null-polygon) boundary using the |

| |trimming option, or be trimmed later using the “Snap & trim CN/Xsec plines to region boundary” utility [pic]. |

| |There are also a range of options to reduce/remove the occurrence of overlapping WLL. |

| |It is important to note that additional ‘redundant’ WLLs will be created at the confluences of 1d_nwk reaches, |

| |and have to be manually altered / removed. WLL’s snapped to vertices will also have their length increased |

| |automatically (currently by a fixed factor of approximately 1.4). It is therefore recommended that all WLLs |

| |created using the process be reviewed, and modified to ensure correct/intended representation of the 1d results. |

| |Please also note that using the utility to create cross-section lines along a river centreline is generally not |

| |recommended, but for regularly shaped channels, the utility provides a quick and easy way to draw cross-section |

| |lines for extracting XS data from DTMs / DEMs. The cross-section lines can then be used to split the river |

| |centreline into individual 1d_nwk elements using the “Split 1d-NWK polyline using XSec polylines” utility [pic]. |

|[pic] |Create TUFLOW CN lines (CN_lines_end_reach.mbx) |

| |Draws fixed length TUFLOW CN lines for all selected 1d_nwk elements. The CN lines can then be snapped and |

| |trimmed to the “HX” lines in the 2d_bc_hxi layer using the “Snap & trim CN/Xsec plines to region boundary” |

| |utility [pic]. |

|[pic] |Snap & trim CN/Xsec plines to region boundary (Snap_n_Trim_CN_XSec_Plines.mbx) |

| |Trims off the parts of the (automatically created) CN and cross-section lines that lie outside the selected |

| |‘null-polygon’. The utility will automatically insert additional vertices into the null-polygon and snap CN |

| |lines to them. For cross-sections, the user will be prompted whether or not to insert additional vertices and |

| |snap to them. For cross-section lines, snapping to the null-polygon is not required. The feature was added to |

| |create vertices in the null-polygon at/near the points that CN lines would need to be snapped to. |

|[pic] |Split 1d-NWK polyline using XSec polylines (Polyline_multisplit_tool.mbx) |

| |Splits a polyline, such as a river centreline that has been drawn or copied into a 1d_nwk table, into individual |

| |1d_nwk objects. The utility is extremely useful for quickly setting up 1d networks where existing cross-section |

| |and river centreline/long-section data is available. |

|[pic] |Split polyline using a drawn line (Polyline_split_tool.mbx) |

| |Splits a polyline, such as a river centreline or pipe, into two separate objects while retaining the same tabular|

| |data as the original object. The line used to split the polyline is drawn by the user and is automatically |

| |deleted. |

|[pic] |Graph selected CSV cross-section (CSV_Grapher.mbx) |

| |Graphs the source CSV file of the selected cross-section line in a MapInfo Graph window. The utility expects |

| |that the layer containing the cross-section lines (i.e. the 1d_xs or 1d_tab_xs MI layer) is in the same directory|

| |as the source CSV files. The utility also expects a single CSV file per cross-section, and therefore will not |

| |currently work for CSV files with many cross-sections in the one file. It is planned to modify the utility to |

| |recognise both cross-section CSV file approaches. |

|[pic] |Open selected cross-section CSV in Excel (CSV_Grapher.mbx) |

| |Opens the source CSV file of the selected cross-section line in Microsoft Excel. The utility expects that the |

| |layer that has the cross-section lines (i.e. the 1d_xs or 1d_tab_xs MI layer) is in the same directory as the |

| |source CSV files. These files are typically all in the ...\TUFLOW\Model\XS directory. |

|[pic] |Graph selected CSV cross-section (with results) (CSV_Grapher_With_Results.mbx) |

| |Graphs the source CSV file of the selected cross-section line and maximum water surface elevation (Hmax) from a |

| |_1d_mmH in a MapInfo Graph window. The utility expects that the layer containing the cross-section lines (i.e. |

| |the 1d_xs or 1d_tab_xs MI layer) is in the same directory as the source CSV files. The utility also expects a |

| |single CSV file per cross-section, and therefore will not currently work for CSV files with many cross-sections |

| |in the one file. It is planned to modify the utility to recognise both cross-section CSV file approaches. |

|[pic] |Open selected cross-section CSV in Excel (with results) (CSV_Grapher_With_Results.mbx) |

| |Opens the source CSV file of the selected cross-section line in Microsoft Excel. The utility expects that the |

| |layer that has the cross-section lines (i.e. the 1d_xs or 1d_tab_xs MI layer) is in the same directory as the |

| |source CSV files. These files are typically all in the ...\TUFLOW\Model\XS folder. |

|[pic] |Increment selected layer (MI_Increment.mbx) |

| |The utility creates a copy of the layer containing the selected object and gives it a new ‘incremented’ revision |

| |number. The utility suggests a new (incremented) revision number, which can be overwritten by the user. The |

| |utility will then close the original layer, open the incremented layer, it to the current map window as the top |

| |layer and make it editable. The utility assists at ensuring TUFLOW MI layers are correctly renamed and setup for|

| |editing in an efficient manner. |

|[pic] |Label Zpt or Zln layer with elevation (Label_Zpt.mbx) |

| |The utility labels the layer (the selected object’s layer) with the elevation data, to the format specified in |

| |the Label_Zpt.ini file. The user can customise the number of decimal places displayed, the label styles (colour,|

| |options, size, font), as well as the visibility options for the labels (e.g. the zoom display range). 2d_zpt, |

| |2d_zln, 2d_zlr and 2d_zlg layers can be assigned different default label options in the INI file. The utility |

| |relies on the naming convention to determine the layer type and the column to use as the elevation data. |

|[pic] |Filter TUFLOW layers (TUFLOW_Map_Filter.mbx) |

| |A utility to assist in dealing with large and complicated TUFLOW models. The utility will turn on or off |

| |specific layer types, as well as DEMs and images. For example, the user can quickly turn of all 2d_zpt layers in|

| |the current map window. The utility also has an option to group and sort TUFLOW layers in the current map |

| |window, based on the file type order specified in the file TUFLOW_Map_Filter.ini. The INI file can be customised|

| |by the user. |

|[pic] |Turn off border of thematically mapped grid cells (Thematic_Tool.mbx) |

| |The utility turns off the borders of thematically mapped regions. It was initially designed to switch the |

| |borders off thematically mapped 2d_grd_check layers, so that the colour coding was clearly visible when zoomed |

| |out. |

|[pic] |Plot long-section of selected 1d_nwk element's downstream reach (Plot_Long_Sec.mbx) |

| |The utility plots a long-section of a pipe (and/or open channel) network with the pipe obverts, ground surface |

| |(extracted through a DEM) as well as a surface representing minimum pipe cover. The data is written into an |

| |Microsoft Excel spreadsheet called “Long_Section_Plot.xls” |

| |The spreadsheet is automatically opened using the MSExcel directory path contained in the file |

| |“Path_to_Excel.ini”. |

|[pic] |Create XS CSV from ESRI DBF file (Export_XSec_CSVs.mbx) |

| |Coverts the outputs from an ESRI routine that extracts cross-sections from a DEM. The output from the process is|

| |a specific format DBF file, which the utility converts into individual CSV files. |

|[pic] |Run TUFLOW From MapInfo (Run_TUFLOW_From_MI.mbx) |

| |The utility is a MapInfo TUFLOW interface for quickly creating and running TUFLOW batch files. The utility will |

| |also quickly load and run an existing batch file. If a single TCF file is selected, an "Edit Selected TCF" |

| |button will be enabled, which will then allow the user to edit the TCF file using the preferred text editing |

| |software. |

|[pic] |MapInfo TUFLOW_to_GIS.exe interface (mi_Tuflow2Gis.mbx) |

| |Provides a MapInfo based interface for the user to use the TUFLOW_to_GIS.exe application. All the functionality |

| |of the application is available and it negates the need to use a batch file to process individual TUFLOW results.|

|[pic] |MapInfo Asc_to_Asc.exe interface (mi_Asc2Asc.mbx) |

| |Provides a MapInfo based interface for the user to use the Asc_to_Asc.exe application. This application negates |

| |the need to the use of a batch file to run this program. |

|[pic] |MapInfo Dat_to_Dat.exe interface (mi_Dat2Dat.mbx) |

| |Provides a MapInfo based interface for the user to use the Dat_to_Dat.exe application. This application negates |

| |the need to the use of a batch file to run this program. |

2.4 ISIS-TUFLOW Related Utilities

The ISIS-TUFLOW related utilities are aimed specifically at the UK market, where the use of the 1-dimensional hydraulic modelling package ISIS is common place. The utilities are aimed at providing the engineer with the flexibility to extract information from cross-section survey files in ISIS DAT format, and to assist with building ISIS-TUFLOW models. At this stage the number of utilities is limited, but could be further developed upon request.

Table 2-4 ISIS Related Utilities

|Menu Item |DESCRIPTION |

|Extract cross-sections from DAT to CSV files… |Utility to extract cross-sections from an ISIS DAT file into individual |

|(ISIS_DAT_XS_to_CSVs.mbx) |ESTRY format CSV files. This can also assist with viewing the |

| |cross-sections from within MapInfo using the CSV graphing utility. |

| |As of miTools build 2012_02, the utility now recognises cross-section |

| |names from DAT files that have been created by the 'HECTIC' HEC-RAS to |

| |ISIS conversion utility (by Edenvale Young Associates). |

|Name channels based on the upstream node ID… |Utility to name ISIS 1d_nwk channels the same as the upstream node ID. |

|(Label_channel_with_US_Node_ID.mbx) |This is required for the new ISIS water level line feature to work. |

2.5 Other Utilities

Table 2-5 Other Utilities

|Menu Item |DESCRIPTION |

|XS_Editor_2000.xls XS_Editor_2003.xls |Utility to view and edit CSV format cross-sections. A QA log file called |

| |XS_Editing_Log.xls is created, and the changes to the cross-section properties recorded |

| |in the log file, as well as the names of the backup files created following each |

| |subsequent change. |

| |XS_Editor_2000.xls is designed to run in MS Office 2000, while XS_Editor_2003.xls is |

| |designed to run in MS Office2003. The utility is currently being tested in MS Office |

| |2007. |

Utility Instructions

1 Turn Off Selected Objects Layer [pic]

File: Map_Utilities.mbx

To use the utility:

1. Select a single object from the layer you wish to turn off.

2. Select the icon.

3. Turn off the selected layer? Respond “Yes” or “No” (see image).

4. If you wish to undo the operation, respond “No” when prompted (see image).

2 Close Selected Objects Tab File [pic]

File: Map_Utilities.mbx

To use the utility:

1. Select a single object from the layer you wish to close.

2. Select the icon.

3. Close the selected objects layer? Respond “Yes” or “No”.

4. If you wish to undo the operation, respond “No” when prompted.

3 Close All .Tabs Not In Current Layer Control [pic]

File: Map_Utilities.mbx

To use the utility:

1. Select the icon.

2. The utility will close all Tables not open in the current window’s Layer Control. There is no undo option!

4 Make Selected Objects Layer Editable [pic]

File: Map_Utilities.mbx

To use the utility:

1. Select a single object from the layer you wish to make editable.

2. Select the icon.

3. Make the selected objects layer editable? Respond “Yes” or “No”.

5 Remove Switched-Off Layers From Layout [pic]

File: Map_Utilities.mbx

To use the utility:

1. Select the icon.

2. Close all ‘switched-off’ layers in the current window’s Layer Control (as shown in the image)? Respond “Yes” or “No”. The utility will remove all the layers that are marked non-visible. There is no undo option!

3. The utility will report how many layers have been successfully removed from the current window’s Layer Control (see image).

6 Make Layer Non-Selectable [pic]

File: Map_Utilities.mbx

To use the utility:

1. Select a single object from the layer you wish to make non-selectable.

2. Select the icon.

3. Make the selected objects layer non-selectable? Respond “Yes” or “No”. There is no undo option.

7 Delete Selected Objects, Leave Editable Unchanged [pic]

File: Map_Utilities.mbx

To use the utility:

1. Select the objects you wish to delete. It doesn’t matter if they are on the currently editable layer. The program will set the object’s layer to editable, delete the objects, and then reset the editable layer back to the original selection.

2. Select the icon.

3. Delete selected objects from layer “”? Respond “Yes” or “No”. There is no undo option.

8 Browse Selected Object(s) Table [pic]

File: Map_Utilities.mbx

To use the utility:

1. Select an object(s) from the Table you wish to browse.

2. Select the icon.

9 Batch Export MIF Files [pic]

File: Batchexport_Mif.mbx

To export MID/MIF files in a batch:

1. Select the icon.

2. Select the files you want to export from the dialogue (image shown).

3. Select the ‘SAVE table option’ – i.e. to automatically save tables with unsaved edits or to be prompted to save edits if required.

4. Select the ‘PACK table option’ – i.e. to automatically pack the tables (note that packing tables will remove them from the current map window); to be prompted if tables require packing; or not to pack tables. Packing tables will reduce the size of the MI files, and is therefore recommended, especially for 2d_zpt layers.

5. Select ‘Prompt before replacing existing .MIF files(s)’ if you want to be prompted to replace existing files.

6. Select ‘Export all .MIF file(s) to a SPECIFIED DIRECTORY’ if you wish to output all MID/MIF files to a specific location.

7. Select “Export MIF’s”. The utility will automatically put the MID/MIF files in the same directory as the corresponding TAB files.

10 Export Current Editable Layer As A MIF File [pic]

File: Export_Current_Editable_Layer.mbx

To export the current editable layer:

1. Select the icon.

2. If there are unsaved edits to the current editable layer, the user will be prompted to save unsaved edits (see image). Respond “Save Edits”, “Discard Edits” or “Cancel” – the user selection will be confirmed by a message box. As of miTools build 2012_02, there is a checkbox to prevent showing the dialog again.

3. If the Table contains deleted objects or data, and therefore requires packing, the user will be prompted to pack the Table (see image). Respond “Pack”, “Don’t pack” or “Cancel” – the user selection will be confirmed by a message box. As of miTools build 2012_02, there is a checkbox to prevent showing the dialog again.

11 Import MIF And Add As Top Layer [pic]

File: Import_Mif_To_Map.mbx

To import a MIF file and add it to the current map window:

1. Select the icon.

2. From the open file dialog, select the MIF file to import (see image) and then select “Open”.

3. If the file is in the TUFLOW “Empty” directory, the program will detect this and prompt to user to save the file as a different name into the “MI” directory.

4. The user will be prompted to save the MIF file as a TAB with the same name. The user has the option to rename the file. If a TUFLOW Empty file is being imported, it is recommended to save the file using the recommended conventions in the TUFLOW Manual.

5. The file will now be imported and the file added as the top layer in the current Map Window. If there is no map window open, a new map window will be opened and the layer added. If the user imported a standard TUFLOW table, the line, polygon and symbol styles from the "TUFLOW Default Styles" utility will be applied.

6. Should the MIF filename be a long file name (> approx 30 characters), and a file with the same first 30 characters already be open in MapInfo, MapInfo is unable to import the file. Accordingly, the utility gives a warning message (see image) and will not import the file. To overcome this, shut the open file(s) with the long filenames and re-import the MIF file.

[pic]

12 Batch import MIFs and add to current map window [pic]

File: batch_import_mif_to_map.mbx

To undertake a batch import of MIF file and add it to the current map window:

1. Select the icon.

2. From the open file dialog, select any MIF file from the folder you wish to import MIF files from (see image), and then select “Open”.

3. A list of the MIF files in the folder will appear (see image). Use the shift and cntrl keys to select multiple files, then select “Open”.

4. If a map window is not open, one will automatically be opened by the program, then the files will be imported and added progressively from the selected list.

13 Save current map window as an image with world file [pic]

File: RegisterWindow.mbx

To use the utility:

1. Select the icon.

2. Enter a file name and path for the image (the world file will be located in the same directory).

3. Choose a projection (the projection initially shown will be the projection of the current map window)

4. Select an output image format (jpg, tiff, bmp or gif)

5. Enter a desired image output resolution (High resolution images will take a long time to save)

6. Tick the “MIKE by DHI Compatible” box if the image is to be used in a DHI product. (Note: the DHI World File format will not be compatible with products other than those developed by DHI)

7. Press OK

If no file path is specified, the world file will saved directly to the local C:\ drive and will be called “Image.xxx”, where xxx refers to the selected image type. A projection must be specified for the application to work.

14 Move Duplicate Nodes [pic]

File: Move_Duplicate_Nodes.mbx

To use the utility:

1. Select the icon

2. An information message will pop up with the status of move duplicate nodes.

3. Press OK

If you wish to suppress the message box from appearing, select the tick box located on the information message. Once ticked, the information message will not appear again during the current instance of MapInfo. This setting does not apply to other MapInfo sessions that may be open and will not be remembered for future instances of MapInfo.

[pic]

The status of Move Duplicate Nodes will not be reflected under the settings located under Preferences\Map Window.

15 About “WBM_Utilities” [pic]

File: wbm_utilities.mbx

Provides a brief description of the toolbar, gives an email address for reporting any bugs, constructive suggestions including further developments and new utility ideas (see image).

[pic]

16 Graph selected TS items [pic]

File: TS_Graph.mbx

The program automates graphing the TUFLOW time series data (_TS file) for all time fields using a MapInfo graph template file. The program will also summarise the peaks and time of peaks for all series within an active Graph Window. From the summary, the user can select a time-series and zoom to view its location or open it using the Info Tool.

The current version of the utility supports the old and new TUFLOW Time Series formats. Some difficulties may occur where the user selects time series data from multiple TS TAB files during the one MapInfo session. Please email any observed bugs or constructive suggestions for improvements to miTools@

The utility consists of the following files:

• TUFLOW_Line.3tf – Graph template file.

• TS_Graph.mbx – MapBasic program.

Program Use

Once installed, the buttons should appear together as shown [pic] . The “Graph” button [pic] utilises MapInfo’s graph window functionality to graph the selected time series data for all time fields using the TUFLOW_Line.3tf MapInfo graph template file. The “Information” button [pic] summarises the peak value and time of peak for all saved data series within the active Graph Window. The “Information” button will work if you swap between different open Graph Windows.

Select the time-series to Graph, and hit the icon [pic] . The graph window will appear with correct Y-Axis labels. The legend window may need to be moved and resized to ensure all time-series labels are shown within the window (an apparent bug with MapInfo’s graph templates). The graph of the selected TS objects will appear (refer image).

[pic]

With the Graph Window active, hit the “Information” icon to summarise the peaks, as shown below…

[pic]

“Zoom to Selected” – Zoom to the selected time-series (e.g. QA “D/S L_1 US” in the above image) on the current Map Window with a 500m zoom window width. Type in different zoom widths as required.

“Print” – Will open a temporary table called “Graph_Info”, add the result summaries from the list box to it, and open the MapInfo print dialog.

“Info Tool on Selected” – Will open the selected time-series data in the listbox in a MapInfo Information window.

“Filter” – Allows the user to filter out unwanted data types and portions of the time series.

“Cancel” – Cancels the dialogues.

“Help” – Will open a dialog with details of the utilities version number, how to report bugs, etc (see image).

[pic]

To “Filter” the graphed time-series data - select the “Filter” button. The “Filter Graph Information” dialog will appear (see image).

[pic]

Select the data types you would like to graph from the list of data types in the current Graph Window (e.g. V and Q in the above example). The user can then filter what time-steps to graph by selecting a specific start time (“From” list) and end time (“To” list), OR, filter by halves. This can be useful for ‘zooming’ into the peak of the flood TS or similar.

Caution:

1. The time-series (TS) data can only contain a maximum of 254 columns of data due to limitations within MapInfo. As a result, the TS data may be incomplete depending upon the save increment specified by the modeller in the TCF file. Please check to ensure the last time increment expected appears in the TS data.

2. Graph Window labels are ‘hard-wired’ into the Graph Template File (TUFLOW_Line.3tf). While the user can edit and save the supplied TUFLOW_Line.3tf file, there appears to be a bug in MapInfo’s template file where only certain user settings will be saved.

17 Peaks of selected TS Graph Window [pic]

File: TS_Graph.mbx

This utility is an integral part of the “Graph selected TS items” utility. For details on the utilities use, please refer to Section 3.13 above.

18 Clip selected region [pic]

File: region_tools.mbx

To clip a region:

1. Select the region you wish to ‘clip’ – i.e. to remove any area overlapping other regions within the same layer.

2. Select the icon.

3. The utility will now select any regions that intersect the selected region object.

4. The utility will ‘overlay-nodes’, i.e. create additional vertices, in the overlapping regions so that the region to be trimmed can be truly snapped to the mutual boundaries between the objects (Note: The standard MapInfo “Erase” function does not do this!).

5. The overlapping area will now be erased.

Caution:

1. Tabular data for the region to be trimmed will not be preserved! It is recommended that the object’s data is not filled in until after the trimming.

19 Polyline region split tool [pic] [pic]

File: region_tools.mbx

To split a region:

1. Ensure the layer you want to edit is set to the currently editable layer.

2. Select an icon and the polyline drawing pointer will appear. Select the “N” icon if you want the resulting regions to have no tabular data (i.e. data fields set to blank) and the “V” icon if you want the resulting regions to retain the tabular data values.

3. Draw a polyline through the region you wish to split into two (see image). Ensure that the mid-point of the polyline sits within the region you wish to split in two. Please note that the ends of the polyline are automatically extended by MapInfo to create a ‘cutter-object”. Should the extended lines cut through the region in some other location, the region could be split into a number of objects. To avoid this, orientate the start and end of the polyline drawn to split the region, so that they do not intersect other parts of the region you wish to split.

[pic]

4. The utility will now select the region that the mid-point of the polyline intersects.

5. The utility will ‘overlay-nodes’, i.e. create additional vertices, in the overlapping regions so that the region to be split can be truly snapped to the mutual boundaries between the objects (Note: The standard MapInfo “Split” function does not do this!).

6. The region will now be split to create two new regions. The old region will automatically be erased (see image).

[pic]

20 Add region and clip to adjacent regions [pic]

File: region_tools.mbx

To use the utility:

1. Ensure the layer you want to edit is set to the currently editable layer.

2. Select the icon. The region drawing pointer will appear.

3. Draw a new region which overlaps adjacent regions.

4. The utility will ‘overlay-nodes’, i.e. create additional vertices, in the overlapping regions so that the region to be ‘added and clipped’ can be truly snapped to the mutual boundaries between the objects (Note: The standard MapInfo “Erase” function does not do this!).

5. The overlapping area will now be erased.

Caution:

1. Tabular data for the region to be added and clipped will be empty.

21 TUFLOW cross-section and water level line tool [pic]

File: tuflow_wll_tool.mbx

This utility now combines the former TUFLOW WLL and mid-cross-section utilities into a single dialog with an enhanced range of options for drawing WLL, as well as trimming and removal of overlapping WLL. The new dialog is shown below.

[pic]

To use the utility:

1. Either (a) select the 1d_nwk elements you wish to create cross-sections or water level lines (WLL) for (see image) and then select the icon, or (b) if you wish to create XS or WLL for all channels in a table, select the icon which in turn will allow the user to select a table.

[pic]

2. Select the table to draw cross-sections (XS) or TUFLOW water level lines (WLL) for. Select “Current Selection” or a currently open table. Use “Browse” to open a table.

3. Select whether to draw Mid XS, End XS or TUFLOW WLL. Select a currently open Table to draw the XS or WLL into, “Browse” to open a table or “Import Empty MIF…”.

4. Type in the required length of the XS or WLL (Please note that at vertices, the angle of the WLL is adjusted to bisect the ‘angle’ of the direction change. The length of the WLL is also increased automatically, currently by a fixed factor of approximately 1.4).

5. Type in the maximum spacing between subsequent WLL. Keep in mind the sinuosity of the channel and grid size of the 2D domain(s) in selecting an appropriate spacing.

6. If drawing WLL, select a method from the 4 offered. The new options (radio buttons 3 and 4) often give superior results to options 1 and 2 (options previously available in older versions of the TUFLOW WLL tool).

7. Select the line style. The TUFLOW Style is the style defined as part of the “TUFLOW Styles” utility. The line is based on the prefix of the table the XS or WLL are being created into. Alternatively, the user can select their own style.

8. Select an option for trimming the XS or WLL. Typically the user would select the 2d_bc table that contains the “null polygon(s)”. Please ensure the table does not also contain the active polygon as this will result in none of the newly created XS or WLL being trimmed. As an alternative approach, the WLL could be trimmed to the inactive code (null-polygon) boundary using the “Snap & trim CN/Xsec plines to region boundary” utility.

9. If drawing WLL, select an overlap removal method (please note that option 3 is currently under development).

10. Select the “Draw Mid Cross-Sections” / “Draw End Cross-Sections” or “Draw WLL’s” button as appropriate. The utility will then create, trim and remove overlaps as requested. The overlap process can take several minute.

11. Review all WLL created using the process – modified or delete WLL to ensure correct/intended representation of the lines as well as the 1d results they report. It is important to note that additional ‘redundant’ WLL will be created at the confluences of 1d_nwk reaches and the overlap removal options will generally not remove them. The overlap removal routine will also generally not remove overlapping WLL that intersect channel vertices. These lines will have to be manually altered / removed, which is generally a quicker process than manually creating all the WLL.

22 Create TUFLOW CN lines [pic]

File: CN_lines_end_reach.mbx

To draw CN lines:

1. Select the 1d_nwk elements you want to draw CN lines for.

2. From the list of open MI tables, select the 2d_bc table you wish to draw the CN lines into.

3. Type a length into the CN-line dialogue. The length is the length from the 1d_nwk out to the edge of the ‘null polygon’ (i.e. Code = -1, or code = 0 boundary), and the value entered should be in excess of the width of the 2d_bc null-polygon. The length of the lines is also automatically increased by the utility to account for the angles between 1d_nwk elements at the ‘nodes’. Please note that the ‘excess’ CN line length can be trimmed and the lines snapped to the null-polygon boundary by using the Snap & trim CN/xsec plines to region boundary utility [pic].

4. The utility will update the 2d_bc ‘Type’ and ‘f’ attributes with ‘cn’ and ‘1’ respectively.

Warning: be aware that the utility will draw multiple CN lines at branches and confluences. All CN line locations should be reviewed and redundant CN lines removed and/or amended to reflect good modelling practice.

[pic]

23 Snap & trim CN/xsec plines to region boundary [pic]

File: snap_n_trim_cn_xsec_plines.mbx

To use the utility:

1. Select the 2d_bc null-polygon or similar region that intersects the CN or cross-section lines you want to trim (see image).

[pic]

2. The “Select 2d_bc or 1d_xs table” dialog will appear (see image). From the list of open MI tables, select the 2d_bc table or 1d_xs table you wish to trim.

3. If you are trimming a 1d_xs layer, a dialog will appear prompting the user to select whether or not to insert additional vertices into the selected polygon. If the user is trimming CN lines in a 2d_bc layer, the dialog will not appear as CN lines have to be snapped to the 2d_bc HX lines, which are typically traced from the null-polygon.

[pic]

24 Split 1d-nwk polyline using xsec polylines [pic]

File: polyline_multisplit_tool.mbx

To use the utility:

1. Select the 1d_nwk polyline you want to split using cross-section lines (see image).

[pic]

2. Select the utility icon.

3. A dialog will appear with the selected object(s) layer name, prompting the user to confirm the layer selected is correct (see image).

4. The “Select Cross-Section Table” dialog will appear (see image). From the list of open MI tables, select the 1d_xs table to use to split the selected polyline.

25 Split polyline using a drawn line [pic]

File: Polyline_split_tool.mbx

To use the utility:

1. Ensure the table you want to edit is the currently editable layer

2. Select the icon. The cursor will change to a cross-hair, ready to draw a polyline.

3. Draw a line/polyline crossing the object where you wish to split it. Once the line/polyline has been drawn, the utility will automatically split the object and retain its tabular data.

26 Graph selected CSV cross-section [pic]

File: csv_grapher.mbx

To use the utility:

1. Select the 1d_xs polyline who’s CSV you want to graph then select the utilities icon.

2. The graph of the CSV file will appear (see image).

[pic]

27 Open selected cross-section CSV in Excel [pic]

File: csv_grapher.mbx

To use the utility:

1. Select the 1d_xs polyline who’s CSV you want to graph, if it’s not already selected, then select the utilities icon.

2. A temporary batch (.BAT) file will be created to open the CSV in MS Excel. The utility will automatically run the batch file and the CSV file should appear opened in Excel.

28 Graph selected CSV cross-section (with results) [pic]

File CSV_Grapher_With_Results.mbx

To use the utility:

1. Ensure the 1d water level results table (i.e. _1d_mmH) is open in the current map window.

2. Select the 1d_xs polyline who’s CSV you want to graph then select the utilities icon.

3. The graph of the CSV file and maximum and minimum water level results will appear (see image). If multiple results files are open, the utility will select the first results file from the current map window that contains intersecting results. It is unfortunate that the limitations of MapInfo's graph window means that the cross-section will appear distorted along the x-axis (i.e. the offsets). The offset of each point in the cross-section is equally spaced. To overcome this limitation, alternative graphing approaches/methods are being considered for future miTools releases.

[pic]

Please note that as of miTools release 2010_03, the utility has an inbuilt search tolerance of 0.1m to assist in selecting the node with the corresponding 1d_mmH results. Earlier versions of the utility relied on the node being snapped to the 1d_xs polyline.

29 Open selected cross-section CSV in Excel (with results) [pic]

File CSV_Grapher_With_Results.mbx

The utility is used in the same fashion as the version without results. Please refer to Section 3.24 for instructions on its use.

30 Increment Selected Layer [pic]

File: MI_Increment.mbx

To use the utility:

1. Select an object from the TUFLOW layer you want to increment.

2. The “Save and Increment File” dialog will appear, with the name of the selected object’s table name with a suggested ‘incremented’ filename (see image).

3. If the file is a TUFLOW ‘Empty’ file, the utility will prompt the user to save the file into the “MI” directory (see image).

4. If the selected object’s file does not have a revision number, a filename with a default revision number of 001 will be suggested in a message box (see image).

5. Once the “Save and Increment File” button is selected, the utility will close the original layer, open the incremented layer, add it to the current map window as the top layer and make it editable.

[pic]

31 Label Zpt or Zln layer with elevation [pic]

File: Label_Zpt.mbx

To use the utility:

1. Select an object from the TUFLOW 2d_zpt, 2d_zln, 2d_zlg or 2d_zlr layer you want to label. The tool relies on the first 6 digits of the filename to work out which custom formatting to apply.

2. Select the utilities icon. The layer’s objects will be labelled with the elevation according to the custom formatting style specified in the utilities initiation file Label_Zpt.ini.

3. If the layer is already labelled, the utility will display the “Turn Off Label” dialog (see image). From the dialog, the user can select to edit the INI file in UltraEdit (see image).

[pic]

32 Filter TUFLOW layers [pic]

File: TUFLOW_Map_Filter.mbx

To use the utility:

1. Select the icon. The Filter window will appear (see image).

[pic]

2. To sort the order of files in the current map window, select the “Group and Sort TUFLOW Layers” button. The order in which the files will be sorted in MapInfo are described in the TUFLOW_Map_Filter.ini file (see image).

[pic]

3. Select the layer type(s) to switch on or off. The “All ON” and “All OFF” buttons will set all the radio buttons to the ON or OFF option respectively. The “No Change” button will set all radio buttons back to the no change option. Once the selection is made, select the “Filter Selected Data Type(s)” button. The layers will be switched on or off accordingly.

4. To open an existing TUFLOW Run’s .WOR file, select the corresponding button and browse to the file. The utility will automatically open and add the files to the current map window.

Please note: The filter relies on the first 6 characters of the filename to determine the type of TUFLOW layer it is. For a file type greater than 6 characters (e.g. 1d_1d_bc), the files will be grouped and sorted based on first 6 characters only (i.e. 1d_1d_). All non-TUFLOW files will remain in the same order at the bottom of current Map control.

33 Turn off border of thematically mapped grid cells [pic]

File: Thematic_Tool.mbx

To use the utility:

1. Select an object from a thematically mapped region layer such as a 2d_grd check layer (see image).

[pic]

2. Select the icon. The Filter window will appear (see image). Select the thematically mapped field you want to modify then select the “OK” button.

[pic]

3. The border of the objects will now be switched off (see image).

[pic]

34 Plot long-section of selected 1d_nwk element's D/S reach [pic]

File: Plot_Long_Sec.mbx

Before starting, ensure the DEM you want to extract a surface profile through, and the 1d_nwk layer you want to use, are open. Also ensure the 1d_nwk layer is correctly snapped together. Then, to use the utility:

1. Select the upstream element of the 1d_nwk reach you want to extract a long section for, then select the icon. The “Select Grid for Surface Profile” dialog will appear, along with automatically selected 1d_nwk route which the utility will map. The route will be selected down to the last 1d_nwk element in the reach. Refer to images.

[pic]

[pic]

2. Select the DEM to extract the surface profile through. Select a point spacing to use along the long-section, as well as a minimum pipe cover (default 0.6m) which will add an additional surface profile to the plot. The minimum cover profile helps to sensibility check entered 1d_nwk data, check the design of pipe networks and/or assist in ‘designing’ a pipe network in the absence of real data. Then select the “OK” button.

3. The utility will create two (temporary) tables into the directory “C:\Program Files\MapInfo\Professional\Tools\WBM”. The tables are called “Long_Section_Plot.TAB” and “Long_Section_Plot_Pnts.TAB”, with “Long_Section_Plot.TAB” being the long-section alignment (the hick red line) shown in the map window (image above). These tables are used as the data source from which to calculate and export long-section information. The data is exported into a template spreadsheet called “Long_Section_Plot.xls”, which is also in the same directory.

4. A dialog will appear to prompt the user to enable macros when the long-section plot is automatically opened by the utility (see image). When prompted by excel, the user must select “Enable Macros” (see image). Note: MS Windows / MS Office security settings can be set such as they automatically disable running all macros. If this is the case, the utility cannot run as it relies on a macro within the excel spreadsheet to replot the graph of the long-section. The security settings must be adjusted to enable prompting before running macros.

[pic]

5. The Excel spreadsheet will now open, and the previous data in the sheet replaced by the new data. The long-section Chart will now appear (see image). The user MUST close this file before using the utility again. The spreadsheet cannot be open when the utility is run. Copies of long-sections can be kept by saving “Long_Section_Plot.xls” as a different filename using File>Save As in MS Excel.

[pic]

6. If Excel doesn’t appear – file Path_to_Excel.ini may need to be modified, as required, to point to the location of the Microsoft Excel. The contents of the file should appear something like the following:

!*******************************************************************************

! Add full path to Microsoft excel.exe file in the line below. Add no spaces after the end of the line.

!*******************************************************************************

"C:\Program Files\Microsoft Office\Office\Excel.exe"

1. Create XS CSV from ESRI DBF file [pic]

File: Export_XSec_CSVs.mbx

To use the utility:

1. Select the icon.

2. The “Open cross-section DBF file” dialog will appear. Select the DBF file, and select the “Open” button.

3. The cross-section CSV files will be created in the same directory as the DBF file.

Please note: The format of the DBF file needs to match the below (see image). The data items are as follows:

• ID - is the ID number of the point in a given cross-section. The points in a given cross-section are labelled from 0 to n (from the first point to the last point) in the cross-section. The first point in every cross-section must have an ID = 0, and the order in the file must be sequential.

• Name – The name of the CSV the user wants the cross-section data to be written to (e.g. “FR_024.CSV”).

• XCoor, YCoor – The Easting and Northing coordinates of the cross-section point.

• Dist – The distance, or “offset”, of the point from the start of the cross-section.

• YCoor – The Elevation of the cross-section point.

[pic]

35 Run TUFLOW From MapInfo [pic]

File: Run_TUFLOW_From_MI.mbx

To use the utility:

1. Select the icon.

2. The “Select TUFLOW Models to Run” dialog will appear (see image). The first time the utility is run, the user will need to select the “Edit .ini File” button to setup the TUFLOW menu items and the locations of the corresponding TUFLOW.EXE files (see image below).

3. Select the TUFLOW Version to use or select the “Run Existing .bat” button to run an existing batch file.

4. Browse to the TUFLOW Runs folder. The utility will list all the TCF files in the selected folder.

5. Select the TCF file(s) to run, as well as the run priority and other TUFLOW Run options (e.g. “Test the models” or “Test and Copy the models” with all the additional options introduced in TUFLOW 2010 builds i.e. -a | -ncf | -p). Note: If a single TCF file is selected, the "Edit Selected TCF" button will be enabled, allowing the user to edit the TCF file using the preferred text editing software.

6. Select the “Run TUFLOW” button to create and run the batch file.

[pic]

36 ASC to ASC Interface [pic]

File: mi_Asc2Asc..mbx

To use the utility:

1. Select the icon.

2. Select the ‘Before’ and ‘After’ ASC files.

3. Optionally, select the ‘Diff’ output file name.

4. Select ‘Run’.

If no output file is specified, the output file will take the form of – .

The mi_Asc2Asc interface does not contain the Asc_to_Asc.exe utility; rather it provides a means to run the utility without manually creating a batch file. Therefore the user needs to provide the locations of the Asc_to_Asc.exe utility and a suitable batch file location (the default location is C:\BMT_WBM\miTools\) in the miTools_config.ini file. The user must simply replace the file paths contained in this file with the filepaths they wish to use – no other changes should be made to this file.

37 TUFLOW to GIS Interface [pic]

File: mi_Tuflow2Gis.mbx

To use the utility:

1. Select the icon.

2. Select the input .dat or .xmdf file.

3. Select the required output options (3D surface or velocity vectors / Calibration Points – Longitudinal Profile).

4. Select the required map output data types. Multiple map outputs can be processed at the same time, however, there are no checks to determine if the requested map outputs exist.

5. Select the required output format. Vector options are available if the output is set to "MIF".

6. Select the relevant options for the desired output, including output time.

7. Select ‘Run’.

The mi_Tuflow2Gis interface does not contain the TUFLOW_to_GIS.exe utility; rather it provides a means to run the utility without manually creating a batch file. Therefore the user needs to provide the locations of the TUFLOW_to_GIS.exe utility and a suitable batch file location (the default location is C:\BMT_WBM\miTools\) in the miTools_config.ini file. The user must simply replace the file paths contained in this file with the filepaths they wish to use – no other changes should be made to this file.

38 DAT to DAT Interface [pic]

File: mi_Dat2Dat.mbx

To use the utility:

1. Select the icon.

2. Select the operator (only maximum, difference and concatenate are currently available).

3. If undertaking a difference, select the before case .dat and the after case .dat.

4. If undertaking a maximum or concatenate operator, press the 'select folder' button and select the folder where the model results are located.

5. Select the required results files from the window.

6. Select ‘Run’.

The mi_Dat2Dat interface does not contain the DAT_to_DAT.exe utility; rather it provides a means to run the utility without manually creating a batch file. Therefore the user needs to provide the locations of the DAT_to_DAT.exe utility and a suitable location to write, and execute, the batch file. The default location is C:\BMT_WBM\miTools\ and is specified in the miTools_config.ini file. The user must simply replace the file paths contained in this file with the filepaths they wish to use – no other changes should be made to this file.

39 Export CSV [pic]

File: BatExport_TAB_DATA_to_CSV.mbx

To use the utility:

1. Select the icon.

2. If only one table is open, it will be exported to csv format.

3. If more than one table is open, a dialog box is displayed and the user selects the required tables to be exported.

The exported csv file automatically assigns the first line of the table as the column titles. Unlike previous versions of the tool, multiple tables can be exported simultaneously.

40 Create CSV format Cross-Sections from VM Grid

File: MI_Batch_XS_CSV_Generator.mbx

To use the utility:

1. Select “Create CSV format Cross-Sections from VM Grid...” from the miTools menu. The main dialog will appear (see image).

[pic]

2. Select the Table containing the cross-section lines (e.g. the 1d_xs or 1d_ta table).

3. Select the name of the VM GRID to use to extract the elevation data from.

4. Select a method for varying the hydraulic roughness across the cross-section(s). “Don’t Vary Roughness” will create cross-section CSV files with only an offset and elevation column. Alternatively, a third column containing material number (M), Manning’s n (N) or relative resistance (R) can be added to the CSV files.

5. Enter a distance between elevation sampling points along the cross-section(s).

6. Select “OK” to create the CSV cross-section files.

41 TUFLOW Standard Styles

File: TUFLOW_Standard_Styles.MBX

To use the utility:

1. Select “Edit TUFLOW Default Styles” from the miTools menu. The main dialog will appear showing the default styles for each standard/typical TUFLOW Table prefix. Please note, the styles shipped with miTools may vary from that shown below.

[pic]

2. Adjust the styles for each of the file prefix names to reflect the required modelling conventions of your organisation. Once setup, the user should typically not have to adjust the styles.

3. Select “OK”. Any changes made by the user will be saved to the TUFLOW styles file (TUFLOW_Standard_Styles.set). It is recommended that the SET file is not manually edited.

42 Convert GIS Table to TUFLOW File Format

File: TUFLOW_File_Converter.mbx

To use the utility:

1. Select the input GIS File (the user will be prompted to determine whether the file is currently open in MapInfo or not).

2. Select the empty MIF file that refers to the required TUFLOW file format (e.g.: 2d_zln_empty.mif).

3. Press ‘Ok’.

4. The file will be re-named with the TUFLOW prefix (e.g. sample_data.tab will now be called 1d_nwke_sample_data.tab) and will include all the required TUFLOW attributes at the start of the table. All existing attributes and the co-ordinates of the original objects are fully retained.

43 Convert GIS pipe/pit layer into a TUFLOW 1d_nwke

File: OneD_Nwk_Converter.mbx

To use the utility:

1. Select the input table (the table must be open in the current MapInfo session).

2. The user can assign the original data columns to be used to update the 1d_nwke columns (see example image below).

[pic]

3. Depending on the units of the data, the user can specify a conversion routine to convert the original data before it is updated into the 1d_nwke columns. The conversion routine is: TUFLOW Data = a * (b + Original Data) + c. Selected example are detailed below:

i. To convert culvert widths in millimetres to metres, the ‘a’ factor would be 0.001.

ii. To set the number of culverts to 1 for all items, the ‘c’ factor would be 1.

iii. To update inverts with a datum shift and unit conversion. The ‘a’ factor is used to do the unit conversion and the ‘b’ or ‘c’ factors can be used for the datum shift. Use the ‘b’ factor if the datum shift is needed before the unit conversion or the ‘c’ factor if the datum shift is needed after the unit conversion.

4. The file will be re-named with the TUFLOW 1d_nwke prefix, the selected columns will be updated as per the user definitions and will be loaded into the front window. The original table will be closed.

44 Close all Queryn (temporary) Tables

File: Close_QueryN.mbx

By selecting the menu item, all the temporary "Queryn" tables in the current MapInfo session will be closed.

45 Relocate Info Tool Window on Screen (to top left corner)

File: Relocate_Info_Window.mbx

By selecting the menu item, the utility will reposition MapInfo's Information Window to the top left corner of the screen. The Information Window sometimes does not appear on-screen when selected. The issue is typically caused by opening a workspace created on a PC with a larger/higher resolution screen, where the Information Window was open in a location that cannot be displayed on lower resolution screens. This utility will resolve the issue.

46 Name 1d Networks and Cross-Sections

File: Name_Channel_n_XSec_IDs.mbx

The "Name 1d networks and cross-sections" utilities menu currently gives you four options as follows (see image below). Each option is described in Section 3.47.1 to 3.47.4. respectively

[pic]

1 Name networks using chainages or sequential numbers

To run the utility, select the most downstream section of channel or pipe you wish to name then select the menu item to run the utility. The following dialog will appear (see image):.

The utility, once running, will trace up through the network. From the starting channel or pipe (starting object), the next object snapped to the upstream end will be selected and named. Should the upstream object be part a junction with two or more incoming objects, the utility will prompt the user to select which of the objects are to be named. The utility will then continue to work up through the network until the last object (i.e. the most upstream channel/pipe) is selected and named.

There are two main naming options available to the user: chainage and sequential. The chainages option names the IDs of the channels/pipes based on the distance upstream from the selected object and the start chainage nominated by the user. The sequential option names the ID's of the channels/pipes based on a starting number specified by the user, with each subsequent object up the network named in sequence (see image with 'sequential' option selected).

Each option gives the user the flexibility to write the chainage or sequential numbers as variable length or fixed length via the "Display" listbox.

Additional options to add prefixes, 'midfixes' and 'postfixes' are available to provide flexibility to ensure the ID names meet the required/desired convention. An example of what the ID names will look like is available by selecting the "Show e.g. ID Name..." button. Please note: TUFLOW 1d_nwk(e) ID field can contain a maximum of 12 characters. If automatic naming of nodes and pits is being used, then the ID names should be limited to 10 characters. The utility will warn the user if the ID names being generated exceed 10 characters and will truncate names to 12 characters.

2 Name channels based on the upstream node or upstream XS IDs

The utility will prompt the user to enter the name of the table containing the nodes, pits or cross-sections that are to be used to name the 1d channels or pipes. If a cross-section table is selected (i.e. 1d_xs or 1d_tab), then the 'source' filename without the ".csv" extension will be used for the ID name. The node/pit/cross-sections and the 1d channel/pipes can be in the same table.

Please note: the utility relies on objects being snapped together (or within an inbuilt snap tolerance of 0.5m of each other) in order to work correctly.

3 Name channels based on 'mid' cross-section IDs

The utility will prompt the user to enter the name of the table containing the 'mid' cross-sections that are to be used to name the 1d channels (or pipes in the case of irregular channels). The 'source' filename without the ".csv" extension will be used for the ID name. The cross-sections and the 1d channel/pipes can be in the same table.

4 Name 'end' cross-sections based on the downstream channel ID

The utility will prompt the user to enter the name of the table containing the 'end' cross-sections that are to be used to name the 1d channels (or pipes in the case of irregular channels). The 'source' filename without the ".csv" extension will be used for the ID name. The cross-sections and the 1d channel/pipes can be in the same table.

Please note: the utility relies on objects being snapped together (or within an inbuilt snap tolerance of 0.5m of each other) in order to work correctly.

47 Export HEC-RAS Cross-Sections to ESTRY CSV Format

File: HECRAS_Convert_XS_to_CSV.mbx

By selecting the menu item, the following dialog will be displayed.

[pic]

To use the utility, firstly use the "Select File" button to browse to the location of the HEC-RAS geometry file you wish to convert. Select whether to include the Manning's n values in the exported CSV files. If the user selects yes, the Manning's n values will be included in the CSV files as the third column of data.

Next, select the overbank trimming option. If the option to trim overbanks is selected, the overbanks will be trimmed outside of the left and right bank main channel station markers. If no markers have been specified for the cross-section, the section will not be trimmed.

As an alternative to trimming the cross-sections, the user can opt to set the overbank points in the cross-section to "-1". If a material value of -1 is set, TUFLOW will ignore the point in the cross-section.

48 Import Geo-Referenced JPG Imagery

File: ImportGeoRefImages.mbx

By selecting the menu item, the utility will allow the user to input all geo-referenced jpg imagery within a defined folder.

[pic]

1. Select the required projection of the images.

2. Select the input folder

3. Select OK.

4. All geo-referenced images in the selected folder will be opened and placed in the current window or in a new window (if no windows are open)

Tool Updates / Bug Reporting

BMT WBM is continually refining and improving the miTools and associated utilities. BMT WBM will periodically make new and updated tools available via the miTools website (\miTools\miTools.htm), with announcements made through the TUFLOW forum (\forum).

Any suggestions for new tools, or improvements to existing tools, can be made via the miTools section on the TUFLOW forum or via the miTools email address (miTools@). If requested, BMT WBM may be able to create or customise existing and/or new tools for particular users. Please feel free to contact us via our email address (miTools@) to discuss any individual needs.

BMT WBM has extensively tested all of the miTools; however, we make no guarantee that they are bug free. If a bug is discovered in the code, BMT WBM will endeavour to fix it as soon as practicable and post a new version onto the miTools website and make appropriate posts in the TUFLOW forum. Bugs should be reporting to BMT WBM through our email address (miTools@) with as much information as possible regarding the bug and any error messages that were displayed.

-----------------------

!workspace

!version 200

Run Application "C:\Program Files\MapInfo\Professional\vm\VM.mbx"

MapInfo and TUFLOW Productivity Utilities (miTools)

User Manual

(Feb 2012)

[pic]

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download