[postgis-devel] [PostGIS] #548: st_numgeometries(geom) returns NULL when geom is not multi
PostGIS
trac at osgeo.org
Thu Jul 1 01:20:43 PDT 2010
#548: st_numgeometries(geom) returns NULL when geom is not multi
----------------------+-----------------------------------------------------
Reporter: giohappy | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 1.5.2
Component: postgis | Version: 1.5.X
Keywords: |
----------------------+-----------------------------------------------------
Maybe I'm doing something worng but when I run the following query:
'''select ST_GeometryN(geom, generate_series(1,ST_NumGeometries(geom))'''
I receive a single, empty, result when geom is not a multi-geometry.
I would expect it to returned the same, single, geometry in case it is not
multi.
I have a table with both multi and geom. In such case I have to force to
multi with this:
'''select ST_GeometryN(''multi''(geom),
generate_series(1,ST_NumGeometries(''multi''(geom)))'''
but it is a useless overhead...
Giovanni
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/548>
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