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

PostGIS trac at osgeo.org
Tue Jul 24 06:05:13 PDT 2018


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

Comment (by pramsey):

 The documentation seems to be out of date, as "null on empty" behaviour
 has been commented out...
 {{{
 postgis25=# select st_dimension('POINT EMPTY');
  st_dimension
 --------------
             0
 (1 row)

 postgis25=# select st_dimension('LINESTRING EMPTY');
  st_dimension
 --------------
             1
 (1 row)

 postgis25=# select st_dimension('POLYGON EMPTY');
  st_dimension
 --------------
             2
 (1 row)

 postgis25=# select st_dimension('GEOMETRYCOLLECTION EMPTY');
  st_dimension
 --------------
             0
 (1 row)
 }}}

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