List all EPSG projections to serve it on the client side

GDAL is using Proj and Proj since version 6 keeps the definitions or coordinate reference systems in a small SQLite database that is named "proj.db". Therefore the most natural place for building your list is to query them from the proj.db database. PostGIS in not a bad alternative because spatial_ref_sys is filled with data from proj.

Python can be used for making SQL queries from SQLite but I attach couple of screenshots from DB Browser for SQLite for showing what kind of structure the proj.db has. The tables that are needed are "geodetic_crs" and "projected_crs" and from those fields "auth_name", "code", and perhaps "name".

enter image description here

enter image description here


The PostGIS Spatial Reference Systems table can be found here:

https://github.com/postgis/postgis/blob/master/spatial_ref_sys.sql?raw=true

(source on GitHub: https://github.com/postgis/postgis/blob/master/spatial_ref_sys.sql)

Perhaps you can parse that out and/or use SQL to convert it to JSON?