Opened 12 years ago

Closed 12 years ago

Last modified 3 years ago

#560 closed defect (fixed)

Centroid of EMPTY is a COLLECTION rather than POINT

Reported by: strk Owned by: geos-devel@…
Priority: major Milestone: 3.3.5
Component: Default Version: 3.3.4
Severity: Unassigned Keywords:
Cc:

Description

Not very important, but as ST_Buffer is guaranteed to return an areal geometry (POLYGON EMPTY in the empty case) I guess Centroid should also return a typed POINT no matter emptyness (for consistency)

Change History (5)

comment:1 by strk, 12 years ago

Summary: GEOSGetCentroid EMPTY returns COLLECTION EMPTY rather than POINT EMPTYCentroid of EMPTY is a COLLECTION rather than POINT

comment:2 by strk, 12 years ago

Resolution: fixed
Status: newclosed

r3678 in 3.3 branch (for 3.3.5) - r3679 in trunk (for 3.4.0)

comment:3 by strk, 12 years ago

Milestone: 3.4.03.3.5

comment:4 by mdavis, 3 years ago

It looks to me like centroid of POLYGON EMPTY is null, not POINT EMPTY. Same for interiorPoint.

The fix on this ticket only applies to the C API. The fix should be pushed down into the C++ code.

comment:5 by pramsey, 3 years ago

See #1088

Note: See TracTickets for help on using tickets.