[postgis-devel] [PostGIS] #1778: ST_CollectionExtract: inconsistent EMPTY results
PostGIS
trac at osgeo.org
Thu Apr 19 14:00:17 PDT 2012
#1778: ST_CollectionExtract: inconsistent EMPTY results
----------------------+-----------------------------------------------------
Reporter: strk | Owner: pramsey
Type: defect | Status: closed
Priority: medium | Milestone: PostGIS 2.0.1
Component: postgis | Version: 2.0.x
Resolution: invalid | Keywords:
----------------------+-----------------------------------------------------
Changes (by pramsey):
* status: new => closed
* resolution: => invalid
Comment:
Actually the behaviour is consistent: when passed a non-collection, the
function just echoes it back. This is true with both empties and non-
empties.
{{{
postgis20=# select
ST_AsText(ST_CollectionExtract('GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1))',
2));
st_astext
----------------------------
MULTILINESTRING((0 0,1 1))
(1 row)
postgis20=# select ST_AsText(ST_CollectionExtract('LINESTRING(0 0, 1 1)',
2));
st_astext
---------------------
LINESTRING(0 0,1 1)
(1 row)
}}}
The return for non-empty collections is always a homogeneous multi-
something, even if the input collection has only one member.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1778#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-devel
mailing list