Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to get at object values...
"DA Morgan" <damorgan_at_x.washington.edu> schrieb im Newsbeitrag news:1113441782.298443_at_yasure...
> Volker Hetzer wrote:
>
> > Hi!
> > When I deal with objects (particularly geometries in spatial),
> > sqlplus returns nice ASCII descriptions of the geometry objects.
> > How can I do the same thing from an api? Is there some
> > object-to-constructor-function that I'm overlooking?
> >
> > Lots of Greetings!
> > Volker
>
> DBMS_DESCRIBE built-in package.
From what I see this gives me the headers of packages and so on.
What I'm after is this:
I create spatial objects (sdo_geometry objects) using constructor
calls (mdsys.sdo_geometry(...)), do operations on them, like
sdo_difference, sdo_buffer and so on. At the end, I get totally
different geometries in some table.
When I now read them out using sqlplus, I get:
SQL> select outline from cvc_outlines;
OUTLINE(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
5))
SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1005, 4, 1, 2, 1, 3, 2, 1, 5, 2, 1, 7, 2, 1), SDO_ORDINATE_ARRAY(94.75, 122.6, 96.65, 122.6, 96.65, 125.1,
94.75, 125.1, 94.75, 122.6))
SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1005, 5, 1, 2, 1, 3, 2, 1, 5, 2, 2, 9, 2, 1, 11, 2, 1), SDO_ORDINATE_ARRAY(51.71, -31.65, 50.31, -31.65, 5 OUTLINE(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
5)) SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1005, 5, 1, 2, 1, 3, 2, 1,5, 2, 2, 9, 2, 1, 11, 2, 1), SDO_ORDINATE_ARRAY(75.8, -76.95, 77.2, -76.95, 77. 2, -74.35, 77.1707107, -74.279289, 77.1, -74.25, 75.8, -74.25, 75.8, -76.95))
i.e. ASCII that I can use as it is for copy/paste and inserting into another table. Yet, when I do a "select outline from cvc_outlines" from any API I seem to have to either call individual methods which are no use to me, or, it doesn't work at all and the api complains about a type error. What I'd like to get is exactly the same string, sqlplus gives me (per row, not the column heads of course).
Any ideas?
Lots of Greetings!
Volker
Received on Thu Apr 14 2005 - 06:49:17 CDT