## 2 Materials and Methods
### Implementation of the Proposed Methodology
Cesium is a powerful JavaScript library that allows the creation of interactive 3D visualizations on a globe, ideal for visualizing data from sensors or GIS systems. To efficiently manage geospatial and non-geospatial data, PostgreSQL with the PostGIS extension enabled was chosen. PostGIS extends the functionality of PostgreSQL by adding support for spatial objects, allowing complex operations such as geospatial analysis, geocoding, and spatial queries. Vector data (for example, polygons and lines), raster data (satellite images), and data from sensors were inserted into the geodatabase (Figure 2). To ensure smooth interaction with the database and enable querying capabilities, a backend server was implemented. This server exposes a RESTful API for communication between the frontend (Cesium) and the database. It allows for the real-time retrieval of geospatial data, performs analytical operations, and displays the results directly on the map. To have an accurate three-dimensional representation of the study area, a flight was carried out with a DJI Matrice 350 RTK drone (DJI, Shenzhen, China) equipped with a LiDAR sensor. This UAV features a diagonal wheelbase of 895 mm and a weight, without batteries, of about 3.77 kg. The operating frequencies are between 2.4000-2.4835 GHz, 5.150-5.250 GHz, and 5.725-5.850 GHz. The maximum horizontal speed is 23 m/s, and the maximum flight autonomy is 55 min [44]. After the flight, the point cloud was pre-processed within the CloudCompare software (version 2.13.2), and the 3D model was created within the Metashape software (version 2.2.0). Once the modeling part was completed, the model, exported in.fbx format, was converted into.gltt format to ensure its compatibility with Cesium. The conversion process included transforming the mesh into a format compatible with WebGL, managing the tex  
Figure 2: Sensors\({}^{\prime}\) acquisition system: (**a**) complete system for the acquisition of sensor data; (**b**) part of the sensors installed in the city center of Reggio Calabria. ture maps, and translating the materials used in the model into a scheme that Cesium could interpret correctly. The GLTF format was chosen because it is designed to be lightweight and easily downloadable from the web. It is more compact than other formats, such as FBX, and is suitable for contexts that require real-time streaming of 3D models, such as web applications and augmented and virtual reality platforms, which are the foundation for the creation of the digital twin and the metaverse. GLTF is closely linked to WebGL technology, and being a JSON-based format, it is natively compatible with Javascript libraries such as CesiumJS and Three.js, which are used in 3D rendering platforms based on WebGL. Furthermore, for correct data integration within web visualization, it supports a standard representation of materials through the PBR (Physically Based Rendering) standard. Obviously, the 3D model was georeferenced, i.e., aligned to the correct geospatial coordinate system (EPSG:4326 WGS84), so it could be correctly positioned on the surface representing the study area within Cesium. Table 1 is a summary of the data source used in this work. The different geospatial data collected in the first phase were then superimposed on this 3D model. In particular, for the light pollution analysis, data collected using GPS instrumentation were processed, followed by a clustering operation based on the parameters of diffuse radiation emitted by the lighting devices. For this purpose, the DBSCAN algorithm was used, which enabled the identification of areas with the highest levels of light pollution during nighttime hours. This approach helped pinpoint the regions that could have the most significant impact on CO\({}_{2}\) concentration. For the hydrogeological risk analysis, data on flow rate, elevation, and land cover for the study area were processed. These data served as input to the 2D hydraulic model used for simulation, capable of reproducing the dynamics of water flow: HEC-RAS (v. 6.6).