A METHODOLOGY FOR CAVE FLOOR BASEMAP SYNTHESIS FROM POINT CLOUD DATA: A CASE STUDY OF SLAM-BASED LIDAR AT LAS CUEVAS, BELIZE

: Creating cave maps is an essential part of cave research. Traditional cartographic efforts are extremely time consuming and subjective, motivating the development of new techniques using terrestrial lidar scanners and mobile lidar systems. However, processing the large point clouds from these scanners to produce detailed, yet manageable “maps” remains a challenge. In this work, we present a methodology for synthesizing a basemap representing the cave floor from large scale point clouds, based on a case study of a SLAM-based lidar data acquisition from a cave system in the archaeological site of Las Cuevas, Belize. In 4 days of fieldwork, the 335 m length of the cave system was scanned, resulting in a point cloud of 4.1 billion points, with 1.6 billion points classified as part of the cave floor. This point cloud was processed to produce a basemap that can be used in GIS, where natural and anthropogenic features are clearly visible and can be traced to create accurate 2D maps similar to traditional cartography.


INTRODUCTION
For speleology and archaeological research, creating representations such as 2D maps of natural caves and the anthropogenic features inside is challenging but essential work. Maps not only allow navigation and documentation of major features and the extent of the cave, but in archaeological contexts, maps allow researchers to localize artifacts and features to conduct spatial analyses integral to understanding how caves were used in the past. However, the cave environment presents unique challenges to both humans and mapping equipment. First, caves are dark, making visibility challenging for humans and passive sensors (such as cameras), requiring careful consideration for artificial illumination and potentially lighting consistency. Second, access is often challenging in caves, with uneven, sloped floors, low ceilings, and complex 3D obstructions. This makes it challenging for humans to navigate the environment and restricts viable options for sensor placements. Third, humidity can interfere with optics. In * Corresponding author addition to these challenges, caves are also difficult to represent, due to their c 1 omplex morphology (Moyes et al., 2023).
Using traditional cartographic techniques, measuring distance, azimuth, and elevation from station to station, remains the standard approach to cave mapping. Modern developments include use of high accuracy total stations, or the more portable "smart disto" (Trimmis, 2018). However, total station surveys are cumbersome and time consuming. One published example of high accuracy 3D total station mapping of a cave is described by James, as an extraordinary effort spanning between 1987and 2005 (James et at., 2009). To create maps from these instruments, a survey is conducted, measuring discrete points to represent the extent of the cave wall and location of major features, with the full cave wall and other features sketched in. The process of sketching features is subjective, from deciding what to include in the map to how to represent them. The accuracy of these maps depends on the skills of the person making the sketch. This work can be time consuming, depending ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume X-M-1-2023 29th CIPA Symposium "Documenting, Understanding, Preserving Cultural Heritage: Humanities and Digital Technologies for Shaping the Future", 25-30 June 2023, Florence, Italy on the level of detail that is needed, requiring considerable field time, and depending on the size and geometric complexity could take multiple field seasons (Moyes et al., 2023).
Because archaeologists always need to balance time and research funds, there is a need to develop new approaches to generate accurate and detailed maps more quickly. To address this, researchers have been employing new sensors, such as terrestrial lidar or terrestrial laser scanning (TLS) to document archaeological sites (Garrison et al., 2016;Lerma et al., 2010;Rissolo et al., 2019;Weber and Powis, 2014). Terrestrial lidar is a tripod mounted sensor that directs a laser around the environment, recording the 3D coordinates of the surfaces it can see. Each scan takes a few to several minutes to complete, depending on the instrument. To cover larger areas, or if the scanner's view is occluded, multiple scans must be taken from different locations to ensure adequate coverage. In the cave environment, occlusions are common, and finding accessible tripod placements can be a challenge. In addition, terrestrial lidar presents a data challenge, as managing the 3D point cloud of billions of points is problematic, and needs to be decimated or transformed into another format for analysis (Gallay et al., 2015;Lindgren and Galeazzi, 2013;Hoffmeister et al., 2015). Supinsky presents one such approach, generating a mesh representation from the point cloud, isolating the cave floor, and providing a shaded surface visualization of the cave floor for cartographic production (Supinsky et al., 2022).
An emerging approach to scanning archaeological sites is the use of mobile lidar, in particular, simultaneous localization and mapping (SLAM)-based lidar systems (Corrao et al., 2021;Spano, 2019;Ullman et al., 2023). Unlike terrestrial lidar, which relies on stationary placement of the sensor, SLAM-based lidar is moved through the environment, continuously collecting point cloud data and inertial measurements, which are combined to estimate the trajectory of the sensor and the geometry of the environment in real time. This trajectory can be refined in post processing software on a computer, but is still subject to drift over longer distances, which can be mitigated somewhat by "closing the loop". In caves, mobile lidar offers several benefits (Giordan et al., 2021;Moyes et al., 2023;Ullman et al., 2023;Zlot and Bosse, 2014). It enables efficient data capture of the complex cave environment by naturally walking through the cave and around potential occlusions. In areas where more detail is desired, the operator can simply slow down to collect more points. This approach shares the same data challenges as terrestrial lidar, producing a large 3D point cloud which must be processed for creating a more manageable format.
The 3D point clouds gathered by lidar systems in caves present unique challenges in visualizing their contents and transforming them to more digestible formats, such as a basemap to present an overview of the site. Unlike point clouds gathered of built environments, where floors and ceilings are generally roughly planar and parallel, there is no simple way of segmenting the varying curvature of the cave ceiling from the floor, which itself has curvature and varies in height. This is a necessary step in order to produce a useful plan view, as many features of interest in caves lie on the floor. Supinsky has presented an approach for classifying the cave floor from a point cloud of 144 million points, using the rasterized form as a base map for making maps in ArcGIS (Supinsky et al., 2022).
In this paper we present a methodology for rapid data acquisition in the field and a processing workflow to generate a GIS compatible 2D base map of the Cave at Las Cuevas, a ritual ancient Maya cave site located in in Western Belize. The site has been under investigation by the Las Cuevas Archaeological Reconnaissance since 2011. In the 2022 field season, our team scanned the cave system using the Emesent Hovermap, a SLAMbased lidar system designed for the mining industry. The workflow we propose begins with collecting point cloud data, processing the data by combining point clouds, classifying the cave floor, and finally generating raster visualization products for use in GIS. Our method allows researchers to generate accurate and detailed raster base maps that can be used to create traditional vector maps essential for classifying and analyzing natural and anthropogenic features and other archaeological materials.

CASE STUDY
Las Cuevas is a Maya archaeological pilgrimage site occupied in the Late Classic period (AD 700-900). It consists of a smallmedium size center with 2 plazas and 26 structures. The site was constructed on top of a large cave system (figure 2) that is comprised of a massive Entrance Chamber and an additional10 chambers with a loop length of 335m. The cave entrance is accessed via a sinkhole. The Entrance Chamber (figure 1) is the largest chamber in the system, at 108 m long, 40 m wide, and up to17 m in height in some areas. An underground river surfaces at the base of a sinkhole in the chamber's center. The entrance is heavily modified with architectural features including platforms, terraces, stairs, and retaining walls (Moyes 2020;Moyes et. al, 2012;Moyes et al. 2015). The entrance is well-lit moving to twilight at the north end. A constructed wall (Wall 1) creates a formal entrance to the tunnel system. Inside the system, we encounter breakdown (collapsed material from the cave ceiling), Figure 2. Point cloud of Las Cuevas surface site and cave system, colorized by elevation, with the surface site in reds and greens, and the cave system in blue.
ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume X-M-1-2023 29th CIPA Symposium "Documenting, Understanding, Preserving Cultural Heritage: Humanities and Digital Technologies for Shaping the Future", 25-30 June 2023, Florence, Italy blockages (natural or artificial material accumulated to block access between chambers), varied ceiling heights, and increasingly restricted passages until we reach a window overlooking the Entrance Chamber.

Data acquisition
The Hovermap is a lidar based mobile mapping system that utilizes a SLAM algorithm to create a cohesive point cloud from being moved around the environment. It features a spinning lidar capturing a full sphere of 300,000 points/second with a range of 0.4-100m and a stated accuracy of +-3cm. It can be used handheld, where the operator can walk, crawl, or climb around the environment and point the scanner at areas of interest, as well as fixed to a backpack or vehicle, or mounted on a drone (figure 3). When paired with the DJI Matrice 300, the Hovermap simultaneously maps the environment and provides position hold, obstacle avoidance, and waypoint mapping capabilities in GPS-denied environments. This allows for safe flight within caves, where pilot skill would otherwise be challenged by depth perception in the dark and manual flight corrections without GPS. Scanning the cave system took 38 scans over 2 days with 2 additional days of redundant testing effort. The team also captured redundant scans to test different acquisition methodologies.
The team performed 3 drone flights. 2 flights were flown to scan the Entrance Chamber of the cave, and another was flown outside to capture the context of the sinkhole leading to the entrance. Due to restricted ceiling height or horizontal clearance, drone flights were not attempted in any of the other chambers. The team also collected 35 handheld scans, with redundant scans to test different acquisition strategies. To ensure overlap, the team collected a scan in each chamber and another capturing the interface between chambers. In the entrance chamber, multiple scans (including drone flights) were taken because of the size of the chamber and the many architectural features. In total, the point cloud representing Las Cuevas contained 4.1 billion points.

Data processing and Basemap generation
The first step in data processing is to process each raw scan from the sensor to estimate the SLAM trajectory and generate a point cloud. We used Emesent Processor version 1.6.2 (Emesent, 2022) with the standard profile, outputting each scan as an .las point cloud. These individual point clouds were scaled, roughly leveled, but were not north-oriented.
As is common with automotive grade lidar used in these scanners, the scans contain a lot of noise, particularly at longer ranges. We addressed this issue by applying the "Noise Filter" in CloudCompare 2.13 (CloudCompare, 2022). The noise filter fits a plane to a neighborhood of points and removes points that exceed a specified distance from the plane, effectively reducing the "thickness" of the noise surrounding a measured surface. We chose a neighborhood radius of 5cm, a relative error of 0.5 (half the average reprojection error of the neighbors) and removed isolated points.  Next, the individual point clouds need to be aligned into a single cohesive bundle. Due to the complex geometry of the cave, fully automated alignment (as with terrestrial lidar software) was not possible. Our initial attempt was manually aligning pairs of scans in CloudCompare, and attempting to refine the alignment using Emesent Processor's merge functionality, as well as CloudCompare's iterative closest point algorithm, but both failed to converge. Therefore, we turned to Leica Register360 (Leica Geosystems, 2022), a terrestrial lidar processing software, which allowed us to visualize and interactively manually align each pair of point clouds in 6 degrees of freedom (figure 4a). Due to the inaccuracy of the inertial measurement unit (IMU) in the Hovermap, we needed to adjust tilt as well as the position and horizontal angle of each scan. Once the manual alignment was refined, Register360 could optimize the alignment. In some cases, moving points, such as trees needed to be deleted to allow the alignment to succeed. With all the scans aligned, these were exported individually to reduce the rendering burden of loading all the scans simultaneously.
Following this, to reveal the cave floor, the ceiling was removed. Automated classification of either the cave ceiling or the cave floor did not produce sufficiently accurate results due to the geometric complexity of the speleothems, tight cave geometry, gaps in coverage, and anthropogenic features. We chose to manually classify points in Agisoft Metashape 2.0.0 (Agisoft, 2022) by assigning points corresponding to the cave floor in the ground class and all other points to another class (figure 4b). To achieve this, we loaded the aligned scans, grouped them by region to reduce the rendering burden, then interactively selected points to apply classification in a highly manual and iterative process. This iterative process began by viewing the scan from the bottom and assigning visible points to the ground class. Next, the point cloud was rotated to examine the remaining walls and ceilings in detail to apply appropriate classification. This process was slow and labor intensive and represents the majority of time spent in this workflow.
To this point, the point cloud is scaled, but lacks orientation or positioning in a global reference frame. As none of the monuments from previous surveys in the cave could be recovered, we chose to align to a global coordinate system using a 2013 National Center for Airborne Laser Mapping (NCALM) aerial lidar survey (Chase et al., 2014) covering the field station by the cave, where the building roofs provided robust features. We manually aligned the drone based scan of from the field station to the site with the aerial lidar survey and refined the alignment using the iterative closest point algorithm in CloudCompare 2.13 (CloudCompare, 2022). The resulting transformation matrix was applied to the remaining point clouds to transform their coordinates into the same coordinate system. This brought the data into the same UTM zone 16N coordinate system from the aerial lidar data.
Although the point cloud enabled immersive 3D interaction, interacting with 3D data requires specialized software, such as Viscore (Petrovic et al., 2014), CloudCompare (CloudCompare, 2022), or Potree (Schuetz, 2016). In general, 3D point clouds do not easily integrate with existing GIS and in particular field workflows, which may involve printing paper copies of reference maps. To transform the 3D point cloud into a 2D raster format, we generate a digital elevation model (DEM) representing the height of each of the ground points. To increase visibility of ground features, we calculated a multidirectional hillshade as well as an ambient occlusion texture in the Terrain Shading plugin in QGIS (Cuckovic, 2021). These visibilityenhanced rasters thus served as the basemap for tracing the cave map and features within in a GIS environment.  Figure 5 describes the methodology that we propose. This workflow is divided into 3 phases: data acquisition, 3D point cloud processing, and 2D raster processing. First, an acquisition strategy is planned and executed to collect scans of the area of interest. Second, a point cloud is generated from each of the raw scans, and is denoised, aligned to a common local coordinate system, classified to isolate the ground points, and finally georeferenced to a global coordinate system. Third, the ground points are transformed into a digital elevation model raster, which is augmented by generating both hillshade and ambient occlusion textures for better visualization of the ground features. These resulting basemap layers can be utilized and interpreted in a GIS environment.

RESULTS AND DISCUSSION
From the 38 scans performed, the result is a point cloud of 4.1B points, with 1.6B points as part of the cave floor. Bundle registration error was reported as 1cm with overlap of 66%. The processing workflow ended in a raster basemap of 94427x68028 pixels and a ground sampling distance of 4.5mm covering the 335 m length of the cave. Figure 6 shows the resulting hillshaded basemap with detailed views of selected features. The extent of the cave floor is visible as the edge between the basemap data and the white background. Inside the cave, the enclosed white voids represent features that reach the cave ceiling. Some white areas, such as the area around the surface site in the southeast, are areas without scan data, so the extent of the fully scanned area must be taken into account to avoid misinterpreting the edge of the scan data as the edge of the cave.
In the basemap, various features on the cave floor were clearly visible. For instance, the architectural features of the platforms in the back of the Entrance Chamber were viewed easily, as were the depressions left by previous excavations. In fact, some of these features were more obvious in the basemap than when surveyed in-person. We can also appreciate the dimensions of the built walls and how they restrict potential paths of travel through the cave. In addition to architectural features, natural features were also visible. We can easily differentiate between smooth, mud-covered areas and areas with breakdown. Natural features, such as speleothems and rimstone are also clearly rendered. In the back of the cave, a modern cave line is visible. However, this is due to the contrast with the background below, as small ceramic fragments <10cm which litter the floors in some of the chambers are not visible at all in the scan data, despite being clearly visible when walking through the cave. Another limitation of the basemap is that it does not represent ceiling heights, so identifying which areas a human could walk through would require additional information, through ceiling heights overlaid in GIS, examination of cross sections, or directly in the 3D point cloud.
All these features can be traced and digitized into GIS to create a vector 2D map of the cave analogous to those sketched in Instead, points are impartially measured, and the subjective element of which features to digitize happens after data collection, allowing multiple interpretations from experts in different fields.
In figure 7b, the cave perimeter shows much more detail than in the hand drawn map (figure 7a). We also can see that the stones at the edges of the platforms are more scattered than is shown in the previous map. All the architecture depicted in the hand drawn map is visible in the basemap. The platform shapes look different, which may be due to measurement technique, or could represent actual change over time. Other than major features and geometry, many of the items depicted in the hand drawn map cannot be viewed in the basemap, as they require in-person ground-truthing. These can be overlaid on top of the basemap in GIS.
Based on our experience scanning and processing the data from Las Cuevas, we can suggest some specific data acquisition optimizations which make the processing easier. First, the area of interest should be scouted and an acquisition strategy planned to divide the area into discrete scans based on the size and complexity of the areas to scan. Second, when planning neighboring scans, sufficient overlap between the scans should be considered carefully. In the handheld configuration, few points are captured behind the operator. As a result, walking around the perimeter of the chamber in a single loop facing forward may not capture all the sides of the features. When combining 2 overlapping scans, this can manifest as seeing one side of a column in one scan, and the opposite side of the same column in the other, which does not actually provide overlapping geometry to align. Another issue is that the quality of the point cloud depends on the range to the scanned surface. Increasing the measurement distance results in more noise and decreased point density, which presents challenges when combining with shorter range scans which are denser and have less noise. We suggest retracing a portion of the trajectory, including the sensor orientation from the previous scan to ensure that overlapping geometry is captured from the same point of view and at a similar scale. Finally, when scanning, the number of people present in the cave during the scan should be minimized. As SLAM-based lidar continuously acquires point data from all around, it is difficult to avoid being caught in the scans, and any movement will result in additional "ghost" points. It is difficult to precisely remove people's legs and feet from the ground classification, as they are in direct contact with the ground.

CONCLUSIONS
SLAM-based mobile lidar is a promising technique for rapidly scanning cave environments. We presented a workflow for building GIS compatible basemaps from large scale point clouds to inform mapmaking or contextualize geospatial data within caves. In less than a week of fieldwork, we collected 3D measurements of the Las Cuevas cave system which previously took 3 field seasons with traditional cartography methods, which represents a significant reduction in time and human effort. The measurements themselves, although limited by the accuracy of the SLAM algorithm, represent an unbiased physical measurement of the space at a level of detail and accuracy higher than achievable with traditional cartography and sketching. The process of distilling the overwhelming amount of 3D point cloud data into a usable basemap still requires human judgement, but the complete data are available for reinterpretation depending on research needs.
In the interpretation of the resulting basemap, it is clear that larger features, both natural and anthropogenic, are visible. However, the data collected by SLAM-based lidar should be treated with care, similarly to remotely sensed data, as the identity of features cannot be confirmed without in-person ground-truthing. In addition, the level of detail is insufficient to provide data in the artifact scale, and cannot provide information on material composition, but the basemap can be used in combination with other information which is already plotted in GIS. This is a good place to start to be able to make maps for future research investigations.
Institute at the University of California, San Diego, the University of California, Merced (UCM), Academic Senate, and the UCM Center for Humanities for funding the field work and laboratory components of this research. This research was supported by a National Science Foundation Major Research Instrumentation Award to Moyes and Rissolo (#2117877) to purchase the Hovermap system. We would also like to express our appreciation and thanks to our in-country partners Gonzalo Pleitez for being our number one scanner, Luis Mai our newest project member, and Don Antonio Mai our local guide, mentor, and friend. Thank you also to the staff of the Cultural Heritage Engineering Initiative.