RiTER Xsec User’s Manual
Release 1.0.0

Public Works Research InstituteOct 16, 2023

CONTENTS

1 Introduction
1.1 Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Intended primary use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 Libraries used in RiTER Xsec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

112
3

2 Hot to operate
2.1 Creation of input data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Creation of grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Mapping grid attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Setting Calculation Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5 Running the tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.6 Output result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55566773 Examples
3.1 video1，2： . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 video3： . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9994 License

11i

CHAPTERONEINTRODUCTION

1.1 Abstract
RiTER Xsec provides a ﬂexible tool for incorporating various innovations in channel topography in multi-natural riverdevelopment, allowing detailed design of widening and slope gradients and immediate 3D deployment of the familiar
cross-section-based work. and can be immediately expanded to 3-D. This makes it easy to edit the terrain, which
contributes to increased eﬃciency and reduced costs. As a function of the iRIC software, it can also be used immediately
to calculate river bed ﬂuctuations.
The GUI functions include the ability to edit cross sections by displaying background grids, specifying aspect ratios,
displaying water level lines, and displaying pre-edited geometry. In addition, there is the ability to display georeferenced
or plan view lines on a cross section, extract and create river cross sections from 3D topographic data such as point
clouds or DEMs, expand the ability to read river cross section data, and input and output topographic data in LandXML
or PNG format. These GUI functions can be used with any iRIC solver.
The soil volume calculation function is a solver function of RiTER Xsec. It calculates the amount of cut and ﬁll basedon the mapped pre- and post-elevation mapped on the calculation grid. Because calculations are based on the elevations
mapped to the grid, any geographic information that can be mapped to the grid in iRIC, such as transect survey data or
point cloud data, can be used as input for calculations. Diﬀerent types of geographic information can also be used forthe elevation before and after the change, for example, mapping the topography before the change from transect survey
data and mapping the topography after the change from point cloud data. In addition to calculating for the entire area
where the grid is deﬁned, it is also possible to calculate for a subset of the area. The amount of cut and ﬁll for eachcross section can be calculated and exported to a CSV ﬁle.
This manual describes the soil volume calculation function, which is a solver function of RiTER Xsec. For otherfunctions on the GUI, please refer to the following table and refer to the iRIC software user manual.
A list of RiTER Xsec functions is shown in the Table 1.1.

1

RiTER Xsec User’s Manual, Release 1.0.0

Table 1.1: RiTER Xsec GUI features and iRIC software user manual reference locations
Function

Description

Reference

Cross-section editing
function

Allows you to specify how to edit
cross sections, specify aspect ratios,
display reference cross sections, etc.

Setting the normal
slope to snap to when
editing a cross-section
Import hydraulic information
Plane alignment reference function

The normal gradient to be snapped canbe set in advance when editing a crosssection
Imports water level information foreach river survey data transect.
Displays lines on a plan view on a transect.

Georeferencing

Allows alignment of background images.
Create river channel cross-section
data (riv ﬁle) from 3D topographic
data such as point clouds and DEM.
How to input/output topographic datain LandXML and PNG format

User
Manual/Pre-processing
Window/Geographic data/Editing [River Survey
Data]/Edit Mode/Operation in River Cross
Section Window
User
Manual/Common
Functions/Option/Preferences/[River Survey Data]tab
User
Manual/Common
Functions/File/Import/Hydraulic Data
User
Manual/Pre-processing
Window/Geographic Data/Editing [Lines]/Notes[Polyline] on [River Cross-section Window]
User
Manual/Pre-processing
Window/Background Image/GeoreferencingUser Manual / Pre-processing Window / Geographic Data / Editing [River Survey Data] / Create Mode
Usermanual/Commonfunctions/File/Import/Geographic Data, User manual/Common functions/File/Export/GeographicData

River cross section
data (riv ﬁle) creation
function
3D topographic data
input/output functions

1.2 Intended primary use
1.2.1 Calculation of cut-and-ﬁll volume for river channel construction
User calculates the amount of cut-and-ﬁll soil generated when performing river channel excavation etc.
Because iRIC has a cross-section editing function for cross-section survey data, the following ﬂow can be performed ina series of steps: channel design, calculation of ﬂow capacity, and calculation of cut-and-ﬁll volume.
1. Import the cross-section survey data of the existing river channel into iRIC.
2. Design the cross-section after construction, using the cross-section edit function of the cross-section survey data.
3. Map the cross section survey data to the grid and run solvers to check the ﬂow capacity, such as Nays2DH.
4. Once it is conﬁrmed that the designed channel has suﬃcient capacity, input the existing channel cross section
data and the cross section data created in step 2 into RiTER Xsec, to calculate the amount of cut and ﬁll to begenerated by the construction work.

2Chapter 1. Introduction

RiTER Xsec User’s Manual, Release 1.0.0

1.2.2 Conﬁrmation of the amount of river bed ﬂuctuation before and after a heavy
rainfall event
When river ﬂow is temporarily high due to heavy rainfall, river bed ﬂuctuation occurs due to sediment transport.
If the topography before and after a heavy rainfall event has been surveyed using laser surveying or other methods, it ispossible to calculate the increase or decrease in elevation and the accumulation of sediment transported based on thetwo point cloud data obtained from the survey.

1.2.3 Use as a template for development of terrain analysis tools
RiTER Xsec is developed in Python and its source code is publicly available.
PWRI provides the source code of RiTER Xsec under an open source license, which permits free modiﬁcation by users.
By reading the RiTER Xsec source code, users can learn how to develop programs to read and analyze topographic
data created with iRIC, and can apply the knowledge to develop their own topographic analysis tools.
PWRI hopes that users will develop and utilize various tools based on RiTER Xsec, contributing to the improvementof technical capabilities and productivity in civil engineering design sites.

1.3 Libraries used in RiTER Xsec
The following libraries are used in the development of RiTER Xsec.
• iRIClib: https://iric-solver-dev-manual.readthedocs.io/ja/v4_jp/06_about_iriclib.html• Numpy: https://numpy.org/1.3. Libraries used in RiTER Xsec

3

CHAPTERTWO

HOT TO OPERATE

2.1 Creation of input data
2.1.1 Importing geographic data
Import geographic information for mapping to a grid. The geographic information to be imported is shown below.
• Elevation (before)• Elevation (after)
The geographic information to be imported can be cross-sectional survey data, point cloud data, etc.
You can import the geographic data for Elevation (before) and Elevation (after) , that you ve prepared, or import
the same geographic data for Elevation (before) and Elevation (after) , and then use iRIC s function to modify
cross-section survey data that you ve imported to Elevation (after) .

2.1.2 (Optional) Deﬁnition of areas to be aggregated
If you want to calculate the cut and ﬁll volume in only some areas, deﬁne the areas to be aggregated.
By default, all areas are included.
If you want to exclude some areas, add polygon data to the Target Area in the Geographic Data section, and then
add the polygon data to that section. Create a polygon enclosing the area you want to exclude from the aggregation, andspecify Not Target as the value.

2.2 Creation of grid
Create a grid. Create a structured grid so the grid contains the area that the geographic data is deﬁnied, and it contains
the area for that you want to calculate the cut-and-ﬁll volume.
To create the grid, any algorithm that can be used to create a structured grid can be used, such as
polygonal line and width .

Create grid fromNote: RiTER Xsec calculates the cut-and-ﬁll volume in units of grid cells. Therefore, in order to perform accurate
calculations, it is necessary to keep in mind that the grid cells should be small enough to match the resolution of thegeographic information provided.

5

RiTER Xsec User’s Manual, Release 1.0.0

Once the cells become small enough, further reduction of the cell size will not improve the accuracy, but will only
increase the computation time. Please adjust the cell size appropriately through trial and error.

2.3 Mapping grid attributes
Map geographic data to a grid.
Just after creating the grid, the mapping is executed automatically.
If you edit the geographic data after creating the grid, you must manually rerun the mapping.

2.4 Setting Calculation Conditions
Set calculation conditions.

Figure 2.1:
The items ofCalculation Condition

Calculation Condition

dialogis shown below:• Output csv for cross-section: Check Enabled if you want to calculate and export to CSV the ﬁll, cut, andbalance (ﬁll - cut) for each cross section (a row of cells with the same I in the grid).
• CSV ﬁle name: Specify the name of the CSV ﬁle to output the above information.

6Chapter 2. Hot to operate

RiTER Xsec User’s Manual, Release 1.0.0

2.5 Running the tool
SelectCalculate->

Runfrom the menu to run the tool.

2.6 Output result
Check the output results; RiTER Xsec produces the following three types of output• Output to solver console• Output to CSV ﬁle• Output values per grid node

2.6.1 Output to solver console
List 2.1 shows an example of output to solver console.
List 2.1: An example of output to solver console.
12
3
4

Embankment: 182987.191 [m^3]
Cutting: 125869.706 [m^3]
Total Balance: 57117.485 [m^3]
C:\Users\User\Desktop\output.csv output.
The list of output values is shown below:
Embankment
Sum of ﬁll volume (Unit: m3 )Cutting
Sum of cut volume (Unit: m3 )Total Balance
Total valance (Sum of ﬁll volume - sum of cut volume) (Unit: m3 )2.6.2 Output to CSV ﬁle
The output is only available if

Output csv for cross-section

is enabled in the calculation conditions.

Outputs the calculated ﬁll, cut, and balance for each cross section (a row of cells with the same I in the grid).
List 2.2 shows an example of output to CSV ﬁleList 2.2: An example of output to CSV ﬁle
12
3
45
6
7

I,Embankment,Cutting,Total Balance
1,0.000,0.000,0.000
2,0.000,0.000,0.000
3,0.000,0.000,0.000
4,0.000,0.000,0.000
5,2193.125,312.125,1881.001
6,2202.978,288.821,1914.157(continues on next page)2.5. Running the tool7

RiTER Xsec User’s Manual, Release 1.0.0(continued from previous page)
89107,2216.815,262.550,1954.265
8,2228.085,239.508,1988.577
9,2236.348,220.978,2015.370

2.6.3 Output values per grid node
Table 2.1 shows the list of output values per grid node.
The output values per grid node can be visualized using a two-dimensional visualization window, a graph window, etc.
Table 2.1: The list of output values per grid node

8

NameDescription

ElevationBefore(m)ElevationAfter(m)ElevationChange(m)Fill_Cut

The value read from Elevation (before)
The value read from Elevation (after)
ElevationAfter(m) - ElevationBefore(m)1 for positive ElevationChange, -1 for negative ElevationChange, 0 for no change

Chapter 2. Hot to operate

CHAPTERTHREE

EXAMPLES

An explanatory video of RiTER Xsec is available on YouTube.
The links are as follows.
https://www.youtube.com/watch?v=OUx-DwpVOXo&list=PLjUrUSvJNya_XrXmc9f52fx8DyIMDX0Qg

3.1 video1，2：横断ベースの地形編集で 3 次元設計ができちゃう！
？

地形編集ツール「iRIC / RiTER Xsec」

横断ベースの地形編集で 3 次元設計ができちゃう！
？ 地形編集ツール「iRIC / RiTER Xsec」

1 基礎知識編
2 実践編

The following features were released before 2021.
1. Cross-section editing function
2. setting of snapping slope in cross section editing
3. importing hydraulic information
4. geo-referencing
5. creation of river survey data
6. importing water level information
7. planar alignment reference function

3.2 video3：
河道地形編集ツール「RiTER Xsec」〜新機能追加（2023）〜

The following features were released in 2023．
1. improved reading function of channel cross section data
2. soil volume calculation function

9

CHAPTER

FOUR

LICENSE• This software is distributed by Public Works Research Institute Aqua Restoration Research Center.
• This software is licensed under a Creative Commons Attribution 4.0 International License CC BY . Whenyou copy, distribute this software, or you use this software for showcase or demonstration, please display that you
used the software distributed by Public Works Research Institute Aqua Restoration Research Center.
(Refer to: https://creativecommons.jp/licenses/)11