I have some extravagant local spatial reference system and I have a lot of data stored in some old legacy system. Now I want to import this data to my Postgresql/Postgis database. On the client side I'm using JavaScript OpenLayers 3 library (if it matters), on the server side I'm used to storing geometry data with srid 3857, so my tables with layer data have such constraints:
CONSTRAINT enforce_dims_geom_layer_1_ CHECK (st_ndims(geom) = 2),
CONSTRAINT enforce_srid_geom_layer_1_ CHECK (st_srid(geom) = 3857)
So, if I have this legacy data, with some coordinates in a local reference system, how can I approach this problem to get a formula like:
+proj=longlat +ellps=bessel +towgs84=595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408 +no_defs
spatial_ref_systable.