Opened 8 months ago

Closed 7 months ago

#5483 closed defect (wontfix)

Document ST_NumGeometries behaviour with empty geometries

Reported by: Mike Taves Owned by: robe
Priority: medium Milestone: PostGIS 3.4.1
Component: documentation Version: master
Keywords: Cc:

Description

The docs for ST_NumGeometries do not describe the behavior with empty geometries. These currently return 0 for all empty geometry types, which is different than GEOS as shown in GEOS GH-949.

Xref #4736 and DevWikiEmptyGeometry

Change History (2)

comment:1 by robe, 7 months ago

I know this was a change trying to figure out why we did it. I think it was to resolve a crash issue.

comment:2 by robe, 7 months ago

Resolution: wontfix
Status: newclosed

It looks to be described to me.

The ST_NumGeometries description says:

https://postgis.net/docs/manual-3.4/ST_NumGeometries.html and

https://postgis.net/docs/manual-dev/ST_NumGeometries.html

The description says:

"Returns the number of elements in a geometry collection (GEOMETRYCOLLECTION or MULTI*). For non-empty atomic geometries returns 1. For empty geometries returns 0. "

I do notice it's not described on the short description on this page:

https://postgis.net/docs/manual-dev/ , which just says:

"Returns the number of elements in a geometry collection"

I feel like the added sentence on the front page to describe something people only accidentally use is not worth adding an additional sentence.

Note: See TracTickets for help on using tickets.