wiki:DevWikiEmptyGeometry

Version 1 (modified by pramsey, 15 years ago) ( diff )

--

The semantics of NULL are well defined for us already in SQL standards. However, in the world of Geometry / Geography we have another entity which is not quite NULL nor quite fully defined: the empty geometry. Empty geometries can be created with things like intersection calls that have have no intersection, e.g. ST_Intersect('POINT(0 0)', 'POINT(1 1)') == POINT EMPTY. So, in the presence of empty, how should functions behave?

  • ST_Union(geometry, empty) == geometry
  • ST_Union(empty, empty) == empty
  • ST_Difference(geometry, empty) == geometry
  • ST_Difference(empty, geometry) == empty
  • ST_Distance(geometry, empty) == NULL
  • ST_DWithin(geometry, empty, tolerance) == FALSE
  • ST_Contains(geometry, empty) == FALSE
  • ??? ST_Contains(empty, empty) == FALSE
  • ST_Intersects(geometry, empty) == FALSE
  • ??? ST_Intersects(empty, empty) == FALSE
  • ??? ST_Disjoint(empty, empty) == FALSE
  • ??? ST_Disjoint(geometry, empty) == FALSE
  • ST_IsSimple(empty) == FALSE
  • ST_IsValid(empty) == TRUE
Note: See TracWiki for help on using the wiki.