[postgis-tickets] [PostGIS] #4736: ST_NumGeometries is zero for GeometryCollection with empty parts

PostGIS trac at osgeo.org
Thu Jul 29 13:55:13 PDT 2021


#4736: ST_NumGeometries is zero for GeometryCollection with empty parts
-------------------------+---------------------------
  Reporter:  Mike Taves  |      Owner:  strk
      Type:  defect      |     Status:  assigned
  Priority:  medium      |  Milestone:  PostGIS 3.0.4
 Component:  postgis     |    Version:  2.4.x
Resolution:              |   Keywords:
-------------------------+---------------------------

Comment (by pramsey):

 Meanwhile, there's some extra behavior lying around in more obscure types.
 Returns NULL on geometryn for empty input. There's a simplicity to that
 and it does match with other out-of-range behaviour of geometryn, so if we
 *do* think that numgeometries(empty) == 0, then geometryn(empty) should be
 NULL and not empty.
 {{{
 postgis32=# SELECT 'patchN_01', ST_AsEWKT(ST_patchN('POLYHEDRALSURFACE
 EMPTY'::geometry, 1));
  ?column?  | st_asewkt
 -----------+-----------
  patchN_01 |
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4736#comment:6>
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