pg.ddx.io  postgis-devel@lists.osgeo.org mailing list archive (PostGIS development)  
help / color / mirror / Atom feed
From: Regina Obe <lr@pcorp.us>
Subject: WKT2 in PostGIS
Date: Wed, 9 Sep 2026 11:47:43 -0400
Message-ID: <00a801dd4072$8e2d0f30$aa872d90$@pcorp.us> (raw)
In-Reply-To: <CADRrdKswPsFhrhwAFnK+vC3ZfZPS+Tz6Ed3CaAm16XDj6-z35g@mail.gmail.com>
References: <CADRrdKswPsFhrhwAFnK+vC3ZfZPS+Tz6Ed3CaAm16XDj6-z35g@mail.gmail.com>

Javier,

 

We?ve been hesitant to touch this table to increase it. I know someone else requested this.

Our feeling is the proj.db should be the authoritative source for most of these.

 

I there a reason you wouldn?t add this to proj directly?  The issue with putting it in postgis spatial_ref_sys is if you use your system beyond postgis

You?d have to duplicate the entry anyway.

 

But I am and I think others were concerned for many users especially those who don?t need these defs elsewhere, it?s easier to edit postgis.spatial_ref_sys,

 

PostGIS for since I think 3.0 has delegated most stuff to the proj.db table and just uses spatial_ref_sys auth_srid to look up the record in proj.db and largely ignores what is in srtext/proj4text columns.

 

I have to check the auth_name.  I think we used to ignore what was in auth_name and assumed any auth_srid matched up with auth_name = epsg, but that I think changed somewhere across the line.

 

Paul,

 

If per chance you have remember or have the energy to chime in on this, that would be much appreciated.

 

Thanks,

Regina

 

From: Javier Jimenez Shaw <j1 at jimenezshaw.com> 
Sent: Wednesday, September 9, 2026 7:09 AM
To: postgis-devel at lists.osgeo.org
Subject: WKT2 in PostGIS

 

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/0fb03f22/attachment.htm;



view thread (6+ messages)  latest in thread

Message-ID: <00a801dd4072$8e2d0f30$aa872d90$@pcorp.us>
Permalink:  ../00a801dd4072$8e2d0f30$aa872d90$@pcorp.us/

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: postgis-devel@lists.osgeo.org
  Cc: lr@pcorp.us
  Subject: Re: WKT2 in PostGIS
  In-Reply-To: <00a801dd4072$8e2d0f30$aa872d90$@pcorp.us>
  References: <CADRrdKswPsFhrhwAFnK+vC3ZfZPS+Tz6Ed3CaAm16XDj6-z35g@mail.gmail.com> <00a801dd4072$8e2d0f30$aa872d90$@pcorp.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox