## 2 Materials and Methods
### Implementation of the Proposed Methodology
The backend then processes the data, enabling the visualization of results through a WebGIS interface that facilitates interactive, real-time use of geospatial information. Figure 2a shows an example of a sensor installed in a city context, highlighting its position in the urban ecosystem, while Figure 2b presents a map that displays the distribution of sensors during the monitoring period, allowing observation of the coverage of the territory for real-time data collection. Communication between the microcontroller and the platform is in this way ensured using backend software. Through the appropriate libraries, the data can be displayed through graphs, dashboards, and other visualizations. Data preprocessing, cleaning, and integration, as known, are fundamental steps to ensure effective use of data and to make the analyses both consistent and robust. Regarding data preprocessing, the first phase consists of data collection and aggregation. The acquired satellite data were in GeoTIFF format, the drone data were in LAS format, while the data collected by sensors were provided in JSON format. Preprocessing included temporal alignment (through a data interpolation process to align them to a common time interval) and geospatial alignment, projecting all data into a common coordinate reference system (WGS84). For some of the data, spatial resolution alignment was necessary to standardize the resolution across all datasets. Regarding data cleaning, this phase involved the process of removing anomalous data and outliers from sensor data. The integration process involved the rasterization of sensor data to enable analysis alongside satellite data and the vectorizing data obtained from hydrogeological risk modeling software. The integration also included geospatial overlay through data loading from databases and the use of appropriate scripts in the frontend for visualization. Clean and integrated data were stored in spatial databases, while the visualization was generated using the Cesium JS viewer (version 1.87). The prototype and experimental system implemented must also simulate physical dynamics, such as changes in the elements that constitute the virtual environment, including the deterioration of infrastructure, changes in vegetative cover, and other evolving phenomena. In this context, Cesium enables the application of animations to models representing these changes over time. This can simulate various dynamic processes, such as vehicle movement, pedestrian flow, urban growth, and the evolution of climate conditions [50]. Furthermore, Cesium can integrate advanced spatial analysis tools to calculate, for example, the travel time between two points based on traffic, evaluate the impact of certain extreme events on the territory, and create simulations of the physical world's changes in user-defined scenarios. These capabilities are supported by algorithms designed to interpret the inherent characteristics and natural dynamics of the phenomena being analyzed. Subsequently, in Figure 3, the IT structure of the urban digital twin developed is presented. The database, as previously mentioned, was loaded using the PostgreSQL (version 17.4) application, a powerful open-source relational database management system that offers a wide range of advanced features for data management and processing. For the specific needs of this project, the PostGIS (version 3.5.0) extension was also enabled. This PostgreSQL extension allows for the management of geospatial data, that is, data containing information about a geographic position. Thanks to PostGIS, it is possible not only to store georeferenced data (such as geographic coordinates), but also to perform complex spatial operations, such as calculating distances, searching for geometries within certain areas, and manipulating geographic shapes like polygons and lines. Using PostgreSQL with the PostGIS extension offers significant advantages over other geospatial data management systems.