Sample with polygons

Parent Previous Next

RivEX can stratify sampling based upon a user supplied polygon layer.  This tool is ideal for generating a layer of random points across a network grouped by polygon or a sub-set identified by an existing selection on the polygon layer.  Such output could feed into further river analysis or compliment a survey strategy based upon catchment or administrative boundaries.

Stratified sampling using an exist polygon layer

3 sampling points per polygon. The points are labelled with the polygon ID

You have a variety of options that can influence (bias) the selection process and it is important that you understand these. Click here to review these options. Avoid sampling same location and nodes are ticked on as default.

RivEX will attempt to locate a random point but if it fails it will try up to 200 times.  If after the 200th attempt it is still unsuccessful it will bail out. This means polygons could generate less than the specified number of points.

The output is written to the default directory File GeoDatabase.  Each point stored will contain the following information:

Field name



The unique ID given to the sampling point


The polyline ID. This is from the ID field you chose to build network topology with


The X coordinate of the point


The Y coordinate of the point


The percentage along the length of polyline the sampling point is located


This is the unique ID given of the sampling polygon

Select the polygon layer and unique polygon ID field. If you have an existing selection you can use this to sub-set the polygons that will be processed.

You must set the selection relationship; the default is polygon intersects network but you can choose contains. If contains is chosen then the entire polyline must fall within the polygon. You may want to use this selection criteria to avoid polylines that cross the polygon boundary.

You then chose the number of sampling points you want to generate fr each polygon. This value can be a fixed number, a value encoded into the polygon as a numeric field or as a percentage of the network within the polygon.  

If you are sampling a percentage of network then you need to provide a footprint size ( in meters) and percentage cover of network.  The footprint is a linear length that the sampling point represents. The number of points created is based upon the footprint size and the desired percentage of network cover within the polygon.  For example a polygon identifying 89Km of river would generate 9 sampling points if each point had a footprint of 1Km and the user wanted 10% coverage.  This calculation treats each footprint as non-overlapping when determining the number of points required but the output does not displace points when choosing the random XY coordinates.  Therefore large sample sizes will create the required number of points to sample  a network with non-overlapping footprints but can actually sample less network because the placement of the point does not consider existing footprints (unless you choose the exclusion zone option).

Finally set any optional sampling criteria and click OK to generate the points.

Sample with polygon dialog

The Progress window will keep you informed. In the example below 18 polygons are used to sample the network and you can see that 2 of them failed to select any part of the river network.

Polygon Sampling Progress