-
cmd
: Contains individual folders for different commands. -
pkg
: Houses reusable packages potentially useful in other projects. -
internal
: For private application code not intended for external use. -
scripts
: Includes useful scripts for building, testing, and more.
- A
-o_<type>
convention is used to allow for multiple outputs across subcommands. - An in-memory SQLite database is attached in read-only mode, ensuring the input database is not altered.
- Batch inserts through a single goroutine are employed to minimize concurrency issues with SQLite and to reduce the number of round trips. This is necessary since consistency is desired over speed.
- A single SQL query with rc_exist and fim_exist columns is relied upon, allowing the database to handle processing instead of in-memory go logic.
- CSV rows are written one by one to avoid substantial memory usage at the end of processing.
- Specified output files, even if empty, are generated to keep API consistent.
- Atomic writes with a temporary file are performed for CSVs so no partial CSVs remain if errors occur.
- Local directories are not processed with gdal_ls, preserving fast local operations and avoiding unnecessary dependencies.