$ show OSGeo/PROJ
PROJ is a generic coordinate transformation library that converts coordinates between different coordinate reference systems (CRS). It includes a comprehensive catalog of map projections (over 190), datum shifts (grid-based, Helmert, TIN), and time-dependent deformation models. The library provides both a C API and a C++ ISO19111-compliant object model, along with command-line tools (proj, cs2cs, cct, projinfo, geod, gie, projsync). The architecture is a core transformation engine that dispatches through function pointers, with a pipeline system for chaining operations. The library relies on a bundled SQLite database (proj.db) containing EPSG definitions, and supports grid files for high-accuracy transformations. It is heavily used in geospatial software (e.g., GDAL, QGIS) and compiles on Linux, macOS, Windows, and WebAssembly through Emscripten.
The LLM identified 4 files worth highlighting for reuse:
A standalone C library for solving geodesic problems on an ellipsoid (direct, inverse, polygon area). It is self-contained, with no dependencies on PROJ internals, and can be extracted for use in any project requiring geodesic computations. The implementation is derived from GeographicLib and is known for its accuracy and performance.
A thread-safe LRU cache template with configurable capacity and elasticity. It is fully self-contained (only depends on standard C++ library) and can be extracted for use in any project needing a bounded, thread-safe cache. The design allows setting a target size and a margin for eviction decisions.
A generic quadtree template for 2D spatial indexing, used by the TIN shift transformation for efficient triangle lookup. It is self-contained (only standard library) and can be extracted for any project needing point location in a 2D subdivision. Supports custom bounding box and node splitting strategies.
A template-based implementation of time-dependent deformation models that uses grids to represent displacements. It separates the grid representation (Grid, GridSet) from the evaluation logic via the EvaluatorIface template parameter. This pattern allows the same deformation model logic to be reused with different grid storage backends (e.g., GeoTIFF, GTX).