I have a custom coordinates system that is:
- Not cartesian: The X-axis unit is
25m& Y-axis6.25m - Oblique: None of both axis' azimuth is North-South (
0°). X-axis goes54.2°& Y-axis324°. - Orthogonal: There
90°between both axis.
For instance if I have those 3 points (The first column is long/lat, the second is in the custom coordinates system):
SRID=4326;POINT(-85.647 21.318) <=> POINT(0 0)
SRID=4326;POINT(-85.599 21.353) <=> POINT(0 1000)
SRID=4326;POINT(-85.794 21.497) <=> POINT(1000 0)
Can I write a custom PROJ.4 text to use with ST_Transform?
Inspired from the PostGIS documentation's example, would something like that work?:
SELECT ST_AsText(
ST_Transform(
ST_GeomFromText('POINT(1000 1000)'), custom_proj4, 4326))
FROM (
SELECT
'?????????????????????????????????'::text AS custom_proj4
) AS data;
st_astext
POINT(-85.7467905609375 21.5321592956322)
I saw this good answer for the oblique part but it is with a cartesian metric grid.
Edit:
I simplified for the example, but the real spatial reference is:
SRID=3795;POINT( 7217.670 193658.490) <=> POINT( 901 501)
SRID=3795;POINT(-7052.270 213450.630) <=> POINT(1877 501)
SRID=3795;POINT(66458.500 266451.180) <=> POINT(1877 15001)
SRID=3795;POINT(80728.440 246659.040) <=> POINT( 901 15001)
The most eastern corner is POINT(901 501). It is located in the caribbean, between Mexico and Cuba.

I already know how to convert it in my application but I'd like to do it in PostGIS by storing the whole spatial reference in spatial_ref_sys.proj4text and using ST_Transform. It could be a transformation from the custom grid to SRID 4326 or from the custom grid to geographical coordinates.