Create left/right bank side buffers
Summary :: Usage :: Parameters :: Outputs :: Warnings :: Limitations :: Code sample
Summary
This tool will take lines representing routes, reaches or back to back segments along the rivers and creates a buffer split into left and right bank side. The ends of the left/right buffer segments can be either squared off to create flat ends or left with the rounded edge.
Such a dataset can be used to visualise left and right bank features such as amount of embankment, riparian complexity, amount of shading or intensity of erosion to name but a few. As these are actual polygons with area defined by your choice in buffer distance and not an off-set cartographic manipulation of the reach lines, they can contribute to spatial analysis, for example intersecting with elevation data and summarising bank side slope or count nesting sites of water vole captured as GPS points. A worked example of using this tool is here which shows you the workflow as well as discussing why and how to deal with reaches that fail to generate split buffers.
Usage
This tool takes a polyline dataset representing routes, reaches or back to back reach/segments that trace along the river network and creates buffers split into left and right bank side. Such input data can be created manually or with tools in RivEX such reach tools, segment routes and link tool.

Continuous reaches (coloured randomly) with flat-ended left (green) and right (red) buffers.
You can set the buffer width to be a constant distance or use a value retrieved from a field that assigns a buffer distance for each reach. Buffer distance must be a positive value greater than zero.
Which side of the river the split buffer is on is determined by the direction the adjacent river centreline. This ensures correct attribution as the reach may have been digitised in a sea-to-source direction rather than a source-to-sea direction.
Tortuous channels with a small buffer distance can create multipart features. The output includes a quality control flag field IsMultiPart which identifies the polygons and is also logged in the error log table. More advice is given in the warning section below.
You have the option to choose flat (default) or rounded buffer ends:
- Flat attempts to create perpendicular lines at the end and use these to cut the rounded edge off creating a flat end. This works well in most cases but reaches with acute angle end-line segments or are curving round in on themselves within the specified buffer distance create illogical scenarios for the cutting process and will fail. These are logged in the error log. More advice is given in the warning section to why these can occur.

Flat-ended split buffers (green = left, red = right)
- Rounded extends the reach line end points to just beyond the buffer distance to cut the buffer into left and right. This maintains the rounded edge. In reach data where the reaches are continuous (e.g. one after another) the ends of the split buffers overlap with each other.

Round-ended split buffers (green = left, red = right)
If you have a set of reaches selected then you can choose to process only those by tick on Process only selected reaches. Any selection on the river network is cleared before processing.
The output of this tool is a Feature Class written to the File GeoDatabase fGDB_Network.gdb which is stored in the Outputs folder in the RivEX Workspace. You can control the name of the Feature Class but not its location. The output name must be a valid file geodatabase name.
Optional tasks
- Add attribute index - Tick this on and RivEX will create an index for the reach ID field in the output Tables, this will improve any query/join performance using this field.
Parameters
|
Name |
Help |
Data type |
|
River Network |
The river network. The network needs to be in units of metres\feet, so not in decimal degrees. For best results the network should be within a File GeoDatabase. |
Feature Layer |
|
Reach Layer |
A polyline layer for which you want to construct left/right buffers. This layer can represent reaches, a route, back to back segments created from a route. This layer must conform to these specifications:
|
Feature Layer |
|
Reach ID field |
This is a numeric (integer) field that uniquely identifying the reach. Text, Object ID or FID fields are not accepted. |
Field |
|
Process only selected reaches |
Indicates if only selected reaches are to be processed.
|
Boolean |
|
Reach buffer generated using |
This parameter allows you to switch between generating buffers using a constant width or use widths encoded into a numeric field within the reach layer. The options are:
|
String |
|
Buffer Distance (m) |
If the reach buffer parameter was set to A Constant value then this parameter allows you to enter a positive number that is the constant buffer distance (m/ft) to be built for each reach. If for example you enter 50m then this will create a polygon that is 100m wide and when split will be 50m wide on the left and 50m wide on the right. |
Double |
|
Buffer distance field |
If the reach buffer parameter was set to A Distance from a field in reach layer then this parameter will allow you to choose a numeric field from your reach layer. Values within your chosen field must be greater than zero and in the units of the river network. |
Field |
|
Buffer end shape |
This parameter allows you to choose how RivEX deals with the ends of the buffers.
|
String |
|
Output feature class name |
The output Feature class name for your split buffer dataset. You do not have control over the location where this dataset is created, RivEX controls that, but you can decide its name. The Feature Class name must be a geodatabase compliant name, so must not have spaces, other unusual characters or start with a number. Output will be stored in fGDB_Network.gdb in the RivEX Workspace Output folder. |
String |
|
Add an attribute index to output |
An optional task indicating if RivEX will create an attribute index for the Reach ID field in the output table.
If you plan to join or relate data then it is STRONGLY recommended you create attribute indices for the output; an index can significantly speed up query operations. |
Boolean |
|
Add Error Log Table to Map |
If this is ticked (default) the error log table will be added to the map for your convenience if any errors were found. |
Boolean |
|
Build a Relate for Error Log |
If this tick box is checked then the error log table must be loaded into the map and RivEX builds a standard relate between the Error Log table and the reach layer. You can use the relate to help you jump to and review the error. |
Boolean |
Outputs
The output table(s) can be given a name but you have no control over where it is stored, this would be in the file geodatabase in the output folder ..\RivEX_Workspace\Outputs\fGDB_Network.gdb.
The output is a polygon Feature Class with the following fields:
|
Field |
Description |
|
ReachID |
The unique ID of the reach that the buffers are built from. This is an integer field of type Long. |
|
BankSide |
A Text field indicating which side of the river centreline the buffer is. This is either (L)eft or (R)ight. |
|
BuffDist |
The buffer distance, this may be constant or variable if the buffer distance is coming from a field in the reach data. |
|
IsMultiPart |
This is a quality control flag to help you do any post-processing editing. Tortuous centrelines with small buffer distances can introduce multiple cuts into the buffer polygon creating multipart features. You may want to resolve these through editing by dissolve adjacent sliver polygons. This field is either (Y)es or (N)o. |
|
BID |
A unique ID given to the buffer. It is a text field (25 characters long) built from the concatenation of the ReachID and BankSide fields. You can use this to join bank side data to the buffers for visualisation and analysis, see a worked example here. |
Errors are written to the tblSplitBuffErrors table stored in ..\RivEX_Workspace\ErrorLogs\fGDB_RivEXErrorLogs.gdb.
Advice on the structure of the error log table and how it can be used is found within this section of the manual. Take note of the warning if you plan to construct a model using the error log output in subsequent processing.
Warnings
With the release of ArcGIS Pro 3.2.1 a switch control appears on parameters that accept tables\feature classes, do not interact with it! More advice here.
Flat-ended buffer fails due to last segment acute angle
A flat-ended buffer can fail to generate if the last line segment of the polyline is at an acute angle. This means the perpendicular cutting line which is slightly large than the buffer width can some times not completely cross the buffer polygon, a requirement of the cutting process. The image below shows this scenario. At one end of the reach (black line) the dashed cutting line completely crosses the buffer, whilst at the other end the perpendicular cutting line fails to cross the polygon boundary at both ends. If this scenario exists RivEX rejects the reach and logs this in the error log table.

What should you do if this happens? Either move the reach to avoid the terminal acute segment end, extend the reach to make the terminal end segment less acute and then re-run this tool or create a buffer and manually cut it up with the editing tools.
Round-ended buffers overlap when reaches are continuous
If your reach data are continuous lines and you have chosen rounded ends this will create an overlap. In the image below reaches are randomly coloured and their rounded split buffers created. A single left sided buffer has been selected to highlight the overlap. It's upstream end is overlapping the upstream left sided buffer whilst the downstream end is being overlapped by the downstream left sided buffer. This may not be an issue for you, especially if displaying the data at catchment scale. Remember each buffer is tagged with the ID of the reach its built from so you can select these buffer in an automated way to aid further spatial analysis.

Tortuous channel planform causing multi-part buffers
Tortuous channels at the end of a reach can succeed in splitting a buffer and creating flat ends but also create a multi-part feature. This scenario is shown below. Both ends of the buffer have been squared off by their respective perpendicular cutting lines, but the bottom left has created a multi-part right split buffer (red). If you select the smaller red area it will in fact select all the red area. The right split buffer (red) will have its field IsMultiPart set to (Y)es. The creation of the multi-part is occurring as the perpendicular cutting line is cutting across the reach line itself as well as the buffer polygon.

What should you do if this happens? Moving or extending the reach to avoid the tortuous end of the reach then re-running the tool will solve this. Remember you can always process only selected reaches to avoid re-running the tool on the full dataset.
Limitations
- Reach layer must be in the same projected coordinate system as the river network.
- Reaches must be single part geometries
- Reach layer cannot be an in-memory dataset or stored in a geopackage
- Reach layer must not have a join, remove joins before using this tool.
Code sample
A minimum code example showing how to call this tool in a python script. This can be run in console or your preferred IDE. If you right click on the tool in the RivEX toolbox and select properties you can view parameter order.
# This script can be run in the python console in ArcPro
import arcpy
# Import RivEX toolbox
arcpy.ImportToolbox(r"C:\RivEX_ArcPro\RivEX.atbx")
try:
# Input River Feature Layer
flRivers = "Rivers"
# Input Reach Feature Layer
flReaches = "myReaches"
# Run RivEX tool to split reaches into left/right 50m buffers with flat ends and add attribute index to output.
# In this reach dataset the unique ID field is called UniqueSegID
res = arcpy.scrSplitBuffers_RivEX(flRivers, flReaches, "UniqueSegID", False, "A constant value", 50, None, "Flat", "fcSplitBuff_50m_flat", True, True, True)
# Get split buffers Feature Class
fcSB = res.getOutput(0)
# Report any multipart polygons which is something that may require attention
with arcpy.da.SearchCursor(fcSB, "ReachID", "IsMultiPart = 'Y'") as cursor:
for row in cursor:
print(f"Reach {row[0]} is multipart! You may want to edit this?")
except arcpy.ExecuteError:
print("FAILED to create split buffers")
