I'm trying to select a geometry column as well-known text from a feature class in an Oracle 11g/ArcSDE 10.1 geodatabase. (This is in a Python script using pypyodbc
as a driver). This is my SQL:
SELECT SDE.ST_AsText(SHAPE) FROM OWNER.FEAT_CLASS
When I run this I get a few Oracle errors:
ORA-29900: operator binding does not exist\nORA-06553: PLS-306: wrong number or types of arguments in call to 'ST_ASTEXT
I found this support article which says to fully qualify all references to ST_GEOMETRY
operators, but I have the SDE
prefix so I'm not sure what's missing. Does anyone have any ideas regarding this?
UPDATE: If I just select the SHAPE
field without any SDE functions I get Decimal('214')
. Interestingly, that's also the object ID.
1 Answer 1
In order to find out the Fn-Table where the actual points are stored, you can
select object_id from sde.column_registry where table_name = 'MYTABLE' and column_name = 'SHAPE';
The geometry will be stored in the table Fxxxx with xxxx = object_id.
Explore related questions
See similar questions with these tags.
SHAPE
field shows up asDecimal
, which I know is not the case.