SDO_GEOMETRY – Determining if a SDO_GEOMETRY Line Has True Curves

enterprise-geodatabaseoracle-dbmsoracle-spatialsdo-geometrytrue-curves

Oracle 18c

I have an SDO_GEOMETRY table that I created via ArcGIS Desktop 10.7.1.

The table has a line that appears to have a true curve in it:

enter image description here

However, in a related question, @Vince pointed out that this particular scenario could be misleading:

ArcGIS supports CAD objects in parallel to geometry, as a BLOB data
type. The SDE.ST_GEOMETRY stores an approximation of the true curve
object. SDO_GEOMETRY can store true curves, but Esri might not use it,
since they use the BLOB instead. You need to review this Answer to
make sure that the curve segment type is stored in SDO_GEOMETRY, not
just that it looks right in an Esri client (leveraging the CAD BLOB).


Question:

Is there a way to determine if a SDO_GEOMETRY line has true curves (or not)?


What I tried:

I considered querying the SDO_GEOMETRY line as WKT so that I could look at the vertices as text (to see if there was any evidence of a true curve):

select
    sdo_util.to_wktgeometry(shape)
from
    my_table

But I think that defeats the purpose of what I'm trying to do. If there was, in fact, a true curve in the line, I think to_wktgeometry() would densify the curve as straight-line segments/approximations anyway. So I wouldn't be able to tell if there is a curve or not.

Best Answer

Oracle Spatial and Graph, defines several primitive types of geometries . A line as the example in the question, is called a Compound Line String, which means it has a combination of straight lines and circular arcs. This type of element is depicted in the SDO_GEOMETRY Object Type using the SDO_ELEM_INFO attribute. This attributes consists of a list of integers which maps how the SDO_ORDINATES attribute should be interpreted. The first integer for each triplet indicates the corresponding point(s) in the object's list of ordinates involved. The second and third integers of the triplet, indicates how these mapped ordinates should be interpreted.

Long story short: In an Oracle-native manner, for a line containing a combination of straight line(s) and circular arc(s), you must have at least one triplet that looks like this:

('some integer', 2, 2)