BUG

Spatial Type for Oracle: SDE.ST_Is3D returns 0 instead of 1 on geometries with Z values on AIX/Oracle10g and HP Tru64/Oracle9i

Last Published: April 25, 2020

Description

The SQL function SDE.ST_Is3D should return 1 when called with an SDE.ST_GEOMETRY geometry that contains elevation (Z) values. SDE.ST_Is3D incorrectly returns 0 on IBM AIX with Oracle 10g and HP Tru64 with Oracle 9i.

Cause

This is a known issue.

Workaround

Use SDE.ST_ASTEXT to retrieve a CLOB text string that represents the geometry type and look for a capital 'Z' in that string, using the Oracle INSTR function.

The following are two examples that show the results from using the Oracle INSTR function:

In the first example, the geometry does contain the Z dimension and thus the INSTR returns a non-zero value, the offset to the first 'Z' found in the text string.

Code:
SQL> select instr(sde.st_astext(sde.st_geometry('point z (1 1 1)',0)),'Z') from
dual;

INSTR(SDE.ST_ASTEXT(SDE.ST_GEOMETRY('POINTZ(111)',0)),'Z')
----------------------------------------------------------
7


In the second example, the geometry does not contain the Z dimension and thus the INSTR returns zero.
Code:
SQL> select instr(sde.st_astext(sde.st_geometry('point (1 1)',0)),'Z') from dual
;

INSTR(SDE.ST_ASTEXT(SDE.ST_GEOMETRY('POINT(11)',0)),'Z')
--------------------------------------------------------
0

Article ID:000010024

Software:
  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options