Update data preparation pipeline for native sf and Leaflet optimization
The Shiny application has been migrated to the sf library. Currently, legacy sp objects are being converted to sf at runtime using sf::st_as_sf() during the readRDS() process in global.R.
To improve application startup performance and map responsiveness, the data preparation pipeline should be updated to save sf objects directly into the .rds files, removing the need for on-the-fly conversion.
Required Tasks: The data preparation script should be updated to:
- Convert all spatial objects to native
sfformat. - Project all spatial data to
WGS84 (EPSG:4326). - Save finalized objects directly as
.rds.
Final Cleanup:
Once the new data files are deployed, the sf::st_as_sf() conversion wrappers will be removed from global.R. This will significantly reduce the computational overhead during the application initialization phase.