I have a SDE.ST_GEOMETRY line feature class. I've created a view on it that returns an st_point column.


There is a known Oracle bug that is preventing me from using my view : Unable to define a query layer in ArcGIS where the data source uses an st_geometry subtype in Oracle.

The bug description states:

...the binding used in Oracle to fetch the geometry binds an st_geometry type. Because the attribute or values returned from the attribute do not map to st_geometry, the Oracle internal error is encountered. By definition, a type binding should support its subtype definitions. This limitation is currently a bug within Oracle's server.

The workaround is:

Convert the geometry attribute field from the subtype (for example, st_point) to the supertype st_geometry.

However, it doesn't say how to do the conversion; I don't know how to convert from the subclass to the superclass.


How can I get ArcMap to recognize an ST_POINT subclass column?

  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Mapperz
    Nov 22, 2016 at 17:28
  • In fact SDE have it own geometry type. In SQL Server it reconnize has custom type. I don't think you can Cast this because this is two differents schema. so you need pass data as text format. Look at link you can create function to pass data sdo to sde and reverse. Mar 7, 2017 at 10:25
  • Note: I don't get the error in ArcGIS Pro. I only get the error in ArcMap. So I guess Pro is better at handling ST_POINTs than ArcMap. With that said, both ArcMap and Pro have a problem where they crash when trying to export the data to a FGDB. I talk about that issue in my answer about the TREAT() function.
    – User1974
    May 6, 2022 at 3:52

2 Answers 2


I don't have an SDE to play with. I think you would have to do something like this:

With point As (
 select sde.st_point (10.01, 20.03, 4326) as pt from dual
select sde.st_geometry(sde.ST_X(p.pt), sde.ST_Y(p.pt), sde.ST_Z(p.pt), sde.ST_M(p.pt), sde.ST_SRID(p.pt)) as ptGeom 
 from point p;

Or you could use WKB.

My packages and objects have implementations of ST_StartPoint that return SDO_GEOMETRY objects. You could create a function that does the same thing but return a point geometry:

create function ST_Point2Geom(p_pt in sde.st_point)
returns sde.st_geometry deterministic
  return case when p_pt is null 
              then null 
              when sde.ST_GeometryType(p_pt) <> 'ST_POINT'
              then p_pt 
              else sde.st_geometry(sde.ST_X(p_pt), sde.ST_Y(p_pt),
                                   sde.ST_Z(p_pt), sde.ST_M(p_pt),
end st_point2geom;
show errors

select st_point2Geom(sde.st_startPoint(myGeom)) from dual;
  • Exacty that i speak about in comment! I think you proposed a good solution to workaround. Mar 9, 2017 at 8:46
  • other sotultion can be use TO_CHAR and remade point in native ST_POINT Mar 9, 2017 at 8:48

From a quick look, Oracle's TREAT() function seems to help:

    treat(  sde.st_pointonsurface(sde.st_buffer(shape,0.05)  ) as sde.st_geometry) as midpoint 

When I use TREAT(), I don't get the error as often when adding the layer to ArcMap.


In a reply to Create NIL (zero vertex) geometry, I mention that the bug has been updated. It now suggests that we use the st_geometry constructor to convert from subtypes to supertypes. Which seems to work for converting [SDE.ST_POLYFROMTEXT] to [SDE.ST_GEOMETRY].

But that doesn't seem to help me when converting [ST_POINT] subtype to [ST_GEOMETRY] supertype:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.