st_srid lost in st_union
Paul Ramsey
pramsey at cleverelephant.ca
Tue Jan 7 09:22:10 PST 2025
Sorry, no, it looks like due to an oversight the fix was applied to earlier branches, but not to 3.5, so 3.5.1 didn’t get it. It’s a one-liner in case you want to apply it yourself.
https://github.com/postgis/postgis/commit/5b990cc7f4d91560aea78b5fd4b7656a398d2eb8
Meanwhile, I pull apply it so it lands in 3.5.2.
P
> On Jan 7, 2025, at 9:12 AM, Łukasz Szałek via postgis-users <postgis-users at lists.osgeo.org> wrote:
>
> Hi all
> I have used postgres 17.2 with postgis 3.5.1
> POSTGIS="3.5.1 48ab069" [EXTENSION] PGSQL="170" GEOS="3.13.0-CAPI-1.19.0" PROJ="9.5.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.orgUSER_WRITABLE_DIRECTORY=/var/lib/pgsql/.local/share/proj DATABASE_PATH=/usr/proj95/share/proj/proj.db" (compiled against PROJ 9.5.1) LIBXML="2.9.13" LIBJSON="0.14" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" TOPOLOGY
> As it should already fix the issue of loosing st_srid while doing st_union.
> However when doing :
> 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)])) ;
> again it is 4326 v 0.
> Can someone confirm that fix was released in 3.5.1 ?
> Best regards
> Łukasz Szałek
More information about the postgis-users
mailing list