SRID lost in ST_UNION
Paul Ramsey
pramsey at cleverelephant.ca
Tue Oct 15 08:17:21 PDT 2024
I’ll have a fix in source control before lunch. A release might be a month or so away, as we collect a bunch of fixes into a single patch release.
P
> On Oct 15, 2024, at 8:15 AM, Łukasz Szałek via postgis-users <postgis-users at lists.osgeo.org> wrote:
>
> The same situation is in Postgis 3.5.0
> @Erik Wienhold – do you know when some fix might appear?
>
>
> Best regards
> Łukasz Szałek
>
>
> Od: Erik Wienhold <ewie at ewie.name <mailto:ewie at ewie.name>>
> Data: wtorek, 15 października 2024 o 15:59
> Do: Łukasz Szałek <Lukasz.Szalek at tomtom.com <mailto:Lukasz.Szalek at tomtom.com>>
> DW: postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org> <postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org>>
> Temat: Re: SRID lost in ST_UNION
>
> [Nie otrzymujesz często wiadomości e-mail z ewie at ewie.name <mailto:ewie at ewie.name>. Dowiedz się, dlaczego jest to ważne, na stroniehttps://aka.ms/LearnAboutSenderIdentification ]
>
> On 2024-10-15 12:14 +0200, Łukasz Szałek via postgis-users wrote:
> > 1)
> > 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
> > 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"
> >
> > Query:
> > 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)]));
> > st_srid | st_srid
> > ---------+---------
> > 4326 | 4326
> > (1 row)
> >
> >
> > 2)
> > 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
> > 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)"
> >
> > Query:
> > 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)]));
> > st_srid | st_srid
> > ---------+---------
> > 4326 | 0
> >
> > Is there a regression between those versions?
>
> Yes, I see the same regression in 3.4.3 as well. This is caused by [1]
> which sets SRID=0 [2] because the SRID has not been determined at this
> point.
>
> [1] 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 <https://trac.osgeo.org/postgis/ticket/5677>
> [2] 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 <https://trac.osgeo.org/postgis/browser/git/postgis/lwgeom_geos.c?rev=f37390b9cc4b33e8a7ec15e0396112fca19391c9#L659>
>
> --
> Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20241015/57bd3b4a/attachment.htm>
More information about the postgis-users
mailing list