6) Generating Random points

Walk throughs ››
Parent Previous Next

In this section you will use RivEX to generate some random points by stratifying them with a grid. Generating locations “snapped” to the network will aid any surveying and provide a robust dataset for future analysis. How RivEX generates a point on the network is discussed here.

1.If RivEX is open, close it by clicking on the close button in the bottom right of the dialog.

2.Now reopen RivEX again by clicking on the Yellow button in the tool bar. Complete the layer to process panel and shown below. If RivEX asks to build a spatial index then accept this. Make sure you set the workspace.

Completed layer to process panel

3.Pressing the Build button tells RivEX to compare the modification date of the dataset with what is stored in the settings file, if it is found to be different then it will rebuild the topology cache otherwise it accepts the dataset and enables the tools.

4.In the Tools panel, expand Sample network > Random Sampling and tick on "Grid", then press Run Tool to open the Sample with Grid dialog.

5.Complete the dialog as shown below, you can find more about the options here. Click OK to run the tool.

Sample with grid

6.This tool generates random locations based upon your selection criteria. It is possible to create a scenario that RivEX cannot fulfil, if this occurs it will warn you. You may have received the following warning message after the generation of random points.

Warning message

7.The output is stored in the file geodatabase C:\RivEX\Demo_Data\RivEX_Workspace\Output\fGDB_Sampling.gdb

8.If you had received the warning message about not being able to create the required number of points (5 in this case) you can do a simple attribute query on the grid layer as shown below. Having located the grid cell that is failing we can zoom in and discover why. In this case there is only about 250m of river centreline within the cell and as we have asked to exclude points that are within 100m of each other it has become impossible to sample that section of network within that grid cell.

Selecting grid cells