[PROJ] WKT2 in PostGIS

Greg Troxel gdt at lexort.com
Wed Sep 9 04:46:47 PDT 2026


Javier Jimenez Shaw via PROJ <proj at lists.osgeo.org> writes:

> In the new PROJ release 9.9.0 that will be released soon, the latest
> version of EPSG is included.
> As I already mentioned, 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.

Is this a change that happens from proj 9.8.1 to 9.9.0?

I find including all realizations in the WKT for the ensemble a bit
much.  I can see the argument that the ensemble has to specify the set,
vs being able to search the database for CRSes that say they are
ensemble members, and that currently those members don't reference the
ensemble.   And that either approach would work, but this is the one
EPSG has chosen.  Is that how you see it?

I see WGS84 is like this too:  https://epsg.org/crs/wkt/id/4327
but that is just over 1 kB.

> 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?

I don't follow "have to define".   I'd have to lookup sql rules, but I
would expect that postgis, when built with 9.9.0, would run into a build
failure because of inserting a row with a string that exceeds the
varchar length.

Or is postgis using wkt1, and those are smaller?  And it's only >2048 if
you add a custom srs to the table?

I am currently dealing with regressions in postgis-3.7.0rc2, and
upstream seeming to think that it's ok if users can't build some things
because they can download built versions.  At some point soon, I expect
to locally update to the 9.9.0 rc, and can try to build postgis against
it.

> Anybody from PostGIS team here?

I used to be on postgis-devel@ but after suggesting [LLM output not be
allowed in the codebase, more or less] I was, more or less, accused of a
code of conduct violation because, apparently to some, LLMs are people
too, worthy of CoC protection.  So I'm not any more.


More information about the PROJ mailing list