[PostGIS] #5747: ST_Length returns perimeter for CurvePolygon

PostGIS trac at osgeo.org
Wed Jun 19 06:29:54 PDT 2024


#5747: ST_Length returns perimeter for CurvePolygon
---------------------+---------------------------
 Reporter:  dbaston  |      Owner:  dbaston
     Type:  defect   |     Status:  assigned
 Priority:  medium   |  Milestone:  PostGIS 3.4.3
Component:  postgis  |    Version:  3.4.x
 Keywords:           |
---------------------+---------------------------
 Although the doc for ST_Length states that "For areal geometries 0 is
 returned", ST_Length returns the perimeter for CurvePolygon geometries.
 This leads to the following confusing result:

 {{{
 select st_length('MULTISURFACE (((0 0, 1 0, 1 1, 0 1, 0 0)), CURVEPOLYGON
 (CIRCULARSTRING (10 10, 11 11, 12 10, 11 9, 10 10)))');
      st_length
 -------------------
  6.283185307179586
 }}}

 I will submit a PR to have ST_Length return 0 for CurvePolygons.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5747>
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