[postgis-tickets] [PostGIS] #4127: ST_Dimension returns 0 for empty GeometryCollection

PostGIS trac at osgeo.org
Thu Aug 9 13:37:46 PDT 2018


#4127: ST_Dimension returns 0 for empty GeometryCollection
-----------------------+---------------------------
  Reporter:  esparano  |      Owner:  pramsey
      Type:  defect    |     Status:  closed
  Priority:  medium    |  Milestone:  PostGIS 2.4.5
 Component:  postgis   |    Version:  2.4.x
Resolution:  fixed     |   Keywords:
-----------------------+---------------------------

Comment (by esparano):

 I have to strongly disagree with changing the docs versus changing the
 behavior of the code to match the docs. The dimension of a Point is 0
 because it is, mathematically, a 0-dimensional object. However, the
 dimension of an empty geometry is not actually 0. It's undefined. It makes
 more sense to return -1, like the function returns for NULL.

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