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

PostGIS trac at osgeo.org
Thu Jul 29 15:01:37 PDT 2021


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

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 OK, this is changed in main at f885c3354. ST_GeometryN(empty) will return
 NULL for all values of N, which matches up with ST_NumGeometries(empty)
 returning 0 for all values of empty, collections and singletons both,
 since there's no in-range value of N when the count is 0.

 I have left the stable branches alone in the interests of preserving
 existing behaviour.

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