/3.2 (Extension.1 Name: "Bas1" Dependencies: "$AVEXT/spatial.avx\n" FirstRootClassName: "List" Roots: 2 Roots: 3 Roots: 36 Roots: 37 Roots: 48 Roots: 49 Roots: 50 Roots: 51 Roots: 52 Roots: 53 Roots: 54 Version: 32 About: "Extends the Spatial Analyst: Catchtment delineation for the point defined by a user and other functions." InstallScript: 55 UninstallScript: 56 ExtVersion: 1 ) (List.2 ) (List.3 Child: 4 Child: 12 Child: 20 Child: 28 ) (List.4 Child: 5 Child: 9 Child: 11 ) (List.5 Child: 6 Child: 7 Child: 8 ) (AVStr.6 S: "View" ) (AVStr.7 S: "ButtonBar" ) (AVStr.8 S: "Basin.InitiateButton" ) (Butn.9 Help: "Initiate//Sets Basin1 Extension properties and enables its icons. Elevation Grid must be active in View's TOC !" Icon: 10 Click: "Basin.InitiateButton" ) (AVIcon.10 Name: "1init.bmp" Data: 4e442049 6d616765 00010014 00110000 Data: 00cc1111 11111111 11111111 00001111 Data: 11111111 11111111 00001110 11010111 Data: 01110001 00001110 11010111 01110111 Data: 00001110 11000111 01110011 00001110 Data: 11010111 01110111 00001110 11000110 Data: 00110001 00001111 11111111 11111111 Data: 00001111 11111111 11111111 00001111 Data: 11111111 11111111 00001110 11011011 Data: 01110111 00001110 11010011 01110111 Data: 00001110 11000011 01110111 00001110 Data: 11001011 01110111 00001110 11011011 Data: 01100011 00001111 11111111 11111111 Data: 00001111 11111111 11111111 00000000 Data: 0040ff00 0000ceff ff00ffff ff00ffff Data: ff00ffff ff00ffff ff00ffff ff00ffff Data: ff00ffff ff00ffff ff00ffff ff00ffff Data: ff00ffff ff00ffff ff00ffff ff00ffff Data: ff000002 00040007 00200001 00020000 Data: 00000000 0000 ) (Numb.11 N: 26.00000000000000 ) (List.12 Child: 13 Child: 17 Child: 19 ) (List.13 Child: 14 Child: 15 Child: 16 ) (AVStr.14 S: "View" ) (AVStr.15 S: "ButtonBar" ) (AVStr.16 S: "Basin.StreamNetwork" ) (Butn.17 Disabled: 1 Help: "StreamNetwork//Generates a stream network from a Flow Accumulation Grid. (Please, execute the \"INITIATE\" button to enable this icon)" Tag: "Bas1" Icon: 18 Click: "Basin.StreamNetwork" ) (AVIcon.18 Name: "riv3.bmp" Data: 4e442049 6d616765 00010014 00110000 Data: 03fcccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ff0000ff 0000ccff Data: ffff0000 ff0000cc ffffccff ffff0000 Data: ff0000cc ffffccff ffccffff ff0000ff Data: 0000ff00 00ccffff ccffffcc ffffccff Data: ffccffff ff0000ff 0000ccff ffff0000 Data: ff0000cc ffffccff ffff0000 ff0000cc Data: ffffccff ffccffff ff0000ff 0000ff00 Data: 00ccffff ccffffcc ffffccff ffccffff Data: ff0000ff 0000ccff ffff0000 ff0000cc Data: ffffccff ffff0000 ff0000cc ffffccff Data: ffff0000 ff0000cc ffffff00 00ff0000 Data: ccffffcc ffffccff ffccffff ff0000ff Data: 0000ff00 00ff0000 ccffffcc ffffccff Data: ffff0000 ff0000cc ffffccff ffff0000 Data: ff0000cc ffffff00 00ff0000 ccffffcc Data: ffffccff ffccffff ff0000ff 0000ff00 Data: 00ff0000 ff0000cc ffffccff ffff0000 Data: ff0000cc ffffccff ffff0000 ff0000cc Data: ffffff00 00ff0000 ccffffcc ffffccff Data: ffccffff ff0000ff 0000ccff ffff0000 Data: ff0000cc ffffccff ffff0000 ff0000cc Data: ffffccff ffff0000 ff0000cc ffffff00 Data: 00ff0000 ccffffcc ffffccff ffccffff Data: ff0000ff 0000ccff ffff0000 ff0000cc Data: ffffccff ffff0000 ff0000cc ffffccff Data: ffff0000 ff0000cc ffffff00 00ff0000 Data: ccffffcc ffffccff ffccffff ff0000ff Data: 0000ff00 00ff0000 ff0000cc ffffccff Data: ffff0000 ff0000cc ffffccff ffff0000 Data: ff0000cc ffffff00 00ff0000 ccffffcc Data: ffffccff ffccffff ff0000ff 0000ff00 Data: 00ff0000 ccffffcc ffffccff ffff0000 Data: ff0000cc ffffccff ffff0000 ff0000cc Data: ffffff00 00ff0000 ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffff0000 Data: 00000001 00180007 00200001 00020000 Data: 00000000 0000 ) (Numb.19 N: 27.00000000000000 ) (List.20 Child: 21 Child: 25 Child: 27 ) (List.21 Child: 22 Child: 23 Child: 24 ) (AVStr.22 S: "View" ) (AVStr.23 S: "ToolBar" ) (AVStr.24 S: "Basin.DelineateTool" ) (Tool.25 Disabled: 1 Help: "BasinDelineate//Delineates a drainage basin for the point defined by a user and calculates basin's characteristics. (Please, execute the \"INITIATE\" button to enable this icon)" Tag: "Bas1" Icon: 26 Cursor: "Cursors.Bullseye" Apply: "Basin.DelineateTool" ) (AVIcon.26 Name: "bas2.bmp" Data: 4e442049 6d616765 00010012 000f0000 Data: 0348ccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff 0000ccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: 0000ccff ffff0000 ff0000ff 0000ff00 Data: 00ccffff ccffffff 0000ff00 00ccffff Data: ff0000ff 0000ccff ffff0000 ff0000ff Data: 0000ccff ffccffff 0000ccff ffff0000 Data: ff0000ff 0000ff00 00ff0000 ccffffff Data: 0000ff00 00ccffff ff0000ff 0000ccff Data: ffff0000 ff0000ff 0000ff00 00ccffff Data: 0000ccff ffff0000 ff0000cc ffffff00 Data: 00ff0000 ccffffff 0000ff00 00ccffff Data: ff0000ff 0000ccff ffccffff ccffffff Data: 0000ff00 00ccffff 0000ccff ffff0000 Data: ff0000cc ffffff00 00ff0000 ccffffff Data: 0000ff00 00ccffff ff0000ff 0000ccff Data: ffccffff ccffffff 0000ff00 00ccffff Data: 0000ccff ffff0000 ff0000ff 0000ff00 Data: 00ff0000 ccffffff 0000ff00 00ff0000 Data: ff0000ff 0000ccff ffccffff ff0000ff Data: 0000ff00 00ccffff 0000ccff ffff0000 Data: ff0000ff 0000ff00 00ff0000 ccffffff Data: 0000ff00 00ff0000 ff0000ff 0000ccff Data: ffff0000 ff0000ff 0000ccff ffccffff Data: 0000ccff ffff0000 ff0000cc ffffff00 Data: 00ff0000 ccffffff 0000ff00 00ccffff Data: ff0000ff 0000ccff ffff0000 ff0000cc Data: ffffccff ffccffff 0000ccff ffff0000 Data: ff0000cc ffffff00 00ff0000 ccffffff Data: 0000ff00 00ccffff ff0000ff 0000ccff Data: ffff0000 ff0000cc ffffccff ffccffff Data: 0000ccff ffff0000 ff0000ff 0000ff00 Data: 00ff0000 ccffffff 0000ff00 00ff0000 Data: ff0000ff 0000ccff ffff0000 ff0000ff Data: 0000ff00 00ccffff 0000ccff ffff0000 Data: ff0000ff 0000ff00 00ccffff ccffffcc Data: ffffff00 00ff0000 ff0000cc ffffccff Data: ffccffff ff0000ff 0000ff00 00ccffff Data: 0000ccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff 0000ccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: 0000ccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff 00000000 00000001 Data: 00180007 00200001 00020000 00000000 Data: 0000 ) (Numb.27 N: 16.00000000000000 ) (List.28 Child: 29 Child: 33 Child: 35 ) (List.29 Child: 30 Child: 31 Child: 32 ) (AVStr.30 S: "View" ) (AVStr.31 S: "ToolBar" ) (AVStr.32 S: "Basin.RainDropPathTool" ) (Tool.33 Disabled: 1 Help: "RainDropPath//Traces the flow path of a raindrop. (Please, execute the \"INITIATE\" button to enable this icon)" Tag: "Bas1" Icon: 34 Cursor: "Cursors.CrossHair" Apply: "Basin.RaindropPathTool" ) (AVIcon.34 Name: "drop.bmp" Data: 4e442049 6d616765 00010012 000f0000 Data: 012cd6d6 d6d6d6d6 d6d6d6d6 d6d6d6d6 Data: d6d6d6d6 d6d6d6d6 d6d6d6d6 05050505 Data: 05d6d6d6 d6d6d6d6 d6d6d6d6 d6d60505 Data: 05050505 050505d6 d6d6d6d6 d6d6d6d6 Data: d6d60505 05050505 050505d6 d6d6d6d6 Data: d6d6d6d6 d6050505 05050505 05050505 Data: d6d6d6d6 d6d6d6d6 d6050505 05050505 Data: 05050505 d6d6d6d6 d6d6d6d6 d6050505 Data: 05050505 05050505 d6d6d6d6 d6d6d6d6 Data: d6050505 05050505 05050505 d6d6d6d6 Data: d6d6d6d6 d6d60505 05050505 050505d6 Data: d6d6d6d6 d6d6d6d6 d6d6d605 05050505 Data: 0505d6d6 d6d6d6d6 d6d6d6d6 d6d6d6d6 Data: 05050505 05d6d6d6 d6d6d6d6 d6d6d6d6 Data: d6d6d6d6 d6050505 d6d6d6d6 d6d6d6d6 Data: d6d6d6d6 d6d6d6d6 d6050505 d6d6d6d6 Data: d6d6d6d6 d6d6d6d6 d6d6d6d6 d6d605d6 Data: d6d6d6d6 d6d6d6d6 d6d6d6d6 d6d6d6d6 Data: d6d6d6d6 d6d6d6d6 d6d6d6d6 d6d60000 Data: 04000000 00003300 00006600 00009900 Data: 0000cc00 0000ff00 00000000 33003300 Data: 33006600 33009900 3300cc00 3300ff00 Data: 33000000 66003300 66006600 66009900 Data: 6600cc00 6600ff00 66000000 99003300 Data: 99006600 99009900 9900cc00 9900ff00 Data: 99000000 cc003300 cc006600 cc009900 Data: cc00cc00 cc00ff00 cc000000 ff003300 Data: ff006600 ff009900 ff00cc00 ff00ff00 Data: ff000033 00003333 00006633 00009933 Data: 0000cc33 0000ff33 00000033 33003333 Data: 33006633 33009933 3300cc33 3300ff33 Data: 33000033 66003333 66006633 66009933 Data: 6600cc33 6600ff33 66000033 99003333 Data: 99006633 99009933 9900cc33 9900ff33 Data: 99000033 cc003333 cc006633 cc009933 Data: cc00cc33 cc00ff33 cc000033 ff003333 Data: ff006633 ff009933 ff00cc33 ff00ff33 Data: ff000066 00003366 00006666 00009966 Data: 0000cc66 0000ff66 00000066 33003366 Data: 33006666 33009966 3300cc66 3300ff66 Data: 33000066 66003366 66006666 66009966 Data: 6600cc66 6600ff66 66000066 99003366 Data: 99006666 99009966 9900cc66 9900ff66 Data: 99000066 cc003366 cc006666 cc009966 Data: cc00cc66 cc00ff66 cc000066 ff003366 Data: ff006666 ff009966 ff00cc66 ff00ff66 Data: ff000099 00003399 00006699 00009999 Data: 0000cc99 0000ff99 00000099 33003399 Data: 33006699 33009999 3300cc99 3300ff99 Data: 33000099 66003399 66006699 66009999 Data: 6600cc99 6600ff99 66000099 99003399 Data: 99006699 99009999 9900cc99 9900ff99 Data: 99000099 cc003399 cc006699 cc009999 Data: cc00cc99 cc00ff99 cc000099 ff003399 Data: ff006699 ff009999 ff00cc99 ff00ff99 Data: ff0000cc 000033cc 000066cc 000099cc Data: 0000cccc 0000ffcc 000000cc 330033cc Data: 330066cc 330099cc 3300cccc 3300ffcc Data: 330000cc 660033cc 660066cc 660099cc Data: 6600cccc 6600ffcc 660000cc 990033cc Data: 990066cc 990099cc 9900cccc 9900ffcc Data: 990000cc cc0033cc cc0066cc cc0099cc Data: cc00cccc cc00ffcc cc0000cc ff0033cc Data: ff0066cc ff0099cc ff00cccc ff00ffcc Data: ff0000ff 000033ff 000066ff 000099ff Data: 0000ccff 0000ffff 000000ff 330033ff Data: 330066ff 330099ff 3300ccff 3300ffff Data: 330000ff 660033ff 660066ff 660099ff Data: 6600ccff 6600ffff 660000ff 990033ff Data: 990066ff 990099ff 9900ccff 9900ffff Data: 990000ff cc0033ff cc0066ff cc0099ff Data: cc00ccff cc00ffff cc0000ff ff0033ff Data: ff0066ff ff0099ff ff00ccff ff00ffff Data: ff000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000002 00080007 00200001 00020000 Data: 00000000 0000 ) (Numb.35 N: 17.00000000000000 ) (List.36 ) (List.37 Child: 38 ) (List.38 Child: 39 Child: 42 Child: 47 ) (List.39 Child: 40 Child: 41 ) (AVStr.40 S: "View" ) (AVStr.41 S: "Basin.ElevPointSurface" ) (ToolMenu.42 Disabled: 1 Help: "ElevationPointSurface//Extracts the elevation of a point (magenta colour) from a surface. (Please, execute the \"INITIATE\" button to enable this icon)" Tag: "Bas1" Icon: 43 Cursor: "Cursors.CrossHair" Apply: "Basin.ElevPointSurface" Child: 44 Child: 45 ) (AVIcon.43 Name: "p_srf.bmp" Data: 4e442049 6d616765 00010012 000f0000 Data: 03480260 d40260d4 0260d402 60d40260 Data: d40260d4 0260d402 60d40260 d40260d4 Data: 0260d402 60d40260 d40260d4 0260d402 Data: 60d40260 d40260d4 0000ccff ffccffff Data: 0260d402 60d40260 d40260d4 0260d402 Data: 60d40260 d40260d4 0260d402 60d40260 Data: d40260d4 0260d402 60d40260 d40260d4 Data: 0000ccff ffccffff ccffffff 0000ccff Data: ffccffff 0260d402 60d40260 d40260d4 Data: 0260d402 60d40260 d40260d4 0260d402 Data: 60d40260 d40260d4 0000ccff ffccffff Data: ff0000ff 0000ff00 00ccffff ccffffcc Data: ffffccff ffccffff 0260d402 60d40260 Data: d40260d4 0260d402 60d40260 d40260d4 Data: 0000ccff ffff0000 ff0000ff 0000ff00 Data: 00ff0000 ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff 0260d402 Data: 60d40260 d40260d4 0000ff00 00ff0000 Data: ff0000ff 0000ff00 00ff0000 ff0000cc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ff0260d4 Data: 0000ccff ffccffff ccffffff 0000ccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff 0000ccff ffccffff Data: ccffffff 0000ccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: 0000ccff ffccffff ccffffff 0000ccff Data: ffccffff ccffffcc ffffccff ffccffff Data: 0719ff07 19ff0719 ff0719ff 0719ff07 Data: 19ffccff ffccffff 0000ccff ffccffff Data: ccffffff 0000ccff ffccffff ccffffcc Data: ffffccff ffccffff 0719ff07 19ffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: 0000ccff ffccffff ccffffff 0000ff00 Data: 00ff0000 ff0000ff 0000ccff ffccffff Data: ccffff07 19ff0719 ff0719ff ccffffcc Data: ffffccff ffccffff 0000ccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffff0719 Data: ff0719ff 0719ffcc ffffccff ffccffff Data: 0000ccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff 0719ff07 Data: 19ffccff ffccffff 0000ccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff 0719ff07 19ff0719 Data: ff0719ff 0719ff07 19ffccff ffccffff Data: 0000ccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff 00000000 00000001 Data: 00180007 00200001 00020000 00000000 Data: 0000 ) (Tool.44 Disabled: 1 Help: "ElevationPointSurface//Extracts the elevation of a point (magenta colour) from a surface. (Please, execute the \"INITIATE\" button to enable this icon)" Tag: "Bas1" Icon: 43 Cursor: "Cursors.CrossHair" Apply: "Basin.ElevPointSurface" ) (Tool.45 Disabled: 1 Help: "ElevationPointGrid//Extracts the elevation of a point (green colour) from a grid - cell value. (Please, execute the \"INITIATE\" button to enable this icon)" Tag: "Bas1" Icon: 46 Cursor: "Cursors.CrossHair" Apply: "Basin.ElevPointGrid" ) (AVIcon.46 Name: "p_gr.bmp" Data: 4e442049 6d616765 00010012 000f0000 Data: 03480260 d40260d4 0260d402 60d40260 Data: d40260d4 0260d402 60d40260 d40260d4 Data: 0260d402 60d40260 d40260d4 0260d402 Data: 60d40260 d40260d4 00000260 d40260d4 Data: 0260d402 60d40260 d40260d4 0260d402 Data: 60d40260 d40260d4 0260d402 60d40260 Data: d40260d4 0260d402 60d40260 d40260d4 Data: 00000260 d40260d4 0260d402 60d40260 Data: d40260d4 0260d402 60d40260 d40260d4 Data: 0260d402 60d40260 d40260d4 0260d402 Data: 60d40260 d40260d4 0000ccff ffccffff Data: ccffffff 0000ccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: 0000ccff ffccffff ff0000ff 0000ff00 Data: 00ccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff 0000ccff ffff0000 Data: ff0000ff 0000ff00 00ff0000 ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: 0000ff00 00ff0000 ff0000ff 0000ff00 Data: 00ff0000 ff0000cc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff 0000ccff ffccffff Data: ccffffff 0000ccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: 0000ccff ffccffff ccffffff 0000ccff Data: ffccffff ccffffcc ffffccff ffccffff Data: 38880838 88083888 08388808 38880838 Data: 8808ccff ffccffff 0000ccff ffccffff Data: ccffffff 0000ccff ffccffff ccffffcc Data: ffffccff ffccffff 38880838 8808ccff Data: ffccffff ccffffcc ffffccff ffccffff Data: 0000ccff ffccffff ccffffff 0000ff00 Data: 00ff0000 ff0000ff 0000ccff ffccffff Data: ccffff38 88083888 08ccffff ccffffcc Data: ffffccff ffccffff 0000ccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff ccffffcc ffff3888 Data: 08388808 388808cc ffffccff ffccffff Data: 0000ccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff 38880838 Data: 8808ccff ffccffff 0000ccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff 38880838 88083888 Data: 08388808 38880838 8808ccff ffccffff Data: 0000ccff ffccffff ccffffcc ffffccff Data: ffccffff ccffffcc ffffccff ffccffff Data: ccffffcc ffffccff ffccffff ccffffcc Data: ffffccff ffccffff 00000000 00000001 Data: 00180007 00200001 00020000 00000000 Data: 0000 ) (Numb.47 N: 18.00000000000000 ) (Script.48 Name: "Basin.DisableStartUp" SourceCode: "' Script Name: Basin.DisableStartUp\n' Script short Name: B_disab.txt\n' Author: Ivan Petras\n' E-mail: IPetras@dwaf.gov.za\n' Date: Feb 04 2000\n' Revised by: \n' Revision Date: \n' Revisions: \n' -------------------------------------------------------------------\n' Description: The script is set up in the\n' Project - Properties - StartUp Dialog Box\n' by running the \"Basin.InitiateButton\" script\n' attached to the \"INITATE\" Button. \n' Requires: \n' Runs: \n' Run by: \n' Help String:\n' Self: \n' Returns: Disables icons on a Tool Bar with Tag=Bas1\n' (Basin and RainDropPath icons) when project is open.\n' -------------------------------------------------------------------\n\nbasGUI = av.FindGUI(\"View\")\nbasTool = basGUI.GetToolBar.GetControls\nbasButt = basGUI.GetButtonBar.GetControls\naTag = \"Bas1\"\nfor each t in basTool\n if (t.GetTag.Contains(aTag)) then \n t.SetEnabled(FALSE)\n end\nend\nfor each t in basButt\n if (t.GetTag.Contains(aTag)) then \n t.SetEnabled(FALSE)\n end\nend\nfor each t in basTool\n if (t.Is(ToolMenu)) t hen\n basToolMenu = t\n for each i in basToolMenu\n if (i.GetTag.Contains(aTag)) then \n i.SetEnabled(FALSE)\n end \n end\n end\nend\n\n\n" ) (Script.49 Name: "Basin.ElevPointSurface" SourceCode: "' Script Name: Basin.ElevPointSurface\n' Script short Name: B_elev_s\n' Author: Ivan Petras\n' E-mail: IPetras@dwaf.gov.za\n' Date: Apr 04 2000\n' Revised by: Ivan Petras\n' Revision Date: Feb 17 2003\n' -------------------------------------------------------------------\n' Description: ElevationPointSurface returns X and Y coordinates and\n' an interpolated Z value for a point defined by a user on the surface\n' defined by the Elevation Grid. The point is displayed in magenta.\n' Interpolating from the four nearest c ell centers derives the\n' interpolated Z value for the point. The first two lines are\n' interpolated between the cell centers in the Y direction.\n' Then a line is interpolated from these two lines in the X direction\n' that intersects the point. Finally the point's elevation is\n' interpolated from this line. All interpolations are linear.\n' Requires: \n' Runs: \n' Run by: \n' Help String: ElevationPointSurface//Extracts the elevation of a point\n' (magenta) from a surface. (Please, execute the \"INITIATE\" button\n ' to enable this icon).\n' Self: \n' Returns: \n' -------------------------------------------------------------------\nav.PurgeObjects\n\nviwActive = av.GetActiveDoc\nviwActive.GetGraphics.UnselectAll\npt = viwActive.GetDisplay.ReturnUserPoint\nx = pt.GetX \ny = pt.GetY\n\n'Seta number of digits after decimal point\nDD = {x,y}\nfor each i in DD\n i.SetFormat(\"d.dddddd\")\nend \n\nelev = _theGrid 'new\ntheProj = viwActive.GetProjection\nel = elev.PointValue (pt, theProj) 'alt\nel.SetFormat(\"d.dd\")\n\nresZ = \"ELEVATION = \"++el.AsS tring\nadd = MsgBox.YesNo(\"Add to the View\"+nl+resZ,\n\" X = \"+x.AsString+\"; \"++\"Y = \"+y.AsString,true)\n\n\nif (add) then\n markSym = av.GetSymbolWin.ReturnCurrentSymbol(#SYMBOL_MARKER)\n markSym.SetSize (4)\n markSym.SetColor(Color.GetMagenta)\n gp = GraphicShape.Make(pt)\n gp.SetSymbol(markSym)\n gp.SetSelected(TRUE)\n viwActive.GetGraphics.Add(gp)\n av.GetProject.SetModified(true)\n elText = GraphicText.Make (el.AsString, pt)\n aDisplay = viwActive.GetDisplay\n textSym = av.GetSymbolWin.ReturnCurrentSymbol(#S YMBOL_TEXT)\n textSym.SetSize (10)\n elText.setSymbol(textSym)\n elText.Invalidate\n elText.SetDisplay(aDisplay)\n viwActive.GetGraphics.Add(elText)\n viwActive.GetGraphics.UnselectAll\nend \n\n" ) (Script.50 Name: "Basin.ElevPointGrid" SourceCode: "' Script Name: Basin.ElevPointGrid\n' Script short Name: B_elev_g\n' Author: Ivan Petras\n' E-mail: IPetras@dwaf.gov.za\n' Date: Apr 04 2000\n' Revised by: \n' Revision Date: \n' Revisions: \n' -------------------------------------------------------------------\n' Description: ElevationPointGrid returns the user defined point's X\n' and Y coordinates and the Z value of the cell in the Elevation Grid\n' that contains the point. The point is displayed in green.\n' Requires: \n' Runs: \n' Run by: \n' Help String: ElevationPo intGrid//Extracts the elevation of a point\n' (green)from a grid - cell value. (Please, execute' the \"INITIATE\" button\n' to enable this icon).\n' Self: \n' Returns: \n' -------------------------------------------------------------------\n\nav.PurgeObjects\nviwActive = av.GetActiveDoc\nviwActive.GetGraphics.UnselectAll\npt = viwActive.GetDisplay.ReturnUserPoint\nx = pt.GetX \ny = pt.GetY\n\n'Seta number of digits after decimal point\nDD = {x,y}\nfor each i in DD\n i.SetFormat(\"d.dddddd\")\nend \n\nelev = _theGrid 'new\ntheProj = viwActive.GetProjection\nel = elev.CellValue (pt, theProj) 'alt\nel.SetFormat(\"d.dd\")\n\nresZ = \"ELEVATION = \"++el.AsString\nadd = MsgBox.YesNo(\"Add to the View\"+nl+resZ,\n\" X = \"+x.AsString+\"; \"++\"Y = \"+y.AsString,true)\n\n\nif (add) then\n markSym = av.GetSymbolWin.ReturnCurrentSymbol(#SYMBOL_MARKER)\n markSym.SetSize (4)\n markSym.SetColor(Color.GetGreen)\n gp = GraphicShape.Make(pt)\n gp.SetSymbol(markSym)\n gp.SetSelected(TRUE)\n viwActive.GetGraphics.Add(gp)\n av.GetProject.SetModified(true)\n elText = Grap hicText.Make (el.AsString, pt)\n aDisplay = viwActive.GetDisplay\n textSym = av.GetSymbolWin.ReturnCurrentSymbol(#SYMBOL_TEXT)\n textSym.SetSize (10)\n elText.setSymbol(textSym)\n elText.Invalidate\n elText.SetDisplay(aDisplay)\n viwActive.GetGraphics.Add(elText)\n viwActive.GetGraphics.UnselectAll\nend \n\n" ) (Script.51 Name: "Basin.InitiateButton" SourceCode: "' Script Name: Basin.InitiateButton\n' Script short Name: B_Init.txt\n' Author: The team of Engineering Decision Support Section (GIS), DWAF,\n' Pretoria, SA. \n' Date: July-1998\n' Revised by: Ivan Petras\n' E-mail: IPetras@dwaf.gov.za\n' Revision Date: Feb 04 2000\n' Revisions: Correcting errors and MsgBoxes' outputs. Adding a code to set up\n' \"Basin.DisableStartUp\" script in the StartUp Project Properties. The\n' Basin.DisableStartUp script disables BasinDelineate and RainDropPath icons\n' on a Toolbar. They are enabled after running the Basin.InitiateButton script.\n\n' -------------------------------------------------------------------\n' Description: Sets up Global Variables for Elevation, Flow Direction and Flow\n' Accumulation Grids. Allows the user to add the Elevation Grid from a file, if\n' one is not available in View's TOC. Allows the user to select Flow Direction\n' and Flow Accumulation Grids required to run BasinDelineate and RainDropPath\n' tools. The grid selection options are: from the View, import from a file\n' and create from a Grid. \n' Requires: Spatial Analyst. Active View. Only one active theme is allowed in\n' the View before running this script, and it must be the Elevation Grid!\n' Runs: Basin.DisableStartup script\n' Run by: Button on Button Bar.\n' Help String: Initiate//Sets Basin1 extension properties and enables its icons.\n' Elevation Grid must be active in View's TOC!\n' Self: \n' Returns: Enables BasinDelineate and RainDropPath icons on a Toolbar.\n' -------------------------------------------------- -----------------\n\n'Creates the list from Grid Themes in the View's TOC\n'---------------------------------------------------\ntheView = av.GetActiveDoc\ntheThemes = theView.GetThemes\nGrThemes = {}\nfor each th in theThemes\n if (th.GetClass.GetClassName = \"GTheme\") then\n GrThemes.Add(th) \n end\nend\ncnt = 0\n\n'Sets up the Elevation Grid\n'--------------------------\nfor each t in theView.GetActiveThemes\n if (t.Is(GTheme)) then \n cnt = cnt + 1\n theGT = t\n end\nend\nif (cnt = 1) then\n _theGrid = theGT.GetG rid\nelseif (cnt > 1) then\n MsgBox.Error(\"It may be only one and it must be the ELEVATION GRID theme\"++\n \"active in the View\", \"\")\n return nil\nelseif (cnt = 0) then\n srcGrd = SourceDialog.ShowClass(\"No ELEVATION Grid Theme active in the View.\"\n ++\"Add it from a file?\",Grid)\n if (srcGrd.Count = 0) then\n return nil\n elseif (srcGrd.Count > 1) then\n MsgBox.Error(\"Select only one GRID Theme, please.\"+NL+\n \"Shall we try again from the beginning?\",\"\")\n return nil\n else\n _theGrid = Grid.Make ( srcGrd.Get(0))\n if (MsgBox.LongYesNo (\"Shall we add the ELEVATION Grid into the View?\",\n \"Load a GRID\", false)) then\n th = Theme.Make (_theGrid.GetSrcName)\n theView.addTheme(th)\n th.SetActive(True)\n else\n MsgBox.Warning (\"Make your mind, please. Select the ELEVATION Grid\"++\n \"from the View or try again to add it from a file.\",\"Oops\")\n return nil\n end\n end\nend\n\n'Sets up the Flow Direction Grid\n'-------------------------------\nlist1 = {\"Select from the View\", \"Add from a file\", \"Create from the Elevation Grid\"}\ncreate1 = MsgBox.ChoiceAsString (list1, \"Make a choice:\", \"Flow Direction Grid\")\nif (create1 = \"Select from the View\") then\n theGT1 = msgBox.ListAsString(grThemes, \"Select a GRID\", \"Flow Direction Grid\")\n if ( theGT1 <> nil) then\n _DirGrid = theGT1.GetGrid\n else\n return nil\n end\nelseif (create1 = \"Add from a file\") then 'FILE\n src1Grd = SourceDialog.ShowClass(\"Add Flow Direction Grid from a file\", Grid)\n if (src1Grd.Count = 0) then '2\n return ni l\n elseif (src1Grd.Count > 1) then\n MsgBox.Error(\"Select only one GRID Theme, please\"+NL+\n \"Shall we try again from the beginning?\",\"\")\n Return nil \n else\n _DirGrid = Grid.Make (src1Grd.Get(0))\n if (MsgBox.LongYesNo (\"Shall we add the Flow Direction Grid into View?\",\n \"Load a GRID\", false)) then\n th = theme.make(_DirGrid.GetSrcName)\n theView.addTheme(th)\n else\n MsgBox.Warning(\"The Flow Direction Grid is required for further analysis.\"++\n \"Shall we try again from the beginning?\",\"Oops\") 'new line\n Return nil 'new \n end\n end\nelseif (create1 = \"Create from the Elevation Grid\") then 'ELEV GRID\n _DirGrid = _theGrid.FlowDirection(false)\n if (MsgBox.LongYesNo (\"Shall we add the Flow Direction Grid into View?\",\n \"Load a GRID\", false)) then\n th = theme.make(_DirGrid.GetSrcName)\n theView.addTheme(th)\n else\n MsgBox.Warning(\"The Flow Direction Grid is required for further analysis.\"++\n \"Shall we try again from the beginning?\",\"Oops\") 'new line \n Return nil\n end\nelse\n return nil\nend\n\n'Sets up the Flow Accumulation Grid\n'----------------------------------\nlist2 = {\"Select from the View\", \"Add from a file\", \"Create from the Flow Direction Grid\"}\ncreate2 = MsgBox.ChoiceAsString (list2, \"Make a choice\", \"Flow Accumulation Grid\")\nif (create2 = \"Select from the View\") then\n theGT2 = MsgBox.ListAsString(grThemes, \"Select a GRID\", \"Flow Accumulation Grid\")\n if ( theGT2 <> nil) then\n _accGrid = theGT2.GetGrid\n else\n return nil\n end\nelseif (cre ate2 = \"Add from a file\") then\n src2Grd = SourceDialog.ShowClass(\"Add Flow Accumulation Grid from a file\", Grid)\n if (src2Grd.Count = 0) then\n return nil\n elseif (src2Grd.Count > 1) then\n MsgBox.Error(\"Select only one GRID Theme, please\"+NL+\n \"Shall we try again from the beginning?\",\"\")\n return nil\n else\n _accGrid = Grid.Make (src2Grd.Get(0))\n if (MsgBox.LongYesNo (\"Shall we add the Flow Accumulation Grid into the View?\",\n \"Load a GRID\", false)) then\n th = theme.make(_accGrid.GetSrcN ame)\n theView.addTheme(th)\n else\n MsgBox.Warning(\"The Flow Accumulation Grid is required for further analysis.\"++\n \"Shall we try again from the beginning?\",\"Oops\") 'new line \n Return nil\n end\nend\nelseif (create2 = \"Create from the Flow Direction Grid\") then\n _accGrid = _DirGrid.FlowAccumulation(Nil)\n if (MsgBox.LongYesNo (\"Shall we add the Flow Accumulation Grid into the View?\",\n \"Load a GRID\", false)) then\n th = theme.make(_accGrid.GetSrcName)\n theView.addTheme(th)\n else\n MsgBox .Warning(\"The Flow Accumulation Grid is required for further analysis.\"++\n \"Shall we try again from the beginning?\",\"Oops\") 'new line \n Return nil\n end\nelse\n return nil\nend\n\n'Enables related icons on a Tool Bar after running this script from a Button Bar\n'-------------------------------------------------------------------------------\nbasGUI = av.FindGUI(\"View\")\nbasTool = basGUI.GetToolBar.GetControls\nbasButt = basGUI.GetButtonBar.GetControls\naTag = \"Bas1\"\nfor each t in basTool\n if (t.GetTag.Contai ns(aTag)) then \n t.SetEnabled(true)\n end\nend\nfor each t in basButt\n if (t.GetTag.Contains(aTag)) then \n t.SetEnabled(true)\n end\nend\n\nfor each t in basTool\n if (t.Is(ToolMenu)) then\n basToolMenu = t\n for each i in basToolMenu\n if (i.GetTag.Contains(aTag)) then \n i.SetEnabled(true)\n end \n end\n end\nend\n\n'Sets up a script in the StartUp Project Properties. The script disables \"BasinDelineate\"\n'and \"RainDropPath\" icons on a Tool Bar when project is loaded i. e. before initiating\n'analysis by running this Basin.InitiateButton script from a Button Bar.\n'------------------------------------------------------------------------------------\nprojectGet = av.GetProject\nscrName = av.FindScript(\"Basin.DisableStartup\").GetName\nprojectGet.SetStartUp(scrName.AsString)\n\n\n\n" ) (Script.52 Name: "Basin.StreamNetwork" SourceCode: "' Script Name: Basin.StreamNetwork\n' Script short Name: B_strnet.txt\n' Author: ESRI\n' Revised by: Ivan Petras\n' E-mail: IPetras@dwaf.gov.za\n' Revision Date: Mar 15 2000\n' Revisions: Script Basin.StreamNetwork is a result of a modification\n' and enhancement of Hydro.StreamNetwork script supplied with the ESRI\n' Hydrologic Modeling v1.1 extension. The Basin.StreamNetwork\n' script includes new features as follows:\n' - generates a stream network for the entire grid extent\n' - allows a user to specify a file nam e and directory to save the\n' generated streams\n' - allows a user to choose between the Strahler and Shreve stream\n' ordering method\n' - the theme attribute table is altered to display stream order and\n' stream length values.\n\n' -------------------------------------------------------------------\n' Description: Creates a vector stream network from a Flow Accumulation\n' grid based on a user specified threshold. Allows the user to specify\n' file name and directory to save a shape file of generated stream s.\n' Allows the user to choose between the Strahler and Shreve stream\n' ordering methods. The theme attribute table displays stream order\n' and stream length values.\n' Requires: Spatial Analyst. Active View. Setting the Flow Accumulation\n' and Flow Direction Grid themes by running the \"Basin.InitiateButton\"\n' script attached to the \"Initiate\" icon on a Button Bar.\n' Runs: \n' Run by: \n' Help String: StreamNetwork//Generates a stream network from a Flow\n' Accumulation Grid (Please, execute the \"INITIATE\" butt on to enable this icon).\n' Self: \n' Returns: Creates a vector stream network from a flow accumulation grid\n' based on a user specified threshold. The attribute table displays stream\n' order and stream length values.\n' -------------------------------------------------------------------\n' User inputs: Minimum number of cells\n' Stream ordering method\n' File name and directory to save the generated stream network\n'---------------------------------------------------------------------\nav .PurgeObjects\n\n' Activates flow accumulation and flow direction grids\ntheView = av.GetActiveDoc\ntheProj = theView.GetProjection\nflowAcc = _accGrid\nflowDir = _dirGrid\n\n' Gets minimum drainage area upstream required to define a stream network\nstatus = TRUE\nwhile (status)\n minSize = MsgBox.Input(\"Specify the cell flow accumulation threshold\"++\n \"to create a Stream Network:\", \"Stream Network\", \"250\")\n if (minSize = NIL) then\n return NIL\n end\n if (minSize.IsNumber and (minSize.AsNumber > 0)) then\n sta tus = FALSE\n else\n status = TRUE\n MsgBox.Error(\"The cell flow accumulation threshold must be a number\"++\n \"greater than zero\",\"Stream Network\")\n end\nend \n\n' Creates grid of streams for a specified cell flow accumulation treshold\nstrChannels = (flowAcc < minSize.AsNumber.AsGrid).SetNull(1.AsGrid)\n\n' Checks if output is OK\nif (strChannels.HasError) then\n MsgBox.Error(\"Input grid error\")\n return NIL\nend\n\n' Creates a stream order and chechs for a correct output\nstrOrdering = MsgBox.LongYesNo(\"(Yes) \"++\"\"++\"STRAHLER\"+NL+\n\"Stream order only increases when streams of the same order intersect.\"\n+NL+NL+\"(No)\"++\"\"++\"\"++\"\"++\"SHREVE\"+NL+\n\"All links with no tributaries are assigned a magnitude (order)\"++\n\"of 1. Magnitudes are additive downstream. When two links intersect,\"++\n\"their magnitudes are added and assigned to the dowstream link.\",\n\"Choose the Stream Ordering method:\", true)\nif (strOrdering.Not) then\n strOrder = strChannels.StreamOrder(FlowDir, True)\n if (strOrder.HasError) then\n MsgBox.Error(\"Inp ut grid error\")\n return NIL\n end\nelse\n strOrder = strChannels.StreamOrder(FlowDir, False)\n if (strOrder.HasError) then\n MsgBox.Error(\"Input grid error\")\n return NIL\n end\nend\n\n' renames a data set\nrivFile = fileDialog.Put(\"Rivers.shp\".AsFileName,\"*.shp\",\n\"Stream Network - SAVE AS\")\nif (rivFile = NIL) then\n return nil\nend\n\n' Converts the linear raster network in a strOrder Grid to a polyline FTab\n'named rivFile\nrivFTab = strOrder.StreamToPolylineFTab(rivFile,flowDir,TRUE,theProj)\nif (rivFTab = N IL) then\n MsgBox.Report(\"A File Window in the previous step allowed you to\"++\n \"modify the default file name ''Rivers.shp''. Change only ''Rivers'',\"++\n \"leave ''.shp''. Try again.\"+NL+NL+\n \"TIP: Make sure that a file name adheres to 8.3 (8.shp) format. No\"++\n \"gaps in the file name either. It helps to eliminate problems during\"++\n \"some operations you may perform in the future.\", \"ERROR\")\n return nil\nend\n\nrivFTab.SetEditable(TRUE)\n\n' Renames the field \"Grid_code\" in FTab to the field \"Order\"\ngri dCodeField = rivFTab.FindField(\"Grid_code\")\ngridCodeField.SetName(\"Order\")\ngridCodeField.SetAlias(\"Order\")\n\n' Makes and adds fields in FTab\nlenghField = Field.Make(\"Length_km\", #FIELD_DOUBLE,10,3)\nrivFTab.AddFields ({lenghField})\n \n' Calculates the length of a stream\ntheShape = rivFTab.FindField(\"shape\")\nav.ShowMsg(\"Calculating stream length...\")\nav.ShowStopButton\nfor each rec in rivFTab\nprogress = (rec/rivFTab.GetNumRecords*100)\nshpValue = rivFTab.ReturnValue(theShape,rec)\n lnValue = shpValue.ReturnLengt h\n lnValueKm = lnValue/1000\n rivFTab.SetValue(lenghField,rec,lnValueKm)\n doMore = av.SetStatus(progress)\n if (not doMore) then\n break\n end\nend \nrivFTab.SetEditable(FALSE)\n\nav.ClearMsg\nav.ClearStatus\n \n' Adds the theme to a view\nrivTheme = FTheme.Make(rivFTab)\nfor each t in theView.GetThemes\n t.SetActive(false)\nend\ntName = rivTheme.GetName.BasicTrim(\"\", \"\")\nrivTheme.SetName(tName)\ntheView.AddTheme(rivTheme)\nrivTheme.SetActive(TRUE)\nrivTheme.SetVisible(TRUE) 'new\nav.GetProject.SetModified(true) 'ne w\ntheView.GetDisplay.Flush 'new\n\n' Sets FTab properties\nrivFTab.FindField(\"Shape\").SetVisible(false)\nrivFTab.FindField(\"From_node\").SetVisible(false)\nrivFTab.FindField(\"To_node\").SetVisible(false)\n\n\n\n\n\n" ) (Script.53 Name: "Basin.DelineateTool" SourceCode: "' Script Name: Basin.DelineateTool\n' Script short Name: B_delin.txt\n' Author: The team of Engineering Decision Support Section (GIS), DWAF,\n' Pretoria, SA\n' Date: July 1998\n' Revised by: Ivan Petras\n' E-mail: IPetras@dwaf.gov.za\n' Revision Date: Feb 07 2000\n\n' Revisions: Basin.DelineateTool script is a result of a major overhaul\n' and enhancement of WSdelineate script used with Watershed extension.\n' The script is adjusted for the use with the Basin1.avx.\n' The problems discovered during the intensive testi ng\n' of WSdelineate script have been fixed in this version of\n' Basin.DelineateTool. Problems inluded the following:\n\n' - Problem: The mask was not set for delineated basin extent when\n' extracting elevation statistics from the grid. \n' - Effect: The script returned a list of statistics from\n' the entire grid instead of from delineated basin extent. \n' - Solution: The code was added to set a mask for a delineated basin\n' extent.\n\n' - Problem: Due to inaccuracies of DEM, the delineated basin may consis t\n' from more than one polygon. The irrelevant polygons (usually only a\n' few cell size extent) were cleared not to be displayed in the theme\n' Attribute Table. There were inconsistencies in the script as to the\n' querying Shape field, sorting records in FTab, clearing records of\n' irrelevant polygons and in script's line coding sequence.\n' - Effect: Attribute Table showed only one record. It had a correct\n' Area (A) and Perimeter (P) calculated for a main polygon. However\n' A and P of an irr elevant polygon (cleared i.e. not shown in the Table)\n' were used for the calculation of some Basin characteristics. Thus\n' Equivalent Length and Relative Longest Watercourse Length values\n' were incorrect.\n' - Solution: The script was rewritten and a code added to return correct\n' values.\n\n' - Problem: Formula for calculation of the Equivalent Length is:\n' eqLen = (P+((P^2-(16*A))^0.5)/4. Avenue operator precedence is used\n' to show the formula. Here variable check = P^2-(16*A).\n' The followi ng condition was set in the WSdelineate script:\n' If (check<0) then check=0. In practice, check=0 applies to\n' square and check<0 to circle shapes.\n' - Effect: For oval shaped catchments which complied with <0 condition,\n' eqLen value was calculated as P/4 which was incorrect. The error\n' was multiplied in cases where irrelevant polygons were cleaned but\n' taken for eqLen calculation.\n' - Solution: Code was altered to: if check<0 then eqLen=nil,\n' i.e the Attribute Table returns the correspondin g cell empty.\n\n' - Problem: Formula used for the calculation of the Relative Longest\n' Watercourse Length is: relLen=L/A^0.5.\n' - Effect: Because of A involved, the formula returned the wrong value\n' in cases where a delineated catchment had irrelevant polygons. \n' - Solution: The script was modified and a code added to return correct\n' values.\n\n' - Problem: The Attribute Table was named \"Characteristics of..\" and\n' some field names were made from more than ten characters and contained\n' round bra ckets to enclose units.\n' - Effect: Field names were shown as aliases in the Attribute Table\n' after basin was delineated and Table displayed. However when theme\n' was deleted from the View and then added back again, the Attribute\n' Table setup changed to AV default, i.e. table name changed from\n' \"Characteristics of ..\" to \"Attributes of ..\". Field name length\n' was truncated to ten characters and a round bracket were replaced\n' by underscore.\n' - Solution: The script was altered to accommodate the ArcView default.\n\n' - Problem: Preconditions for running WSdelinate script were not set properly.\n' - Effect: WSdelineate icon at Tool Bar had been enabled before the conditions\n' for running the extension were met. In such a case using the icon returned\n' the error message.\n' - Solution: The Basin.DisableStartup\" script was written and added\n' the Basin.avx It disables the \"BasinDelineate\" and other Basin.avx\n' related icons on a Tool Bar when the project opens.\n\n' ---------------------------- ---------------------------------------\n' Description: Is adapted to run with the Basin1 extension.\n' Delineates a drainage basin for a point defined by a user\n' and calculates basin characteristics.\n' Requires: Spatial Analyst. Active View. Initiation of the Flow\n' Direction and Flow Accumulation Grid themes by running the\n' \"Basin.InitiateButton\" script attached to \"Initiate\" icon on Button Bar.\n' Run by: Button on Tool Bar\n' Help String: BasinDelineate//Delineates a drainage basin for the point\n' defined by a user and calculates basin's characteristics. (Please, execute\n' the \"INITIATE\" button to enable this icon).\n' Returns: Delineated drainage basin and its attribute table containing\n' catchment characteristics generated from DEM.\n' -------------------------------------------------------------------\n\n' Creates temporary grid (4x4 cell size) of user defined point extent,\n' delineates basin, allows user to define its name and adds the theme to\n' View as shape file.\n' --------------------------------------- ----------------------------\nav.PurgeObjects\ntheView = av.GetActiveDoc\ntheProj = theView.GetProjection\ntheCell0 = _theGrid.GetCellSize\npt = theView.GetDisplay.ReturnUserPoint\nptList = pt.AsString.AsList\nx = ptList.Get(1).AsNumber \ny = ptList.Get(2).AsNumber\nx1 = x - (theCell0 * 2)\ny1 = y - (theCell0 * 2)\nx2 = x + (theCell0 * 2)\ny2 = y + (theCell0* 2)\ntheRect = Rect.MakeXY(x1, y1, x2, y2)\ntheExt = grid.SetAnalysisExtent(#GRID_ENVTYPE_VALUE,theRect)\ntheCell = grid.SetAnalysisCellSize(#GRID_ENVTYPE_VALUE,theCe ll0)\ntempGrid = grid.MakeFromNumb(1)\nsnapGrid = tempGrid.SnapPourPoint(_accGrid, 30)\next = msgBox.YesNo(\"Shall we analyse:\"+NL+\"(Yes)\"++\"\"++\"Visible extent - faster!\"\n+NL+\"(No)\"++\"\"++\"\"++\"\"++\"Entire Grid\" ,\"Analysis Extent\", true)\nif (ext.Not) then\n theRect = _theGrid.GetExtent\nelse\n theRect = theView.GetDisplay.ReturnVisExtent\nend\ntheExt = grid.SetAnalysisExtent(#GRID_ENVTYPE_VALUE,theRect)\nwShed = _DirGrid.Watershed(snapGrid)\n\npolyFile = fileDialog.Put(\"Basin.shp\".AsFileName,\"*.shp\",\n\"Drainage Basin - S AVE AS\")\nif (polyFile = NIL) then\n return nil\nend\npolyFTab = wShed.AsPolygonFTab(polyFile,true,theProj)\nif (polyFTab = NIL) then\n MsgBox.Report(\"A File Window in the previous step allowed you to modify\"++\n \"the default file name ''Basin.shp''. Change only ''Basin'', leave\"++\n \"''.shp''. Try again.\"+NL+NL+\n \"TIP: Make sure that a file name adheres to 8.3 (8.shp) format. No gaps in\"++\n \"the file name either. It helps to eliminate problems during some\"++\n \"operations you may perform in the future.\", \"ERROR\")\n return nil\nend\nshedTheme = FTheme.Make(polyFTab)\nfor each t in theView.GetThemes\n t.SetActive(false)\nend\ntName = shedTheme.GetName.BasicTrim(\"\", \"\")\nshedTheme.SetName(tName)\n\ntheView.AddTheme(shedTheme)\nshedTheme.SetActive(TRUE)\naSymbol = RasterFill.Make\ntheLegend = shedTheme.GetLegend\ntheSym = theLegend.GetSymbols.Get(0)\ntheSym.SetStyle(#RASTERFILL_STYLE_OPAQUESTIPPLE)\naCol = color.GetRed\naCol.SetTransparent(true)\ntheSym.SetBgColor(aCol)\ntheSym.SetColor(color.GetGreen)\nfillList = {10,11,12,13, 14,15,20,21,22,23}\naNum = fillList.Get(number.MakeRandom(0,9))\naFill = av.GetSymbolWin.GetPalette.GetList(#PALETTE_LIST_FILL).Get(aNum).GetStipple\ntheSym.SetStipple(aFill)\ntheList = {Color.GetBlack,Color.GetCyan,Color.GetGreen,Color.GetMagenta}\ntheColor = theList.Get(number.MakeRandom(0,3))\ntheSym.SetOLColor(theColor)\ntheSym.SetOLWidth(1.5)\nshedTheme.UpdateLegend\nshedTheme.SetVisible(TRUE)\nav.GetProject.SetModified(true)\ntheView.GetDisplay.Flush\ncalc = MsgBox.YesNo(\"Shall we derive Basin Characteristics\"+NL +\"from the Grid?\",\n\"Drainage Basin Characteristics\", true)\nif (calc.Not) then\n exit\nend \n\n'Gets statistics from the grid of the delineated basin extent\n'------------------------------------------------------------------- \ngrid.SetAnalysisMask(wShed)\ntheShed = _theGrid\n\n'elevation\ntheElev = theShed.ExtractByMask(wShed)\ntheElList = theElev.GetStatistics\nminEl = theElList.Get(0)\nmaxEl = theElList.Get(1)\nmeanEl = theElList.Get(2)\nstDevEl = theElList.Get(3)\n\n'slope\ntheSlope = theShed.Slope (1, TRUE) 'output sl ope as percent\ntheSlopeList = theSlope.GetStatistics\nminSlope = theSlopeList.Get(0)\nmaxSlope = theSlopeList.Get(1)\nmeanSlope = theSlopeList.Get(2)\n\n'longest watercourse\ntheLength = _DirGrid.FlowLength (NIL, TRUE)\ntheLengthList = theLength.GetStatistics\nmaxLength = theLengthList.Get(1)/1000 'conversion from m to km\n\n'Makes fields in FTab\n'-------------------------------------------------------------------------\n\npolyFTab.SetEditable(TRUE)\ntheAreaField = Field.Make(\"Area_km2\",#FIELD_DOUBLE,12,2)\nthePerimeterF ield = Field.Make(\"Perimet_km\",#FIELD_DOUBLE,10,3)\ntheMinSlopeField = Field.Make(\"Sl_min_prc\",#FIELD_DOUBLE,7,3)\ntheMaxSlopeField = Field.Make(\"Sl_max_prc\",#FIELD_DOUBLE,7,3)\ntheMeanSlopeField = Field.Make(\"Sl_ave_prc\",#FIELD_DOUBLE,7,3)\ntheMinElField = Field.Make(\"El_min_m\",#FIELD_DOUBLE,7,2)\ntheMaxElField = Field.Make(\"El_max_m\",#FIELD_DOUBLE,7,2)\ntheMeanElField = Field.Make(\"El_ave_m\",#FIELD_DOUBLE,7,2)\ntheStDevElField = Field.Make(\"El_stdev\",#FIELD_DOUBLE,8,3)\ntheMaxLengthField = Field.Make(\"L_max_km\",# FIELD_DOUBLE,8,3)\ntheEqLenField = Field.Make(\"L_eqv_km\",#FIELD_DOUBLE,8,3)\ntheRelLenField = Field.Make(\"L_relat\",#FIELD_DOUBLE,7,3)\npolyFTab.AddFields({theAreaField,thePerimeterField,theMinSlopeField,\n theMaxSlopeField,theMeanSlopeField,theMinElField,\n theMaxElField,theMeanElField,theStDevElField,\n theMaxLengthField,theEqLenField,theRelLenField})\n\n'Returns the value of shape field of the first record to the \"preliminaryShape\"\n'variable. Queries the shape of each record and writes the resulting shape to\n' preliminaryShape. If there are more than one record in FTab (due to errors in\n'DEM), the last one becomes an object of preliminaryShape variable and it is\n'usually not the main polygon but the irrelevant one. Then preliminaryArea\n'calculated using preliminaryShape is not representative one, neither is\n'an attribute as L_eqv, because it uses preliminaryArea in calculation.\n'No attribute derived from preliminaryShape is then correct. The preliminaryArea\n'is recalculated, and other attributes are derived from theShape variable\n'containing the largest polygon (based on the theArea) later, after\n'the irrelevant polygons are cleaned. \n'-----------------------------------------------------------------------------\n\npreliminaryShape = polyFTab.ReturnValue(polyFTab.FindField(\"shape\"),0)\n\nFor Each rec in polyFTab\n polyFTab.QueryShape(rec,theProj, preliminaryShape)\n preliminaryA = preliminaryShape.ReturnArea\n preliminaryArea = preliminaryA/1000000\n polyFTab.SetValue(theAreaField, rec, preliminaryArea)\nend\npolyFTab.Se tEditable(false)\n\n'Clears irrelevant polygons\n'-----------------------------------------------------------------------\ntheBit = polyFtab.GetSelection\ntheBit.SetAll\npolyFtab.UpdateSelection\ncount = theBit.Count\nif (count > 1) then\n shedTheme.ClearSelection\n maxE = 0\n f = polyFtab.FindField(\"Area_km2\")\n rm = 0\n for each i in 0 .. (count - 1)\n v = polyFtab.ReturnValue(f, i)\n if (v > maxE) then\n maxE = v\n rm = i\n end \n end\n theBit.Set(rm)\n polyFtab.UpdateSelection\n polyFtab.GetSelec tion.Not\n polyFtab.UpdateSelection\n theView.SetEditableTheme(shedTheme)\n shedTheme.ClearSelected\n theView.SetEditableTheme(Nil)\nelse\n rec = 0\n theBit.Set(rec) \n polyFtab.UpdateSelection\nend\n\n'Returns the value of shape field of the first record to the \"theShape\"\n'variable. The first (index=0) and only record visible in FTab after\n'clearing irrelevant polygons corresponds to a largest polygon delineated.\n'Queries the shape of this record and writes the resulting shape to\n'theShape. Then attributes as theArea can be calculated using theShape,\n'as well as characteristics using attributes derived from theShape (i.e.\n'L_eqv). Sets these ones and statistics attributes to the FTab.\n'-------------------------------------------------------------------------\n\n'Area\npolyFTab.SetEditable(TRUE)\ntheShape = polyFTab.ReturnValue(polyFTab.FindField(\"shape\"),0)\npolyFTab.QueryShape(0,theProj,theShape)\nA = theShape.ReturnArea\ntheArea = A/1000000\n\n'Perimeter\nP = theShape.ReturnLength\nthePerimeter = P/1000\n\n'Equivalent catc hment length\ncheck = thePerimeter^2 - (16*theArea)\n if (check < 0) then\n check = 0\n eqLen = nil\n else\n eqLen = (thePerimeter+check.Sqrt)/4\n end\n\n'Relative longest watercourse length\nrelLen = maxLength / theArea.Sqrt\n\n'Sets values to FTab\n'--------------------\npolyFTab.SetValue(theAreaField,0,theArea)\npolyFTab.SetValue(thePerimeterField,0,thePerimeter)\npolyFTab.SetValue(theMinElField,0,minEl)\npolyFTab.SetValue(theMaxElField,0,maxEl)\npolyFTab.SetValue(theMeanElField,0,meanEl)\npolyFTab.SetValue(the StDevElField,0,stDevEl)\npolyFTab.SetValue(theMinSlopeField,0,minSlope)\npolyFTab.SetValue(theMaxSlopeField,0,maxSlope)\npolyFTab.SetValue(theMeanSlopeField,0,meanSlope)\npolyFTab.SetValue(theMaxLengthField,0,maxLength)\npolyFTab.SetValue(theEqLenField,0,eqLen)\npolyFTab.SetValue(theRelLenField,0,relLen)\npolyFTab.SetEditable(false)\n\n'Sets FTab properties\n'------------------------------------------------------------------\npolyFtab.FindField(\"Shape\").SetVisible(false)\npolyFtab.FindField(\"Id\").SetVisible(false)\npoly Ftab.FindField(\"Gridcode\").SetVisible(false)\nshedTheme.EditTable\ntheT = av.GetActiveDoc\nshedTheme.ClearSelection\ntheT.Sort(theAreaField, True)\n\nTWin = theT.GetWin\nTWin.Activate\ntheView.GetWin.Activate\n\n\n\n\n" ) (Script.54 Name: "Basin.RaindropPathTool" SourceCode: "' Script Name: Basin.RaindropPathTool \n' Script short Name: B_drop.txt\n' Author: ESRI\n' Revised by: Ivan Petras\n' E-mail: IPetras@dwaf.gov.za\n' Revision Date: Feb 04 2000\n' Revisions: Script Basin.RaindropPathTool is the modification of\n' Hydro.RaindropTool script, supplied with the ESRI Hydrologic Modeling\n' (sample) extension, for the use with the Basin extension. The path is\n' returned in blue colour.\n' -------------------------------------------------------------------\n' Description: Traces the path of a raindrop from a point defined by\n' a user to an outlet. Returns a blue graphic line.\n' Requires: Spatial Analyst. Active View and initiation of Grid Themes by\n' running the \"Basin.InitiateButton\" script attached to \"Initiate\" icon\n' on Button Bar.Works off an active Elevation Grid Theme with sinks filled.\n' Runs: \n' Run by: Button on Tool bar.\n' Help String: RainDropPath//Traces the flow path of a rain drop (Please,\n' execute the \"INITIATE\" button to enable this icon).\n' Self: \n' Returns: The path of a ra in drop from the point defined by a user.\n' ---------------------------------------------------\nav.PurgeObjects\nv = av.GetActiveDoc\nd = v.GetDisplay\np = d.ReturnUserpoint\nelev =_theGrid\nl = elev.ReturnCostPath(_dirGrid, p)\nv.GetGraphics.UnselectAll\n'g = v.GetGraphics\ngl = GraphicShape.Make(l)\ngl.SetSelected(TRUE)\npenSym = av.GetSymbolWin.ReturnCurrentSymbol(#SYMBOL_PEN)\npenSym.SetSize(1.5)\npenSym.SetColor(Color.GetBlue)\ngl.SetSymbol(penSym)\nv.GetGraphics.Add(gl)\nv.GetGraphics.UnselectAll\n\n\n\n" ) (Script.55 Name: "my extension install" SourceCode: "'Name: my extension install.ave\n'DO NOT EDIT!!!\n\nif (av.getproject=nil) then return(nil) end\n\n\ntheDocs = SELF.get(0)\ntheControlList = SELF.get(1)\ntheMenuList = SELF.get(2)\ntheToolMenuList=SELF.Get(3)\ntheProject=Av.getproject\n\n\n'Add the Docs\n'\nfor each adoc in theDocs\n theProject.addDoc(adoc)\nend\n\n'Add the Controls\n'\nfor each totalControl in theControlList\n 'The Control list\n acontrol=totalControl.get(0)\n \n 'The physical control\n theControl = totalControl.get(1)\n \n 'The control Index\n theCind ex=totalControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This finds the control set \n thecommand=\"av.getproject.findGUI(\"\"\"+aControl.get(0)+\"\"\").Get\"+acontrol.get(1)\n thescript1=Script.Make(thecommand)\n thecontrolset=thescript1.doit(\"\")\n \n 'Add the control to the control set\n theCon trolSet.Add(theControl,theCindex)\nend\n\n\n'Add the menus\nfor each totalcontrol in theMenuList\n \n 'The Control list\n acontrol=totalControl.get(0)\n mDoc=acontrol.get(0)\n mMenu=acontrol.get(1)\n mMenuItem=acontrol.get(2)\n\n 'The physical control\n theControl = totalControl.get(1)\n \n 'The control Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.g et(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n theMbar=av.getproject.findGUI(mDoc).GetMenuBar\n themenu=theMbar.findbylabel(mMenu)\n if (themenu=NiL) then\n themenu=menu.make\n themenu.setlabel(mMenu)\n theMbar.add(themenu,999)\n end\n \n themenu.add(thecontrol, theCindex)\nend\n \n \n'Add the Tool Menus\n\nfor each totalControl in theToolMenuList\n 'The Control list\n acontrol=totalControl.get(0)\n \n 'The physical control\n theControl = tot alControl.get(1)\n \n 'The control Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This finds the control set \n thecommand=\"av.getproject.findGUI(\"\"\"+aControl.get(0)+\"\"\").Get\"+acontrol.get(1)\n thescript1=Script.Make(thecommand)\n thecontrolset=av.getproject.fi ndGUI(aControl.get(0)).GetToolBar\n \n 'Add the control to the control set\n theControlSet.Add(theControl,theCindex)\nend\n\n\nav.getproject.setmodified(true)\n\n\n'And the scripts add themselves\n\n" ) (Script.56 Name: "my extension uninstall" SourceCode: "'my extension uninstall.ave\n'DO NOT EDIT!!!\n\n'The SELF is the Extension\n\ntheDocs = SELF.get(0)\ntheControlList = SELF.get(1)\ntheMenuList = SELF.get(2)\ntheToolMenuList=SELF.get(3)\ntheProject=Av.getproject\n\n\n'Add the Docs\n'\nfor each adoc in theDocs\n If (theProject.finddoc(adoc.getname)<>NIL) then \n theAnswer=msgbox.yesno(\"Remove the Document \"+adoc.getname+\"?\",\"Remove Document?\",TRUE)\n if (theAnswer=TRUE) then theProject.RemoveDoc(adoc) end\n end\nend\n\n'Removethe Controls\n'\nfor each totalControl in theControlL ist\n 'Get the control list from the Ext\n acontrol=totalControl.get(0)\n \n 'Get the physical Control\n theControl = totalControl.get(1)\n \n 'Get the Controls Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI for the Control\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This sequence finds the appropiat e control set\n thecommand=\"av.getproject.findGUI(\"\"\"+aControl.get(0)+\"\"\").Get\"+acontrol.get(1)\n thescript1=Script.Make(thecommand)\n thecontrolset=thescript1.doit(\"\")\n\n 'See if the control is in the set , if so remove it\n if (theControlSet.GetControls.find(theControl)<>NIL) then\n theControlSet.remove(theControl)\n if (thecontrol = \"ToolBar\") then\n theControlSet.selectdefault\n end\n end\nend\n\n\n'Remove the Menus\n'\nfor each totalcontrol in theMenuList\n \n 'The Control list\n acontrol=totalControl.get(0)\n mDoc=acontrol.get(0)\n mMenu=acontrol.get(1)\n mMenuItem=acontrol.get(2)\n\n 'The physical control\n theControl = totalControl.get(1)\n \n 'The control Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n theMbar=av.getprojec t.findGUI(mDoc).GetMenuBar\n themenu=theMbar.findbylabel(mMenu)\n if (themenu=NiL) then\n MsgBox.Warning(\"The menu named \"+mMenu+\" is not here.\",\"Script Eror\")\n 'return(nil)\n else\n \n thething=themenu.getcontrols.find(thecontrol)\n if (thething<>NIL) then \n themenu.remove(thecontrol) \n end\n 'msgbox.info(themenu.GetControls.count.asstring,\"\")\n if (themenu.GetControls.count<1) then\n theMbar.remove(themenu)\n end\n end\nend\n \nfor each totalControl in theToolMenuList\n 'Ge t the control list from the Ext\n acontrol=totalControl.get(0)\n \n 'Get the physical Control\n theControl = totalControl.get(1)\n \n 'Get the Controls Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI for the Control\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This sequence finds the appropiate control set\n thecontrolset=av.getproject.findGUI(aControl.get(0)).GetToolBar\n\n \n 'See if the control is in the set , if so remove it\n if (theControlSet.GetControls.find(theControl)<>NIL) then\n \n theControlSet.remove(theControl)\n theControlSet.selectdefault\n end\n\nend\n \n\n'And the scripts delete themselves\n\n\nav.getproject.setmodified(true)\n\n" )