<div dir="ltr"><div>Hi</div><div><br></div><div>Maybe I was not clear on my initial explanation. Let me develop it.</div><div><br></div><div>Most of the cases a user will use a CRS from the EPSG. There are well know ones like 4326, 32612 or 25830. That is covering many users. Cool.</div><div>However, not every CRS is in EPSG. There are "infinite" CRSs, just playing with the parameters of the projections. And WKT2 gives even more options.</div><div>One typical case is a site calibration or site localization, where the CRS is defined particularly for a location, like a construction site. There is a talk in FOSS4G2023 about it with PROJ.</div><div>In those cases, the EPSG catalog is useless, and the user can define it with WKT2. If I understood correctly, that would be a user defined CRS.</div><div><br></div><div>There is the potential problem with the size of "srtext". The WKT2 that defines the CRS can have more than 2048 chars. (In understand that PostGIS is supporting WKT2. PROJ does for years) The example of EPSG:25830 was just an example on how can the WKT2 grow. It was already very verbose (compared to WKT1) before the new addition of realizations to ETRS89.</div><div><br></div><div>As Paul says, probably changing to TEXT is the simplest solution. I don't know the possible consequences.</div><div><br></div><div>Thank you</div><div>Javier.</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, 9 Sept 2026 at 17:49, Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Why wouldn’t we just change those column definitions from varchar(N) to text? <br id="m_-4603232611088335102lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Sep 9, 2026, at 8:47 AM, Regina Obe <<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>> wrote:</div><br><div><div style="font-family:HelveticaNeue;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">Javier,<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">We’ve been hesitant to touch this table to increase it. I know someone else requested this.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">Our feeling is the proj.db should be the authoritative source for most of these.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">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<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">You’d have to duplicate the entry anyway.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">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,<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">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.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">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.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">Paul,<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">If per chance you have remember or have the energy to chime in on this, that would be much appreciated.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">Thanks,<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">Regina<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="border-width:medium medium medium 1.5pt;border-style:none none none solid;border-color:currentcolor currentcolor currentcolor blue;padding:0in 0in 0in 4pt"><div><div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(225,225,225) currentcolor currentcolor;padding:3pt 0in 0in"><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><b><span style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span style="font-size:11pt;font-family:Calibri,sans-serif"><span> </span>Javier Jimenez Shaw <<a href="mailto:j1@jimenezshaw.com" target="_blank">j1@jimenezshaw.com</a>><span> </span><br><b>Sent:</b><span> </span>Wednesday, September 9, 2026 7:09 AM<br><b>To:</b><span> </span><a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a><br><b>Subject:</b><span> </span>WKT2 in PostGIS<u></u><u></u></span></div></div></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">Hi<br><br>In the new PROJ release 9.9.0 that will be released soon, the latest version of EPSG is included.<br>All European realizations are included in the WKT2 of any CRS using the ETRS89 datum ensemble.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">This is an example of EPSG:25830, with 4264 chars.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"> <a href="https://epsg.org/crs/wkt/id/25830" style="color:blue;text-decoration:underline" target="_blank">https://epsg.org/crs/wkt/id/25830</a><u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">If you format it a bit nicely it goes up to 4874. And this is just an example.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">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.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">I realized today that in PostGIS the table containing the CRS has fields limited to 2048 chars, in particular "srtext".<br><a href="https://postgis.net/docs/using_postgis_dbmanagement.html#spatial_ref_sys_table" style="color:blue;text-decoration:underline" target="_blank">https://postgis.net/docs/using_postgis_dbmanagement.html#spatial_ref_sys_table</a><br><br><span style="font-family:"Courier New"">CREATE TABLE spatial_ref_sys (<br>  srid       INTEGER NOT NULL PRIMARY KEY,<br>  auth_name  VARCHAR(256),<br>  auth_srid  INTEGER,<br>  srtext     VARCHAR(2048),<br>  proj4text  VARCHAR(2048)<br>)</span><br><br>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?<br><br>Thank you.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">Javier.<u></u><u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif"><u></u> <u></u></div><div style="margin:0in;font-size:12pt;font-family:Aptos,sans-serif">PS this was first asked in <a href="https://lists.osgeo.org/pipermail/proj/2026-September/012183.html" style="color:blue;text-decoration:underline" target="_blank">https://lists.osgeo.org/pipermail/proj/2026-September/012183.html</a></div></div></div></div></blockquote></div><br></div></blockquote></div>