Introduction

In recent years, computer tools and resources have evolved to allow the production of three-dimensional (3D) models that have become great sources of data for the reconstruction of elements of forgotten heritage and their exhibition in museums [1,2,3,4,5]. Therefore, in 1985 UNESCO added virtual reconstruction to the list of procedures for the conservation and preservation of buildings of cultural interest, and in 2006 the London Charter established the principles of 3D visualisation in the field of research and dissemination of cultural heritage.

The main advances in the field of 3D modelling are related to terrestrial laser scanning (TLS) [6] and unmanned aerial vehicle (UAV) photogrammetry [7]. It is possible to use images captured at different heights and at different tilt angles [8] thanks to the combination of computer vision and photogrammetry [9]. Several software applications make it possible to obtain a 3D model based on point clouds from photographs taken by any conventional camera. This is thanks to special algorithms such as Structure-from-Motion (SfM) [10,11,12]. The SfM algorithm provides a point cloud representing the geometry of the object under study, the positions from which the photographs were taken and the orientation of each camera [13, 14]. SfM incorporates multi-view stereopsis techniques [15], which derive a 3D structure from overlapping photography acquired from multiple locations and angles [16] that then have the scale-invariant feature transform (SIFT) operator for keypoint detection applied to them. This generates 3D point clouds from photographs. Contrary to classical aerial photogrammetry, SfM simplifies the process by eliminating the need for exhaustive camera calibration data or exhaustive planning of the flight path (furthermore, images from different cameras can be used). After processing this algorithm, a point cloud with a relative spatial position and without scale is obtained. Therefore, it needs to be georeferenced, either by direct methods through the use of the geolocation data of the photographs or by indirect methods using ground control points (GCPs) [17].

According to several studies, the results obtained through the SfM algorithm allow it to be used as a reliable system for acquiring 3D data with accuracies similar to those obtained with TLS [18, 19]. The morphology of the area under study defines not only the technique to be used—TLS or UAV photogrammetry—but also the ease of access to the area [20]. Indeed, one of the biggest problems of TLS is the hidden areas that cannot be accessed. In this case, UAVs facilitate data collection in an efficient and economical way since they can be equipped with high resolution cameras that allow a photogrammetric process based on SfM [21,22,23,24,25,26,27]. A simple way to improve the results obtained by SfM photogrammetry is to use oblique photographs. This technique allows the visualisation of details hidden in the nadiral views, without the need to use terrestrial photographs [28, 29].

Regardless of how the dense point cloud is obtained, its objective is to serve as the basis for developing a building information model (BIM). Such a model covers not only the design and construction processes but also the management of building data throughout the life of the building. For this purpose, it has been used in recent years in the construction sector [30], although it is also being successfully implemented in the management and documentation of historical heritage [31,32,33,34,35,36,37]. For example, photogrammetry in combination with BIM could be presented for the aim of creating a digital twin for the structural survey and monitoring, in order to improve the geometrical and mechanical survey of Heritage structure, reducing the errors in the description of the structure [38, 39]. From another point of view, BIM can also be used as a support for structural design by means of finite element model (FEM) [40, 41].

However, this reverse engineering process requires considerable time to parameterise the geometric elements, regardless of the use of manual modelling tools or plugins that automate the process [42]. The term Scan-to-BIM incorporates the exploration process by scanning data in the form of point cloud data (PCD) that contain geospatial information about the building and its surroundings. Autodesk Revit®, as BIM software, can link the point cloud from its own interface or through the Autodesk ReCap® application [43,44,45].

Since the point cloud is linked in Revit, the As-Built for Autodesk Revit-FARO® plug-in is used to carry out the 3D modelling. The plug-in contains advanced modelling tools, explained in detail later. The components obtained by applying the developed methodology are used to create a library of parametric elements under the concept of historic building information modelling (HBIM) [46].

The graphic documentation of historic buildings is one of the most powerful tools for the preservation of their material cultural values and is the basis of their research, conservation and dissemination. Beyond research, the rigorous and complete planimetry of a historic building is the basis on which to develop any intervention project. Therefore, the objective of this research is to document the cultural heritage related to the Isabel II Reservoir, in Níjar (Almería, Spain), that is, the body of the dam, the administration building, the control tower and part of the irrigation canals in a single HBIM, supported by the point cloud obtained by UAV photogrammetry and contrasting the accuracy of the model using the As-Built for Autodesk Revit-FARO® plug-in.

Materials and methods

Figure 1 shows the workflow followed in this research. In summary, the workflow consists of acquiring, on the one hand, all the available historical information together with the technical analysis of the heritage element, and on the other hand, obtaining the topographic survey of the heritage element, in our case by means of UAV photogrammetry. From the previous data a BIM model of the heritage element is obtained using specialized software for photogrammetry and design. The veracity of the BIM model must be checked by means of a geometric validation and, once this is done, the texture of the BIM model is improved to obtain a photorealistic appearance.

Fig. 1
figure 1

Workflow followed in this research

Study site

This research focused on the Isabel II Reservoir, located in south-eastern Spain, in the province of Almería and a few kilometres from the village of Níjar (Fig. 2). It consists of several elements, such as the body of the dam, the administration building, the control tower and the irrigation distribution canals.

Fig. 2
figure 2

Location of the study area

The dam, built in the nineteenth century, stands out as one of the most spectacular elements of Spanish structural and hydraulic heritage. It is also a world reference for arch-gravity dams built in stone [47]. It is approximately 35 m high and 44 m long; limestone ashlar stones were used for the exterior surfaces and lime masonry for the interior (Fig. 3).

Fig. 3
figure 3

View perspective of the dam

On the left bank is the administration building, now semi-demolished (Fig. 4), which served as the headquarters for the company that built the reservoir, from where excellent views of the valley can be seen. The dam and the administration building are considered the most representative of the reservoir, as they are included in the Water Route of industrial tourism in Níjar.

Fig. 4
figure 4

View of the reservoir administration building

Historic information

The first foundation works of the dam’s body, carried out by the private company Empresa del Pantano, date back to 1841. This project did not contain plans or descriptive reports, so in 1842 the architect Gerónimo Ros Giménez was commissioned to design the plans and compile a report on the current state of the works. The plans were examined and approved by the Royal Academy of San Fernando on 15th September 1842. On 13th July 1847, by Royal Order, the reservoir was declared to be a public utility, and by Royal Decree of 26th July 1849, the sovereign queen authorised the reservoir to bear her name: Isabel II Reservoir. The reservoir was finally inaugurated in 1850, although the work on the body of the dam was only completed in 1851. In 1857 all the works were finished, including the field canal and administration building.

In 1860, the French engineer Maurice Aymard compiled information on irrigation for the publication ‘Irrigations of the south of Spain: studies on the great hydraulic works and the administrative regime of watering of this country’ in 1864. For this reason he travelled to Níjar to compile a report on the reservoir. Figure 5 is one of the plans drawn up by Maurice Aymard in 1864, which is the most faithful representation of the actual construction of the reservoir after its construction. According to the French engineer, the dam presented certain innovations, one of which was a gate to be operated from above by means of a transmission rod. He also stated that the reservoir's capacity had been estimated at 15 million cubic metres, and that it could irrigate 13,000 hectares at a rate of two irrigations of 500 to 600 cubic metres each, per year.

Fig. 5
figure 5

Barrage. Reservoir of Níjar’ designed by engineer Maurice Aymard in 1864 [47]

The project failed due to errors in the calculations and due to a lack of hydrological, geographical and pluviometric studies. In the 1960s, the Isabel II Reservoir was partially flooded and became completely unusable. In 1891 the Provincial Board of Health requested the draining and cleaning of the reservoir. The Isabel II Reservoir, despite not being a success, was an advanced construction for its time, marking a milestone in hydraulic engineering; it was featured in numerous international engineering and architecture magazines during the second half of the nineteenth century [47].

Point cloud obtained using UAV photogrammetry

GNSS surveying of ground control points for georeferencing and accuracy evaluation of photogrammetric products

In order to accurately georeference the project, it is necessary to have a series of targets to serve as GCPs. In this sense, 17 targets were placed on the downstream face of the dam in a red A3 format (420 × 297 mm) divided into black and white quadrants. Figure 6a shows an example of one of these targets. The targets’ 3D coordinates were measured with a global-navigation satellite system (GNSS) receiver operating in post-processing kinematic mode (PPK) with its base emitting corrections at a point near the dam, as shown in Fig. 6b. Both rover and base GNSS receivers were Trimble R6 systems. The base’s 3D coordinates, corrected via the Trimble Centerpoint RTX Post-Processing Service, were 574,909.418, 4,093,250.721 and 372.012 m (European Terrestrial Reference System 1989, ETRS89 and EGM08 geoid model). In agreement with the study of [18], this provision of targets ensures that results are obtained with good accuracy in both planimetry and altimetry.

Fig. 6
figure 6

a One of the targets used in this work; b GNSS receiver base applied to this work

Image capture

A DJI Phantom 4 Pro rotary-wing UAV with four engines was used for photo capture. For precision navigation, the UAV has an on-board GNSS using GPS and GLONASS. It also has vision systems at the front, rear and bottom. These systems allow it to detect surfaces with a defined pattern and adequate illumination and avoid obstacles with a range between 0.2 and 7 m. The Phantom 4 RGB camera is equipped with a one-inch, 20-megapixel (5472 × 3648) sensor and has a manually adjusted aperture (from f/2.8 to f/11). The lens has a fixed focal length of 8.8 mm and a horizontal FOV of 84°. The UAV took photographs in parallel flight lines, with a high percentage of longitudinal and transversal overlap, at a constant flight altitude and with a vertical camera angle (90°). However, the use of oblique photographs improves the estimation of camera calibration parameters [48, 49], and there are several scientific publications that prove oblique photographs improve the level of detail in the reconstruction of the point cloud [50, 51].

Two separate flights were conducted for this purpose. The first flight obtained a total of 207 nadiral photographs over 13 passes while on autopilot using the DJI GS Pro application. The flight altitude was kept constant at about 36 m above the crest of the dam. The camera took a shot every two seconds in order to obtain a longitudinal overlap of 80%. The second flight was conducted without autopilot, using the pilot’s skill, in order to obtain oblique photographs that would show all the fine details of the dam. The flight was conducted at a distance of approximately 30 m above the face of the dam at seven different altitude levels. A total of 372 photographs were obtained, including photographs of the administration building and the guard tower. By adopting an angle of inclination of about 45°, the horizon was out of shot. Therefore, the photogrammetric project was processed with a total of 579 photographs from different viewpoints and at different scales. Figure 7 shows the image overlaps and the locations of the cameras during each flight.

Fig. 7
figure 7

Image overlaps in the study site. All areas are covered with a minimum of 9 images. The black dots represent camera location for the nadiral and oblique flights used in the processing of the photogrammetric project

Photogrammetric processing

The photogrammetric projects were executed with Agisoft Metashape Professional software version 1.6.1.10009. This software, based on the SfM algorithm, was executed in several steps. The first step consisted of aligning all the photographs by identifying and tying the keypoints. During the execution of this process, the software estimated the internal and external calibration parameters of the camera, including non-radial distortions, starting only from the focal length of the camera (this value is obtained from the EXIF data of the photographs). In our project, this step was carried out with accuracy set to medium. Once executed, the software obtained the scene geometry, the camera positions and orientation and an estimation of the camera calibration parameters. By using photographs with geolocation data, the resulting sparse point cloud was georeferenced. However, georeferencing has low accuracy, and GCPs are required to improve it. A more accurate bundle adjustment can be obtained with as few as three GCPs and can be further improved by increasing the number of GCPs [52, 53]. In this study, all 17 targets were used for georeferencing—in our case using the ETRS89 UTM 30N system. In the next step, the point cloud was densified at medium quality, and any wild points that may have appeared in the model were manually removed. The result was a point cloud with a high degree of detail. From this point cloud the mesh was obtained using the height field method. In the next step, texture was applied to the mesh and finally both the orthophoto and DSM were exported. The point cloud was exported in a *.las format.

Figure 8 shows the errors obtained in the GCPs that were used to carry out the adjustment of the photogrammetric block. According to the complementary study of [18], the obtained point cloud had an accuracy similar to that of a TLS, with a total error below 3 cm.

Fig. 8
figure 8

GCPs error used to carry out the adjustment of the photogrammetric block. Z error is represented by ellipse colour. X, Y errors are represented by ellipse shape. Estimated GCP locations are marked with a dot. X—Easting, Y—Northing, Z—Altitude

Using the HBIM methodology

BIM is an intelligent process that relies on 3D models to generate and manage digital representations of the geometric, material and functional characteristics of a site. Once the model is created, it is possible to extract different views and obtain drawings of floor plans, elevations and sections [54]. The modelling was carried out using Autodesk Revit© 2020 software, one of the most used BIM software in the world. It includes a visual programming environment that allows designing with modelling and parametric drawing elements. The great contribution by this software was the introduction of several dimensions, namely 4D (Time), 5D (Cost), 6D (Sustainability), and 7D (Management and Maintenance) into the building models, thereby achieving interoperability through the use of different software and various disciplines [55] that communicate with each other through compatible formats. The Industrial Foundation Classes (IFC) data exchange format is the most widely used because it is an open and neutral standard maintained by BuildingSMART®. The Cloud-to-BIM process starts with the Autodesk ReCap® import of the dense point cloud obtained through photogrammetry in a *.las format. In this way, we could visualise the point cloud with the geometry of the scene, which allowed us to use it as a guide once the modelling began [56]. Once the point cloud had been processed, the next step was the realisation of the parametric model. In this context, the realisation of the model in a BIM environment is related to the creation of objects that represent building components, including geometric and non-geometric attributes and relationships. In this study, the model is created on the basis of previously captured historical information.

Another relevant issue was to define, before starting the 3D modelling, the level of graphic detail (Grade), which must be strictly related to the objectives of the model and to the level of accuracy of the metric survey. From a purely graphical point of view, according to [57] the identified model resolution grades can be divided into Grade 1 (coarse), Grade 2 (medium) and Grade 3 (fine), as shown in Fig. 9. According to the survey data and the accuracy obtained after processing, the modelling strategy in this study was oriented to the realisation of an adequate, final 3D representation, taking into account Grade 3.

Fig. 9
figure 9

3D modelling of the same building component according to various graphic details (Grade) [57]

To complete the modelling, it was necessary to create a library containing all the necessary parametric objects. This process was conducted manually because Revit does not have a tool for automatic object recognition. Currently, tools are being developed to automatically generate 3D geometries [58], but these are mainly adapted to contemporary elements that are not usually valid for historical heritage [59]. The automatic approach is not suitable to HBIM because it does not adequately describe the shape of historical buildings by using simple geometries. Therefore, plug-ins have to be used in order to scan to BIM. The plug-ins create a parametric object from metric data processing by using point cloud management. In this research, As-Built™ for Autodesk Revit® 2020.1, released by FARO®, was used as a perfect add-on for working with large point cloud surfaces because it integrates with the Revit interface. It features a wide range of evaluation tools for 3D laser scanning and photogrammetry data, with custom commands for modelling and detailing of BIM elements. Figure 10 shows the Scan-to-BIM with the As-Built for Revit process. As-Built for Revit significantly extends Revit’s point cloud capabilities. It creates walls quickly and accurately directly in the point cloud. The software automatically selects the most appropriate wall type based on the given wall thickness and has automated wall alignment to create rectangular floor plans (orthogonality) and continuous axial alignments, even on multiple floors. As-Built for Revit accurately places structural elements (beams and columns) in the point cloud because beam and column profiles can be automatically recognised. It allows the creation of a digital terrain model from the 3D coordinates and 3D model lines obtained from the point cloud. In addition, windows, doors, beams, columns, etc., can be placed directly in the point cloud using a real 3D point adjustment. 3D model lines and construction points can be created by using real 3D point snapping in the point cloud, independently from the Revit work plane. Working planes can be adjusted by selecting a single point or an unlimited number of points in the point cloud. Constraints, such as parallelism or orthogonality, can be optionally set. Lines and intersection points between adjusted planes, or even between model planes, can easily be determined.

Fig. 10
figure 10

Workflow Scan to BIM with AS- Built for Revit

Validation of the fit between the point cloud and the model using HBIM

Once HBIM has completed the model, it must be validated by measuring the distances between the dense point cloud obtained by photogrammetry and the mesh of the model. To carry out this procedure, the As-Built for Revit plugin was also used, which enabled the surface analysis. In the absence of a criterion adopted by the scientific literature for the validation of a parametric object [60], in this research the criterion for the validation of the parametric objects was to obtain an average of the distances around 0 (between − 0.05 and 0.05) and a standard deviation of less than 0.10 m, according to [43].

Photorealistic rendering of the model created through HBIM

Photorealistic representations of 3D models are very common in the field of heritage documentation, conservation and restoration. All the information corresponding to the colours, drawings, details and almost any type of graphic information applied to the model are very important processes because they guarantee an interesting and attractive final result and can be used for heritage documentation purposes, for example, one can create virtual tours and promotional videos of inaccessible, missing or distant heritage that show a simulation of the historical evolution of the building and the environment through virtual and augmented reality. Once the modelling is completed in Revit, it is necessary to add materials and textures to the model in order to obtain a photorealistic look. Specialised software such as Lumion© have powerful rendering engines and extensive libraries of vegetation and natural environments that allow to provide greater realism to the model and create high resolution renders [61]. The best way to export 3D models from Revit to Lumion is through the Lumion Plug-in for Revit. It includes two functionalities: to export to LiveSync, which makes it possible to visualise the model in Lumion in real time, and to export it as a Collada (*.dae) Revit file in order to constantly recharge it in Lumion.

Results

In the established workflow, the preliminary result necessary to carry out the modeling is the point cloud. Figure 11 shows the point cloud obtained in Agisoft Metashape and exported to Autodesk Revit.

Fig. 11
figure 11

Dense point cloud exported from Agisoft Metashape to Autodesk Revit

As per the methodology described in the previous section, all the characteristic elements were modelled from the point cloud, including the base topography of the surrounding terrain. Figure 12 shows an overlay of the point cloud and the model created through HBIM in Revit.

Fig. 12
figure 12

Detail of the overlay of the point cloud and model created through HBIM

Figure 13 shows the model created through HBIM in Revit. The model is created using a special library of parametric BIM objects that have been designed as a multidisciplinary and constantly evolving system. This system is used to administer, document, manage and digitally reconstruct heritage buildings. It produces technical documentation (floor plans, sections, details, projections, etc.) and quantitative and qualitative information.

Fig. 13
figure 13

Model created through HBIM in Autodesk Revit

Once the model has been created, it is necessary to validate the accuracy of the adjustment made with respect to the point cloud. Figure 14 shows the result obtained through the As-Built for Revit plugin.

Fig. 14
figure 14

Surface analysis of the model created through HBIM in As-Built for Revit

The model created through HBIM also contains the stratigraphic and typological relationships of the materials. These relationships, as well as the sequence that is generated, provide the necessary information to understand the constructive evolution of the building and its spatial, temporal and social contextualisation. The proper recording of these relationships, as well as the correct definition of the materials and construction systems of the historic building, become basic requirements of the graphic documentation as a means of safeguarding of a good part of the material cultural values, as shown in Fig. 15.

Fig. 15
figure 15

The dam’s materials and construction systems

Figure 16 shows several renderings of the photorealistic representation of the 3D model made with Lumion software, showing the virtual reconstruction of the dam and the administration building.

Fig. 16
figure 16

Rendering of the virtual reconstruction of the dam

Discussion

Accuracy of the photogrammetric project

According to [18], the error obtained in the processing of the photogrammetric project is below 3 cm. Most similar studies on other elements of cultural heritage do not evaluate the accuracy of the point cloud that supports HBIM. In others, for example [43], the accuracy is around 15 cm. Therefore, in this study the accuracy of the adjustment of the point cloud to the reality of the terrain is considered more than acceptable and is similar to that of TLS. The modelling was carried out using a point cloud obtained through different applications, concluding that the cloud obtained with Agisoft showed smaller differences (2 cm) than that obtained with TLS. We found no difference between either method to support HBIM. While TLS offers better results indoors and with fine details, UAV photogrammetry offers greater practicality and ease of use in large outdoor spaces. Although the accuracy obtained by both methods is similar, it is often necessary to use both in order to obtain a complete model of the building’s exterior and interior details.

Use of oblique and terrestrial images

The improvement in accuracy and detail of point clouds obtained by UAV photogrammetry, using oblique photography, has been demonstrated in numerous studies [43, 62, 63]. However, the use of terrestrial photographs makes more sense in buildings or in places where the UAV cannot fly freely due to the presence of obstacles. In this study, the photogrammetric survey was carried out using oblique flights at a short distance from the photographed object, without the need for terrestrial photographs. This is similar to the study developed by [62], who modelled a Benedictine monastery in Piedmont, Italy, using oblique photographs and SfM software. It can be concluded that in all cases the point clouds obtained were highly accurate.

Accuracy of the HBIM model

According to the scientific literature, there are no established limits to the accuracy of models created through HBIM with respect to the point cloud. In his study [31], states that the level of accuracy of information has to be chosen, related to the type of intervention and be as homogenous as possible in order to obtain a model that is easy to manage and understand. This study adopted the criterion established by [43], which is to obtain an average of distances around 0 (between − 0.05 and 0.05) between the point cloud and the parametric object with a standard deviation of less than 0.10 m. Figure 14 shows how most of the model is between these limits. It is necessary to take into account the presence of vegetation on the facing, which may cause small differences in some areas.

Conclusions

This research focused on the study of the validity of UAV-SfM photogrammetric methods to conduct topographical surveys that can serve as a basis for the virtual reconstruction of heritage. The low cost, flexibility and quality of the result make this tool essential in the study of forgotten buildings, such as the Isabel II Reservoir in Níjar (Almería, Spain). The continuous development of modelling techniques has produced new plug-ins, such as As-Built for Revit, that allow quick and semi-automatic conversion of point clouds into models through intelligent BIM. The modelling phase was completed using historical information on the reservoir, resulting in a complete model that incorporates graphic and alphanumeric information of the original state of this large infrastructure. The model of the Isabel II dam is essential, useful and valuable in order to safeguard this forgotten heritage and is a documental basis for future research and interventions. The model can be considered the reservoir’s documental core, which allows the interoperability of several disciplines within a common software environment. In addition, it is a flexible model that admits long transformations in the intervention. It should also be noted that the HBIM project incorporates lists of elements to obtain different data tables; it can be linked to cost databases within the same software or exported to time and cost management programs (4D and 5D, respectively) to obtain a restoration budget.