<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font face="monospace">Hi,</font></p>
    <div class="moz-cite-prefix">On 27/10/2025 14:11, Regina Obe wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:000e01dc4743$446653d0$cd32fb70$@pcorp.us">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator"
        content="Microsoft Word 15 (filtered medium)">
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
        {font-family:Aptos;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;}div.WordSection1
        {page:WordSection1;}</style>
      <div class="WordSection1">
        <p class="MsoNormal">I vaguely recall someone complaining about
          this 15 years ago, but not since then.<o:p></o:p></p>
      </div>
    </blockquote>
    <p><font face="monospace">I guess the ones complaining at the time
        was because French IGN defined their own SRS and chose for very
        unknown reasons to allocate their own reeeeaaaaaally long SRID,
        therefore not compatible with PostGIS limitations.</font></p>
    <p><font face="monospace">And in the end there was a lot more
        complaints against IGN for doing that, than against PostGIS for
        its limitations.</font></p>
    <p><font face="monospace">I do not know who your authority is, but
        there is a good chance that it is easier for them to change
        their ID than PostGIS to lift the constraint, given the
        consequences. Good luck with that though.</font></p>
    <p><font face="monospace">Vincent<br>
      </font></p>
    <div class="moz-cite-prefix"><br>
    </div>
    <blockquote type="cite"
      cite="mid:000e01dc4743$446653d0$cd32fb70$@pcorp.us">
      <div class="WordSection1">
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Paul can better speak for the reason, but I
          think it was because we needed to fit it into the header of
          the geometry and still have enough bits left for the geometry
          type etc and 2 bits extra for growth.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">So I would say it’s very unlikely we’d lift
          this restriction.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div
style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
          <div>
            <div
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
              <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"> G.
                  Allegri <a class="moz-txt-link-rfc2396E" href="mailto:giohappy@gmail.com"><giohappy@gmail.com></a> <br>
                  <b>Sent:</b> Monday, October 27, 2025 5:46 AM<br>
                  <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
                  <b>Subject:</b> Why PostGIS sets a max value for SRID
                  IDs?<o:p></o:p></span></p>
            </div>
          </div>
          <p class="MsoNormal"><o:p> </o:p></p>
          <div>
            <p class="MsoNormal">Hello list,<o:p></o:p></p>
            <div>
              <p class="MsoNormal"><o:p> </o:p></p>
            </div>
            <div>
              <p class="MsoNormal">I'm working on two projects where
                custom CRSs, with custom authorities and IDs are
                provided.<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal">Both projects use IDs with numbers
                beyond SRID_USR_MAX=998999 [1], which is hardcoded in
                PostGIS for the spatial_ref_sys id field values.<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal">I can use the auth_id, of course, but
                having to reassign an id < 998999 is a bit
                problematic for two reasons:<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal"><o:p> </o:p></p>
            </div>
            <div>
              <p class="MsoNormal">- I have custom transformation
                pipelines defined inside the proj.db, where the custom
                IDs are defined for CRSs. <o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal">- other softwares (QGIS, Geoserver)
                can use the custom IDs but they cannot match the
                geometries SRIDs returned PostGIS<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal"><o:p> </o:p></p>
            </div>
            <div>
              <p class="MsoNormal">I wonder if there's a
                technical reason for the SRID_USR_MAX constant, and if
                there's any change to remove it in the future.<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal">And I wonder if others have faced the
                problems I'm having due to this, and what are the
                solutions they came up with.<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal"><o:p> </o:p></p>
            </div>
            <div>
              <p class="MsoNormal">Thanks,<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal">Giovanni<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal"><o:p> </o:p></p>
            </div>
            <div>
              <p class="MsoNormal">[1] <a
href="https://github.com/postgis/postgis/blob/5dc95f1bc3047b048128616d4543b603b8bbdca7/configure.ac#L1554"
                  moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/postgis/postgis/blob/5dc95f1bc3047b048128616d4543b603b8bbdca7/configure.ac#L1554</a><o:p></o:p></p>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>