[postgis-tickets] [PostGIS] #3569: ST_CollectionHomogenize sometimes returns reference to argument
PostGIS
trac at osgeo.org
Thu Jun 2 20:28:29 PDT 2016
#3569: ST_CollectionHomogenize sometimes returns reference to argument
----------------------+---------------------------
Reporter: dbaston | Owner: pramsey
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.2.3
Component: postgis | Version: 2.2.x
Resolution: | Keywords:
----------------------+---------------------------
Comment (by mwtoews):
Here's a simplified version of the issue:
{{{
WITH cluster AS (
SELECT ST_Polygonize(ST_MakeEnvelope(1, 2, 3, 4)) AS geom
)
SELECT ST_GeometryType(geom),
ST_CollectionHomogenize(geom)::box2d,
ST_CollectionHomogenize(geom::text)::box2d
FROM cluster;
-[ RECORD 1 ]-----------+----------------------
st_geometrytype | ST_GeometryCollection
st_collectionhomogenize | BOX(0 0,3 4)
st_collectionhomogenize | BOX(1 2,3 4)
}}}
The error is shown from the second field, where the X and Y coords are 0.
A workaround is shown in the last example, where the geometry is
recreated.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3569#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list