In our app we are using several CRS - one of them is a custom one. I'd like to turn it into a proper CRS that PostGIS can fully support (e.g. administering valid transformations on it with something like ST_Transform, etc)

How would one do that?

I couldn't find any reference on this online. I found one for Oracle here - seems to be very detailed, transparent and straightforward process. What would be an alternative of this process in case of PostGIS?

  • 1
  • @ziggy from what I see answers in that thread are about adding coordinate system that is missing from spatial_ref_sys table, but is already defined somewhere else (on spatialreference.org perhaps?). That's not what I'm looking for. I have totally made up coordinate system and want to properly add it to spatial_ref_sys.
    – jayarjo
    Nov 11, 2020 at 8:54

1 Answer 1


Just add a row to the spatial_ref_sys table.

The most important column is proj4text, which describes the projection for the PROJ library. (Despite the name, the latest PostGIS uses the latest version of PROJ.)

I do not know if the srtext value is actually necessary, but you should be able to create it with gdalsrsinfo.

Also see Managing custom projections and Would it be worthwhile to use the PostGIS extension for custom planets?

  • What about srtext? Is it derived from proj4text?
    – jayarjo
    Nov 11, 2020 at 8:57
  • It should be possible to derive it from the PROJ string, but I think PROJ has more features than what is defined in the WKT specification.
    – CL.
    Nov 11, 2020 at 10:47
  • I was wondering if specifying both is required, or having proj4text would be enough?
    – jayarjo
    Nov 12, 2020 at 18:11
  • PostGIS itself uses the PROJ string.
    – CL.
    Nov 12, 2020 at 19:06
  • Stumbled upon this quote: The use of PROJ strings to describe a CRS is considered as legacy (one of the main weakness of PROJ strings is their inability to describe a geodetic datum, other than the few ones hardcoded in the +datum parameter), here: proj.org/development/quickstart.html So maybe srtext is actually preferrable.
    – jayarjo
    Nov 14, 2020 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.