<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.Stylwiadomocie-mail19
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="PL" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">The same situation is in Postgis 3.5.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">@</span><span lang="EN-US" style="color:black">Erik Wienhold – do you know when some fix might appear?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US">Best regards<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:18.0pt;text-indent:-18.0pt"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US">Łukasz Szałek<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">Od:
</span></b><span style="color:black">Erik Wienhold <ewie@ewie.name><br>
<b>Data: </b>wtorek, 15 października 2024 o 15:59<br>
<b>Do: </b>Łukasz Szałek <Lukasz.Szalek@tomtom.com><br>
<b>DW: </b>postgis-users@lists.osgeo.org <postgis-users@lists.osgeo.org><br>
<b>Temat: </b>Re: SRID lost in ST_UNION<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">[Nie otrzymujesz często wiadomości e-mail z ewie@ewie.name. Dowiedz się, dlaczego jest to ważne, na stronie
<a href="https://aka.ms/LearnAboutSenderIdentification">https://aka.ms/LearnAboutSenderIdentification</a> ]<br>
<br>
On 2024-10-15 12:14 +0200, Łukasz Szałek via postgis-users wrote:<br>
> 1)<br>
> PostgreSQL 15.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit<br>
> POSTGIS="3.3.2 4975da8" [EXTENSION] PGSQL="150" GEOS="3.11.1-CAPI-1.17.1" PROJ="7.2.1" LIBXML="2.9.1" LIBJSON="0.11"<br>
><br>
> Query:<br>
> select ST_SRID(ST_GeomFromText('POLYGON ((4.9882543 50.4415584, 4.9882543 50.4415586, 4.9882545 50.4415586, 4.9882545 50.4415584, 4.9882543 50.4415584))',4326)), st_srid(ST_UNION(ARRAY[ST_GeomFromText('POLYGON ((4.9882543 50.4415584, 4.9882543 50.4415586,
 4.9882545 50.4415586, 4.9882545 50.4415584, 4.9882543 50.4415584))',4326)]));<br>
> st_srid | st_srid<br>
> ---------+---------<br>
>     4326 |    4326<br>
> (1 row)<br>
><br>
><br>
> 2)<br>
> PostgreSQL 17.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3), 64-bit<br>
> POSTGIS="3.3.7 a0c7967" [EXTENSION] PGSQL="170" GEOS="3.13.0-CAPI-1.19.0" PROJ="9.5.0" LIBXML="2.9.13" LIBJSON="0.14" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"<br>
><br>
> Query:<br>
> select ST_SRID(ST_GeomFromText('POLYGON ((4.9882543 50.4415584, 4.9882543 50.4415586, 4.9882545 50.4415586, 4.9882545 50.4415584, 4.9882543 50.4415584))',4326)), st_srid(ST_UNION(ARRAY[ST_GeomFromText('POLYGON ((4.9882543 50.4415584, 4.9882543 50.4415586,
 4.9882545 50.4415586, 4.9882545 50.4415584, 4.9882543 50.4415584))',4326)]));<br>
> st_srid | st_srid<br>
> ---------+---------<br>
>     4326 |       0<br>
><br>
> Is there a regression between those versions?<br>
<br>
Yes, I see the same regression in 3.4.3 as well.  This is caused by [1]<br>
which sets SRID=0 [2] because the SRID has not been determined at this<br>
point.<br>
<br>
[1] <a href="https://trac.osgeo.org/postgis/ticket/5677">https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrac.osgeo.org%2Fpostgis%2Fticket%2F5677&data=05%7C02%7CLukasz.Szalek%40tomtom.com%7Ca695afcc41294588cada08dced218a42%7C374f80267b544a3ab87d328fa26ec10d%7C0%7C0%7C638645975535855008%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=oRHG9AeOjggODtwV8AZwG5%2Boq6Wl9%2BcFs%2Fof2jZaMHE%3D&reserved=0</a><br>
[2] <a href="https://trac.osgeo.org/postgis/browser/git/postgis/lwgeom_geos.c?rev=f37390b9cc4b33e8a7ec15e0396112fca19391c9#L659">
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftrac.osgeo.org%2Fpostgis%2Fbrowser%2Fgit%2Fpostgis%2Flwgeom_geos.c%3Frev%3Df37390b9cc4b33e8a7ec15e0396112fca19391c9%23L659&data=05%7C02%7CLukasz.Szalek%40tomtom.com%7Ca695afcc41294588cada08dced218a42%7C374f80267b544a3ab87d328fa26ec10d%7C0%7C0%7C638645975535881735%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=SFlNOLYkqr%2FTQNjEzAvH8%2FQHgI7OT2XSqE3e1rcve%2BE%3D&reserved=0</a><br>
<br>
--<br>
Erik<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>