Description:
The current /file_upload endpoint handles basic GIS file uploads and stores them into PostGIS via handle_gis_file(). However, the implementation requires several enhancements to make it production-ready and support more file types and edge cases.
Current Functionality
- Accepts a single GIS file upload.
- Processes the file via ogr2ogr.
- Creates a table named layer_ in the public schema.
- Allows downloading the table data as CSV via /table_list/{table_name}.
- Lists uploaded layers via /all_tables.
limits
- Only supports a limited set of file types (likely .geojson, .shp, .kml, etc.).
- No validation of file content or geometry type.
- No error reporting to the user beyond a generic 500 error.
- Doesn't prevent duplicate uploads or name collisions.
- No asynchronous background processing for large files.
- Doesn't store file metadata (original filename, upload time, format, CRS).
- Security concerns with raw SQL string interpolation.
- No user feedback on processing progress or status.
Description:
The current /file_upload endpoint handles basic GIS file uploads and stores them into PostGIS via handle_gis_file(). However, the implementation requires several enhancements to make it production-ready and support more file types and edge cases.
Current Functionality
limits