WKT2 in PostGIS

Javier Jimenez Shaw j1 at jimenezshaw.com
Wed Sep 9 04:09:04 PDT 2026


Hi

In the new PROJ release 9.9.0 that will be released soon, the latest
version of EPSG is included.
All European realizations are included in the WKT2 of any CRS using the
ETRS89 datum ensemble.
This is an example of EPSG:25830, with 4264 chars.
 https://epsg.org/crs/wkt/id/25830
If you format it a bit nicely it goes up to 4874. And this is just an
example.

I know that this one can be expressed just with the code. However some
people (including me) need to define a CRS that is not defined in EPSG. For
that we are using WKT2.

I realized today that in PostGIS the table containing the CRS has fields
limited to 2048 chars, in particular "srtext".
https://postgis.net/docs/using_postgis_dbmanagement.html#spatial_ref_sys_table

CREATE TABLE spatial_ref_sys (
  srid       INTEGER NOT NULL PRIMARY KEY,
  auth_name  VARCHAR(256),
  auth_srid  INTEGER,
  srtext     VARCHAR(2048),
  proj4text  VARCHAR(2048)
)

If I have to define a CRS with WKT2 because I need some features only
available in WKT2, it may not work in PostGIS. Am I right?

Thank you.
Javier.

PS this was first asked in
https://lists.osgeo.org/pipermail/proj/2026-September/012183.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20260909/ffbfc907/attachment.htm>


More information about the postgis-devel mailing list