Evaluation of the geometry for remote river rating in hydrodynamic environments

Rapid modern technological advancements have led to significant improvements in river monitoring using Unmanned Aerial vehicles (UAVs). These UAVs allow for the collection of flow geometry data in environments that are difficult to access. Hydraulic models may be constructed from these data, which in turn can be used for various applications 15 such as water management, forecasting, early warning and disaster preparedness by responsible water authorities, and construction of river rating curves. We hypothesize that the reconstruction combined with Real Time Kinematic Global Navigation Satellite System (RTK GNSS) equipment leads to accurate geometries particularly fit for hydraulic understanding and simulation models. This study sought to (1) compare open source and commercial photogrammetry packages to verify if water authorities with low resource availability have the option to utilise these without significant compromise on accuracy; 20 (2) assess the impact of variations in the number of Ground Control Points (GCPs) and the distribution of the GCP markers on the quality of Digital Elevation Models (DEMs), with a particular emphasis on characteristics that impact on hydraulics; and (3) investigate the impact of variations in DEMs on flow estimations based on the number of GCPs used. We tested our approach over a section of the Luangwa River in Zambia. We compare performance of two different photogrammetry software packages, one being open-source and one commercial; then compare for one chosen package the performance with different 25 GCP numbers and distributions, and finally, emphasize on the reconstruction of hydraulically important parameters. The first investigation (1) utilises the root mean square error (RMSE) method to determine if open source software performs as well as commercial software. The second task (2) aimed to assess the optimal GCP number and distribution; we generated 10 UAV based elevation models under varying GCP distribution conditions using OpenDroneMap (ODM) software. To benchmark the different DEM reconstructions we assessed the Mean Absolute Error of the elevation using the GCPs that were left out of the 30 reconstruction. Finally (3), in order to investigate the impact of variations in DEMs on flow estimations we performed a comparison of the hydraulic conveyance across each reconstruction, as well as a comparison of the hydraulic slope against an independent estimate using an in-situ RTK GNSS tie line. Results indicate that the open-source software photogrammetry https://doi.org/10.5194/gi-2021-22 Preprint. Discussion started: 7 July 2021 c © Author(s) 2021. CC BY 4.0 License.

packages which may be inhibitive to low budget water resource authorities. The accuracy of geometry is important in that it 90 can significantly affect the estimated discharge if incorrectly processed. The factors affecting the output can be divided into three groups; (i) pre-flight (flight application, GCP number), (ii) flight settings (camera angle, direction, velocity, altitude, light intensity, wind speed, overlap) and (iii) post-flight processing (processing software, GCP combination). There has been some attempt to review UAV acquisition systems, orientation and regulation (Colomina and Molina, 2014). The application was however limited to the instruments used, i.e. it did not assess the impact of using UAVs for data acquisition in 95 hydrodynamic environments.
The process of photogrammetry requires software which is usually available at a cost beyond the reach of most researchers and other interested parties. Some of the more common software packages are (commercial) Pix4D, Agisoft meta-soft and (non-commercial and open-source) OpenDroneMap (ODM). Several researchers have made some comparisons between the commercially available software (Alidoost and Arefi, 2017;Grussenmeyer and Khalil, 2008;Probst et al., 2018). ODM is an 100 open-source software which can be used to generate digital elevation models and other photogrammetry results. A comparison focusing on the processing time was conducted by Zečević (2017), which concluded that cloud-based solutions such as DroneMapper could produce high-quality elevation models at shorter time spans.
Hydraulic geometry is an important factor that significantly affects the accuracy of discharge estimations in hydraulic models and is therefore critical for estimating how much water can be conveyed within the channel capacity, and to estimate flow as 105 a function of water levels. A number of factors impact the quality of geometrical elevation models produced through UAV based photogrammetry. The primary factors are the number of ground control points and the distribution of these marker points (Awasthi et al., 2019). There exists minimal research on how these factors can be adjusted to improve the quality of elevation models in hydrodynamic environments and when applied for the ultimate purposes of discharge estimation. Furthermore, earlier contributions have not put the focus on the ability to reproduce hydraulic geometry characteristics and have not focused 110 on the entire bathymetry (including the permanently wet river bed section). Hence, this paper investigates if low-cost methods for data collection and processing, i.e. a combination of precise bathymetry points with low-cost RTK, and UAV photogrammetry, can be used to provide satisfactory quality elevation models for hydraulic models, quantified in hydraulic geometry characteristics. We focus on low-cost data collection and open-source processing methods. We tested the methods on the Luangwa River in Zambia. 115 This paper is organised as follows: section 2 describes the methodology and gives a brief outline of what materials were used in the study. In Section 2.1 describe the study area (Luangwa Basin). Furthermore, the methodology section outlines how flow estimation was determined and software packages were compared. Furthermore, Section 3 presents results and a discussion of the results. We conclude with section 4 which presents a conclusion and recommendation for future studies.

Materials and Methods 120
This section first describes the data collection procedures, including flight plan, collection of ground control point's, dry and wet bathymetry. Then it describes which experiments are conducted to investigate our research questions. We investigate the following research questions and determine whether the said factors have a significant effect on the accuracy of results. These are: 1. 1. Can the freely available (Open Source) ODM software package produce results that are comparable to commercial packages 125 such as Agisoft Metashape? 2. What is the optimal GCP number and GCP distribution necessary to reconstruct accurate elevation models?
3. What impact does utilising elevation models, reconstructed based on different GCP numbers have on flow estimations?

Study site
The study was conducted along the Luangwa River, South of the Luangwa Bridge. The Basin has a catchment area of 130 approximately 160,000 km 2 . The Luangwa River originates in the Mafinga Hills in the North-Eastern part of Zambia and is approximately 850 km in length, flowing in South-Western direction. The river drains into the Zambezi River, shaping a broad valley along its course. The river has naturally created a valley, which is well-known for its abundant wildlife and relatively pristine surroundings (WARMA, 2016). The study area is shown on Figure 1.

Figure 1 Study area map in Zambia
The data collection was conducted in the late stages of the dry season (December, 2019) to maximise the visible floodplain.

Flight Plan 140
GCPs were recorded using RTK GNSS equipment on a 1 km long floodplain. Flights were conducted at two different heights (90m and 100m) at a constant speed, 10 0 camera angle, direction (i.e. parallel or perpendicular to river) and image overlap (80%). The UAV used is a DJI Phantom 4 Advance with a 12 Megapixel FC330 RGB camera. A flight planning android application called Pix4D Capture was used to control the autonomous flights. This application was chosen due to its capability to tilt the camera forward during the image capturing process. Different GCP combinations and variations were tested, 145 including the use of different flight paths. This was done to avoid the so-called "doming effect" (also known as "bowling effect") i.e. distortion of the reconstruction due to unfortunate acquisition conditions or unreliable modeling of radial lens distortions (Magri and Toldo, 2017). It is important to have only one variable with all other factors remaining constant to allow for comparability. Some guidelines for avoiding the doming effect have been outlined (James and Robson, 2014).

Dry river bathymetry 150
In order to refine the camera calibration parameters and to optimise the geometry of the output, GCPs have to be used. The dry bathymetry data collection can be divided into two procedures; placing the GCPs on the ground and collecting the images.
A total of 17 GCP markers were placed on the floodplain, with some being closer to the road, others more in the middle of the dry floodplain and the last closer to the water line. Figure 2 shows the location of the GCPs in relation to the floodplain. An https://doi.org/10.5194/gi-2021-22 Preprint. Discussion started: 7 July 2021 c Author(s) 2021. CC BY 4.0 License. effort was made to make sure all elevation variations were covered by the placement of GCPs. The markers were 40 cm by 40 155 cm in dimension and had an alternating black/white colour. The markers were placed on one side of the floodplain because the other side was steep and covered with dense vegetation. An Arduino simpleRTK2B GNSS, equipped with a u-blox ZED-F9P dual frequency GNSS receiver was then used to record the marker points. The simpleRTK2B set is a low-cost GNSS with <1cm level precision with base-rover and <1cm level precision with NTRIP corrections. Figure 3 (a) shows the SimpleRTK2B Base and Rover which was used to measure marker points. Figure 3 (b) shows the simpleRTK2B setup onsite. 160

Figure 2 Location of GCPs on Floodplain
The UAV flew along 2 different paths at heights of 90m and 100 m respectively. The UAV camera was tilted at an angle of 10 degrees forward. The flight control application Pix4d Capture was used for its ability to adjust the camera angle. A total of 165 530 images were collected with a front and side overlap of 80% and 72% respectively.

Wet River bathymetry
The Luangwa River, similar to other large tributary rivers of the Zambezi, is perennial meaning the bathymetry of the river 170 needs to be measured under flow conditions. The wet river bathymetry was recorded using a combination of an ADCP and RTK GPS. The GPS of the ADCP was not used in favour of the RTK GPS for improved accuracy. The RTK GPS was mounted directly onto the ADCP sonar beam, whilst the ADCP was attached to a canoe rowed by local fishermen, as shown in Figure   4(b). The ADCP and the RTK GPS were configured to take measurements at one second intervals. The canoe moved from one side to the other in a zigzag manner and tried as much as possible to reach the edges to both sides. The GPS crossed the river 175 21 times and a total of 3102 measurements were recorded. The program suitable for the particular ADCP, Winriver II, was used for real-time data collection. For the purposes of interpolation, the canoe was manoeuvred along both sides of the river.
The river was however shallow, especially on the right bank, this means that it was not possible for the canoe to adequately move close to the water line. To compensate for this limitation, the RTK GPS was mounted on a wooden cart and towed manually along the waterline. An image of the cart is shown in Figure 4

Processing the Dry and Wet Bathymetry
Images taken by the UAV are collected and fed into the ODM and Agisoft software. The images were processed locally on a 185 Dell Core i7 8 th generation machine with 32 Gigabytes of RAM. The same settings were applied in the processing steps as far as was permissible. Figure 5 (b) outlines the steps which were taken in the production of the point cloud and DEM.
Where ∆ = residual of the i th value in the x axis ∆ = residual of the i th value in the y axis ∆ = residual of the i th value in the z axis n = number of check points (GCPs that were not used in the reconstruction) 215 DEMs based on five, nine, thirteen and seventeen GCPs were exported from ODM and Agisoft. The DEMs were fed into the Geographic Information System (GIS) QGIS and a point sampling tool was used to extract elevation values at the corresponding coordinates of the GCPs that were not used in the reconstruction. This ensured that an independent estimate of the RMSE could be established. A bootstrapping experiment was conducted on the errors of the individual GCPs that were used to calculate the RMSE. This experiment was performed to test the stability of the RMSE. In the experiment random 220 samples of error were drawn from the 5, 9 and 13 GCPs. The sampled errors, which were equal in number to the available https://doi.org/10.5194/gi-2021-22 Preprint. Discussion started: 7 July 2021 c Author(s) 2021. CC BY 4.0 License.
GCPs, were sampled with replacement to obtain new RMSE values. The process was then repeated for 1000 drawn sample sets. Given that this first experiment led to the conclusion that ODM is a satisfactory choice and it is free and Open-Source (see Section 3.1) the remaining experiments were only conducted with ODM.

Impact of GCP placement and density on accuracy 225
This experimental objective was divided into two parts. The first was to establish the impact of GCP density on DEM accuracy.
The second part was to establish the impact of placing GCPs further or closer to the flowing river. In both instances a comparison of absolute error was made with the RTK track line which was acquired using the RTK GNSS mounted on a mobile cart. The Python package 'rasterio' was used to extract elevation values at corresponding coordinates. For the first part, elevations from the DEMs with 5, 9 13 and 17 GCPS were extracted and compared to the RTK line elevations. For the second 230 part, many studies have indicated that photogrammetry is incapable of adequately mapping a flowing river because it reflects light (Bandini et al., 2017;Dai et al., 2018). The noise generated on the river surface has a negative impact on the overall accuracy of the DEM. In order to establish the significance of this noise, elevation extrapolations from the DEMs constructed using 9 GCPs closest to the river and 9 GCPs furthest from the river were compared. Figure 6 shows the positions of the GCPs placed further and closer to the river. The figure also shows an orthophoto to be able to identify the river's water surface and 235 other features such as the vegetation on the natural levee of the river's floodplain.

Impact of DEM variations on hydraulic conveyance
We investigated how variations in DEM reconstruction choices impact on conveyance characteristics. We determined 240 conveyance versus depth relationships over several cross-sections in each DEM created. In addition, we compared DEM derived hydraulic slope with an independent estimate of slope using an in-situ RTK GNSS tie line (see Section 2.2.3 for a description of the acquisition method).
In order to obtain the full bathymetry of the river, the dry bathymetry and the wet bathymetry are merged together in the software. Before the wet bathymetry is merged to the dry bathymetry, the wet river transects have to be volumised. This process 245 entails conversion of the sparse point cloud made of transect points into pixels through linear interpolation with the nearest non-empty cell. In occurrences whereby there are overlaps or edges we choose to treat these through linear interpolation as well. After merging, three cross sections perpendicular to the river were extracted such that a relationship between area and perimeter could be established over the entire cross-section, including both wet and dry bathymetry. This was done for all the elevation models generated using a different number of GCPs so that the established relationships could be compared. Figure  250 7 shows the location of the cross sections which were extracted from the respective reconstructions.
Slope estimation was conducted using two different techniques. The first involves the extraction of the slope from the terrain outputs produced by the photogrammetry process. The second method calculated slope based on the entirely independent reference track measured with the RTK GNSS on the cart. The outputs were then compared taking the slope derived by the GNSS as the true value.  In summary, the assessment of the impact of processing methods on quality of terrain data, focussing on geometry of hydraulic properties consisted of three steps: applicability of open source versus proprietary photogrammetry software, the impact of 260 GCP density and placement on DEM quality and the impact of variations in DEMs of flow estimation. In this section, we present the results of these three steps.

Impact of the used processing software
In order to assess the applicability of open source software the RMSE of terrain models processed in ODM were compared with those from Agisoft Metashape. The results are presented in Table 1. 265 The results indicate Agisoft RMSE values that are comparable to those calculated when ODM was used for reconstruction.
The two software products generally follow a trend whereby increasing the number of GCPs from 5 to 9 results in a notable decrease in RMSE. A further increase from 9 to 13 GCPs results in an increase in RMSE. This result is counter intuitive, however, given that the error was calculated based on GCPs which were not used in the reconstruction, it follows that 270 increasing the number of GCPs simultaneously decreased the sample size available for error calculation. A reduced sample size meant that outlier error values may well result in a poorer resultant RMSE. In general, the RMSE values of Agisoft and ODM were similar, however, we note that the sample size of data used to calculate the RMSE was not large enough to provide statistical confidence. To that end, a bootstrapping experiment was conducted to establish if there was a significant similarity in the performance of ODM in comparison to Agisoft (see Section 2.3.1). The bootstrapping experiment is particularly 275 appropriate for small sample sizes and data sets which do not necessarily follow a normal distribution (Freedman, 2007). The results of the bootstrap experiment are presented in Figure 8.

Impact of GCP placement and density on accuracy of hydraulic features
The aim of this experiment was to assess the impact of variations in the number of Ground Control Points (GCPs) and the distribution of the GCP markers on the quality of DEMs, with a particular emphasis on characteristics that impact on hydraulics. Five different GCP numbers (0, 5, 9, 13, and 17) and two specialised settings (Brown-Conrady and Fixed camera 290 parameter) were compared. We observed dome-like deformations in all of the elevation extractions. This phenomenon, known as the 'doming effect' (also known as "bowling effect", described in section 2.2) is exemplified in Figure 9. The effect is apparent despite attempts to avoid the aforementioned phenomena through deliberate flight practices such as a 10 o camera angle and a 20 o alternating flight path.

Figure 9 Doming effect
A rather practical approach was used to correct for the doming effect. A first order polynomial was fitted through the RTK GNSS track. A second order polynomial was then fitted through all the reconstructed point clouds. The error was then determined by calculating the absolute difference between the two polynomials for the given length. The respective clouds were divided into 1500 sections from north to south whereby every point within each section was assumed to be deformed by 300 the same elevation value. The absolute errors were then applied as corrections to the point clouds depending on which section each location fell in. Figure 10   The assessment was conducted based on the RTK waterline track and the results are presented in table 2. The results indicate a decrease in the RMSE as we increase the number of GCPs. However the incremental benefit of increasing the number of GCPs beyond 5 becomes smaller as more control points were added to the reconstruction. Noticeably, the RMSEs derived based on the GCP checkpoints was similar to that which was obtained based on the RTK waterline as a reference. This implies that the RTK waterline track is a potential substitute when calculating the error in a photogrammetry reconstructed model. The 310 RMSE values derived from the 'No GCPs' and from using the 'Brown-Conrady' configuration showed significant inaccuracy and therefore rendered inapplicable. However, the 'Fixed Camera Parameter' configuration performed reasonably well (RMSE = 0.618m), considering no control points were used. We identified a bias in terms of the errors calculated when GCPs are closer to or further from the river. The results are presented 315 in table 3. Similar to the aforementioned experiment, the RTK track was used as a reference. The RMSE is less when GCPs closer to the river (approximately 20 m away) are used in the reconstruction than when GCPs further away are used. We hypothesize that the GCP distribution used in the experiment 'Closer to River', is such that GCPs are placed much closer to https://doi.org/10.5194/gi-2021-22 Preprint. Discussion started: 7 July 2021 c Author(s) 2021. CC BY 4.0 License. the reference line, therefore better conditioning the part of the reconstruction close to the RTK track. Our hypothesis is reaffirmed by the results of calculating the RMSE based on GCPs as shown in table 3. Similarly, the RMSE is less when GCPs 320 used in the reconstruction are closer to the River.

Impact of DEM variations on hydraulic conveyance
Hydraulic conveyance was computed from the merged dry and wet bathymetry. We performed a comparison of the hydraulic conveyance across various reconstructions. Furthermore, we compared the hydraulic slope of the various reconstructions with 325 an independent slope estimate measured from an in-situ RTK GNSS tie line. In order to extract the cross-section elevations, the full bathymetry of the river had to be utilised. The wet river point cloud, shown in Figure 11, covers 555 metres of the river length and consists of 5,164 points. The latitude and longitude originate from RTK GPS measurements whereas the height component is determined using both RTK GNSS and an ADCP as described in section 2.2. The maximum and minimum height of the point cloud are 352.20 and 348.45 metres respectively.

Figure 11 Wet Bathymetry processing (A-Merging B-Volumisation)
The dry river bathymetry is constructed using photogrammetry and RTK GNSS as described in section 2.2. The various point clouds represent an area of approximately 679 x 551 metres. Like the wet river, each point contains a latitude, longitude and height component with a maximum and minimum height of 383.4 (hill in the south east corner) and 350.2 metres respectively. 335 In order to extract the cross-sections, the dry and wet bathymetry had to be merged and subsequently volumised. These two processes which were conducted in Cloud Compare are exemplified in Figure 12.   The configuration with no GCPs and Brown -Conrady significantly underestimated the actual height by approximately 13 meters.
In an attempt to improve the results when no GCPs are available, we applied a configuration setting known as FCP (Fixed 345 Camera Parameters). The FCP turns off camera optimisation while performing bundle adjustment. Bundle adjustment is a technique for calculating the errors that occur when we transform the XYZ location of a point in the environment to a pixel point on a camera image. In certain circumstances, particularly when mapping linear (low amplitude, limited features) topographies such as the Luangwa floodplain, bundle adjustment performs poor estimation of distortion parameters (Griffiths and Burningham, 2019). The FCP results showed a significant improvement, the shape of the cross section was similar to the 350 experiments with GCPs though visibly below the rest. The hydraulic conveyance estimation graph is presented in Figure 14. The slope calculations shown table 4 a significant difference between the true slope (RTK GNSS), and the photogrammetry derived slope values. This is despite a correction of the doming effect as described in section 3.2. Among photogrammetry based slope derivations, there were relatively large variations GCPs in proximity to potentially problematic areas such as forests or water significantly improves the overall output of the reconstruction.
The effective impact of variations in GCPs on geometry is realised in the form of conveyance. Despite the optimal number of GCPs being nine (9), the study concludes that five (5) Figure B1 shows the 'bowling' or 'doming' effect on terrain models. The top left graph represents the relationship between 445 height and track for the 5 GCP terrain. The centre left graph represents the relationship between and track for the 5 GCP terrain after FCP correction. The bottom left graph represents the relationship between and track for the 5 GCP terrain after both FCP and doming correction. The top right graph represents the relationship between height and track for the 9 GCP terrain. The centre right graph represents the relationship between and track for the 9 GCP terrain after FCP correction. The bottom right graph represents the relationship between and track for the 9 GCP terrain after both FCP and doming correction. 450 B 1 Correction for the doming effect Figure B2 shows the 'bowling' or 'doming' doming effect on terrain models. The top left graph represents the relationship between height and track for the 13 GCP terrain. The centre left graph represents the relationship between and track for the 13 455 https://doi.org/10.5194/gi-2021-22 Preprint. Discussion started: 7 July 2021 c Author(s) 2021. CC BY 4.0 License. GCP terrain after FCP correction. The bottom left graph represents the relationship between and track for the 13 GCP terrain after both FCP and doming correction. The top right graph represents the relationship between height and track for the 17 GCP terrain. The centre right graph represents the relationship between and track for the 17 GCP terrain after FCP correction. The bottom right graph represents the relationship between and track for the 17 GCP terrain after both FCP and doming correction. 460 B 2 Correcting the doming effect Figure B3 shows the regression line fit through extracted tracks lines. The top left graph represents the relationship between height and track for the RTK track. The centre left graph represents the relationship between height and track for the 9 GCP.

Wet and Dry Bathymetry
The bottom left graph represents the relationship between height and track for the 17 GCP terrain. The top right graph represents the relationship between height and track for the 5 GCP terrain. The centre right graph represents the relationship 465 between height and track for the 13 GCP. The bottom right graph represents the relationship between height and track for the no GCP terrain https://doi.org/10.5194/gi-2021-22 Preprint. Discussion started: 7 July 2021 c Author(s) 2021. CC BY 4.0 License. Figure B4 shows the relationship between depth and area, as well as the relationship between depth and conveyance. The top left graph represents the relationship between depth and area at the cross section on the northern part of the terrain. The top right graph represents the relationship between depth and conveyance at the cross section on the northern part of the terrain.
The bottom left graph represents the relationship between depth and area at the cross section on the northern part of the terrain. 475 The bottom right graph represents the relationship between depth and conveyance at the cross section on the northern part of the terrain.
https://doi.org/10.5194/gi-2021-22 Preprint. Discussion started: 7 July 2021 c Author(s) 2021. CC BY 4.0 License. Figure B5 shows the relationships between floodplain width and height above mean sea level, as well as the relationships 480 between wetted perimeter and area. The top left graph represents the relationship between floodplain width and height above mean sea level at the cross section on the northern part of the terrain. The top right graph represents the relationship between wetted perimeter and area at the cross section on the northern part of the terrain. The bottom left graph represents the relationship between floodplain width and height above mean sea level at the cross section on the northern part of the terrain.

B 4 Depth vs Area Map and Conveyance vs Depth
The bottom right graph represents the relationship between wetted perimeter and area at the cross section on the northern part 485 of the terrain.