RivEX will generate a dBase file listing all upstream sites in one layer against the input layer.  Sites that have no sites upstream of themselves are coded with a -1.  Therefore all sites are returned in the output as either -1 or a list of upstream IDs. 

Sites must be snapped to the network and the ID field must be numeric (Integer); a field of type double or float will not display in the drop down list.

Information If you want to find what is upstream of what within a single layer then simply set the Sites to search and Upstream sites to find as the same layer.

WarningIf both layers are different datasets it is strongly recommended that the numeric ID values of the sites do not overlap. For example sites from the first layer may range from 1 to 10 and sites from the second layer should be something like 100 to110. You want to avoid having sites with ID values of 1 to 10 in both datasets.

If a selection on the input site layer exists RivEX will enable the check box Use only selected sites. If you need to process only a sub set of your sites in the input layer then make sure you check this.  Any selection on the upstream sites layer is ignored.

Find Upstream Sites Dialog

All RivEX generated fields must exist. Click OK and the tool will execute.

RivEX will first check if the sites intersect the polylines of the network. If any are found not to be intersecting it will drop these from the analysis and the ID's written to an error log file. The error log file is written to ..\RivEX_Workspace\ErrorLogs\FailedSites_SiteLayerName.txt.

Output is written to a dBase file and stored in the networks RivEX_Workspace\Output folder. The name given to this file is the name of the point layer with the suffix of "_UpstreamSites".  The field headings have to be 10 characters or less to be a valid dBase field therefore abbreviations are used and are described below. 

Field name



Object ID (ESRI default)


The site ID number from the input layer


The catchment ID the site is within


The ID of an upstream site


The distance from network mouth for the upstream site


The distance from the site to the upstream site

The screen shot below is a typical table generated by the tool. Site 669 has twelve sites upstream of it whilst other input sites have no sites upstream of them, hence the default -1

Upstream sites table

WarningThe USSite_Dis field is not calculated using a "classic" shortest path search it is calculated by subtracting the distance from network mouth of the TO site from the distance to network mouth of the FROM site. In river networks without loops this will always yield an accurate measure. In networks where the sites are separated by network that contain loops it is possible for RivEX to over estimate the distance between sites if the upstream site distances to network mouth was calculated by traversing another route through the multi-threaded section. Such over estimates are generally trivial but if the multi-threaded sections of the network are highly sinuous this may generate an unacceptable error. More information can be found here.