Select to view content in your preferred language

Define "is empty" in the ST_GEOMETRY documentation

436
0
10-31-2023 09:28 AM
Status: Open
Labels (1)
Bud
by
Honored Contributor

Regarding the isEmpty ST_GEOMETRY SQL function

ST_IsEmpty returns 1 (Oracle and SQLite) or t (PostgreSQL) if the ST_Geometry object is empty; otherwise, it returns 0 (Oracle and SQLite) or f (PostgreSQL).

It's not clear what "empty" means in that context. From my testing, it seems like an empty geometry can either be:

  1. Shape is not null, and geometry is not null (geometry is Nil/zero-vertex), or
  2. Shape is not null, but geometry is null

In other words, the shape is not null, and the geometry is either zero-vertex or null. 

But that's just a guess on my part. Could the documentation be enhanced so that we know what "empty" indicates?

Original post: What does "is empty" mean?

Tags (2)