I am developing a mining sampling database. There will be many project specific, user created projections. Typically they will be Oblique Mercator defining a local coordinate projection system.

Does anyone have suggestions on managing a large number of custom SRIDS in PostGIS?

The easiest is to just add it to the public.spatial_ref_sys table but how will that complicate updates to PostGIS/PROJ versions? Also what would be the best large integers to start my custom SRIDS to avoid future conflicts?

Or would it be best to create a public.spatial_ref_sys_custom table? I am not sure that would be ideal since it would create numerous issues with on the fly st_transform() queries.

Has anyone else ran into this issue before?

1 Answer 1


To be able to use the custom projections with built-in PostGIS functions, they must be in the spatial_ref_sys table.

In theory, PostGIS updates should not touch your custom entries. In practice, if something were to go wrong during the update, you'd have backups, and in any case you should know how to add your custom SRIDs in case you need to set up a new server.

PostGIS allocates its own SRIDs below 910000, and reserves values above 998999 for internal use, so you can use the range between for custom SRIDs. The installation manual suggests the range 910000…910999, but you can go higher if you have more than one thousand custom projections.

  • 1
    Note that as srid is an int, it could technically go up to 2147483647. Also, note, that there is a check constraint, spatial_ref_sys_srid_check" CHECK (srid > 0 AND srid <= 998999), that would need to be changed. Mar 22, 2019 at 10:43

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.