[postgis-users] ST_Union on empty polygon loses SRID
Darafei "Komяpa" Praliaskouski
me at komzpa.net
Fri Nov 26 23:18:38 PST 2021
Does not reproduce on my 3.2 and 3.1.4 installs:
10:17:37 [gis] > select postgis_full_version();
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│
postgis_full_version
│
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ POSTGIS="3.2.0dev 3.2.0beta1-23-g94d4588ac" [EXTENSION] PGSQL="140"
GEOS="3.10.0dev-CAPI-1.15.0" SFCGAL="1.3.8" PROJ="7.2.1" GDAL="GDAL 3.2.2,
released 2021/03/05" LIBXML="2.9.12" LIBJSON="0.15" LIBPROTOBUF="1.3.3"
WAGYU="0.5.0 (Internal)" TOPOLOGY RASTER │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
(1 row)
Time: 47,743 ms
10:17:43 [gis] > select ST_SRID(ST_Union(ST_GeomFromText('POLYGON EMPTY',
4283)));
┌─────────┐
│ st_srid │
├─────────┤
│ 4283 │
└─────────┘
(1 row)
Time: 1,531 ms
On Sat, Nov 27, 2021 at 7:34 AM Jonathan Schultz <jonathan at schultz.la>
wrote:
> Hello,
>
> I have found with a query that makes a union of geometries which
> includes an empty polygon produces a result without an SRID. For a
> trivial example:
>
> > => select ST_SRID(ST_Union(ST_GeomFromText('POLYGON EMPTY', 4283)));
> > st_srid ---------
> > 0
>
> This seems like a bug to me but maybe there is a good explanation?
>
> Thanks,
> Jonathan
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20211127/9e97bd3a/attachment.html>
More information about the postgis-users
mailing list