Opened 5 months ago

Closed 4 months ago

Last modified 4 months ago

#5747 closed defect (fixed)

ST_Length returns perimeter for CurvePolygon

Reported by: dbaston Owned by: dbaston
Priority: medium Milestone: PostGIS 3.5.0
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 (4)

comment:2 by dbaston, 4 months ago

Resolution: fixed
Status: assignedclosed

comment:3 by robe, 4 months ago

Milestone: PostGIS 3.4.3PostGIS 3.5.0

comment:4 by Regina Obe <lr@…>, 4 months ago

In 4b674d3/git:

Add missing NEWS note for ST_length curvepolygon
behavior change
References #5747 for PostGIS 3.5.0
References https://github.com/postgis/postgis/pull/776

Note: See TracTickets for help on using tickets.