Opened 10 days ago

Last modified 10 days ago

#5747 assigned defect

ST_Length returns perimeter for CurvePolygon

Reported by: dbaston Owned by: dbaston
Priority: medium Milestone: PostGIS 3.4.3
Component: postgis Version: 3.4.x
Keywords: Cc:

Description

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.

Change History (1)

Note: See TracTickets for help on using tickets.