#5378 closed defect (fixed)

SRID of geography is lost during ST_Buffer(geography..) operation

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 3.2.4
Component: postgis Version: 3.3.x
Keywords: Cc:

Description

I tested this on a PostGIS 3.1.7 RDS system as well as my POSTGIS="3.3.2 3.3.2" [EXTENSION] PGSQL="150" GEOS="3.11.1-CAPI-1.17.1" PROJ="7.2.1" LIBXML="2.9.9" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.5.0 (Internal)"

and the behavior is the same:

SELECT ST_SRID( ST_Buffer(ST_GeomFromText('POINT(-94 29.53)', 4269)::geography, 12)::geometry )

The answer here is 4326 instead of the expected 4269. This works fine

SELECT ST_SRID(ST_GeomFromText('POINT(-94 29.53)', 4269)::geography::geometry)

the SRID returned is 4269, so seems to be something going on in the ST_Buffer geography function that is losing the original SRID

Change History (10)

comment:1 by darkblueb, 14 months ago

osgeolive ol16 alpha returns 4326

 POSTGIS="3.3.2 4975da8" [EXTENSION] PGSQL="140" GEOS="3.11.1-CAPI-1.17.1" PROJ="9.1.1" LIBXML="2.9.13" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"

comment:2 by Paul Ramsey <pramsey@…>, 14 months ago

Resolution: fixed
Status: newclosed

In bef103b/git:

Preserve input SRID in SQL wrapper to synthetic buffer, closes #5378

comment:3 by robe, 14 months ago

Resolution: fixed
Status: closedreopened

I think we need to backport this fix to at least PostGIS 3.3.3. Given the amount of changes, not sure it makes sense to backport any further than that. I'll close this out once I've backported.

comment:4 by Paul Ramsey <pramsey@…>, 14 months ago

In 15a1827/git:

Retain SRID through ST_Buffer(geography) call, references #5378

comment:5 by Paul Ramsey <pramsey@…>, 14 months ago

In 36b162b/git:

Retain SRID through ST_Buffer(geography) call, references #5378

comment:6 by robe, 14 months ago

Now all we need is a test and then we can close this out :)

comment:7 by robe, 13 months ago

Milestone: PostGIS 3.1.9PostGIS 3.2.4

comment:9 by Regina Obe <lr@…>, 13 months ago

In c5f2076/git:

Add test for PostGIS 3.3.3
References #5378

comment:10 by Regina Obe <lr@…>, 13 months ago

Resolution: fixed
Status: reopenedclosed

In 0919b134/git:

Add test for PostGIS 3.4.0
Closes #5378

Note: See TracTickets for help on using tickets.