Bug: Unable to distinguish between SDO_GEOMETRY nil and NULL shapes in the ArcSDE C and Java APIs


NULL geometry is geometry that does not exist. Nil geometry exists, but is empty.

For a description of NULL and nil geometries and how ArcSDE represents them in Oracle Spatial, see the link in the Related Information below.


This is a known problem in versions prior to 9.2.

In the ArcSDE C and Java APIs, each geometry returned from a query to a client application includes a NULL indicator. If this indicator is true, the program knows that the geometry is NULL and need not try to interpret the content of the geometry. If the indicator is false, meaning the geometry is not NULL, but there are no geometric elements in the geometry, the geometry is nil. The function SE_shape_is_nil would return true for this geometry.

However, in releases of ArcSDE prior to 9.2, the NULL indicator returned to the client application is set to true when an SDO_GEOMETRY is either nil or NULL.


No workaround exists for this in releases prior to 9.2.

In ArcSDE 9.2, the NULL indicator for SDO_GEOMETRY is consistent with that of other geometry storage types, allowing applications to distinguish between NULL and nil SDO_GEOMETRY using this indicator. The indicator is set to false for nil features.

It is possible that this change could affect the behavior of some user-authored C or Java API programs that treat differently nil and NULL geometries.

    Related Information