# EGMStream Webapp: EGMS Data Downstream Solution
## 2 Materials and Methods
### Webapp Interface and Relative Command in the Backend
For the GeoPackage and GeoJSON formats, the size limit is overcome by 600,000 points for products with time series and 5,000,000 points for products without time series. The last choice relates to the download option referring to maintaining or not the _.csv_ files, alongside the converted products by selecting either \"Yes\" or \"No\" (default) in the '_Also save CSV files_' option. Each setting selected triggers specific backend operations, where specific parts of code are activated or bypassed using a \"_for_\" loop or conditional statements like \"_if_\" and \"_else_\" [66]. Figure 2: Possible user settings within the webapp interface. Finally, users must specify a name for the output folder to store the converted file on the EGMStream server (\"_Output folder Name_\") and a valid email (\"_Email address_\") to which received the communication of conversion completed. The email will also contain the link to the output folder, enabling users to download the converted data, including the _.csv_ files, if required. Once all settings are configured and the required information is provided, users can start the conversion process by the \"Convert\" button, starting the process from the download of data to the sending of the email. Therefore, the first operation after the download involves the unzipping of data using the \"zipfile\" module [67; 68], which facilitates creating, reading, writing, appending, and listing the contents of the ZIP file. The unzipped data are stored as CSV (_.csv_) files containing all data and their information as a table in columns separated by commas. At this point, depending on the user choices, parts of the code are either activated or bypassed. If the user decides to crop the data on the uploaded AoI, a clipping function is executed after the download process. The clipping function, along with the subsequent data conversion process, relies on the \"pandas\" [55], \"geopandas\" [61], and \"shapely\" [62] modules for handling spatial data and geodatabases. The data conversion process adapts to user choices regarding the inclusion of time series (TS) and the desired output format, generating a Shapefile (_.slrp_), Geopackage (_.gpkg_), or GeoJSON (_.geojson_) data file. The three parts allowing the functionality of the EGMStream webapp, Python, HTML, and JavaScript, are deployed within a Docker container. A key benefit of web applications is that they do not require the app or computer to be actively running, ensuring data conversion continues even when the app is not in use. Furthermore, the webapp facilitates the reception of email notifications containing the converted data upon the completion of the conversion process. The \"flask-mail\" module provides tools for configuring and sending email with the download link for the converted data via an SMTP server [69]. The link received by email linking to the folder with the converted data remains active on the server for three days, ensuring sufficient temporary storage space for further processing tasks while maintaining an efficient archive system. Space management and automatic folder deletion after the expiry period are handled using the \"os\", \"time\", and \"shutil\" modules [70]. These modules enable interaction with the file system, retrieval of the current time, and deletion of directories and their contents. Users can obtain detailed information on input requirements, parameter settings, and user instructions via the \"_Read me_\" tab, which provides access to the EGMStream webapp user manual.