Page 1 of 1

SDO_GEOMETRY support

Posted: Sat 16 Sep 2006 21:24
by matej
Does ODAC (net:=true) support SDO_GEOMETRY datatype?
If yes... is there any example how to work with it? (read/write)

Thanks for help.

Matej

Posted: Mon 18 Sep 2006 12:51
by Challenger
No, Net option doesn't support objects.

Posted: Tue 19 Sep 2006 05:32
by matej
Thanks for answer.
Then I should "go" through OCI.
Eny examples about this? (how to "correctly" access this field) Any user experiences?

I will be very thankful for any examples. I'm new with this field types and I 've got task to read data which is written in WKT (well known text) and wrote it to SDO_GEOMETRY field (and vice versa).

Matej

Posted: Tue 19 Sep 2006 11:43
by Challenger
We have no demo for SDO_GEOMETRY object type. Please refer to our Objects demo.

Posted: Tue 19 Sep 2006 12:17
by matej
Is any other user here (forum user), which will be kind enough to share with me little example how to correctly work with this type?

Thanks.

Matej

Posted: Thu 21 Sep 2006 09:56
by Aufhauser
Here is a sample code, feel free to use it

Stefan


private
FQuery: TOraQuery;
FOrdinates: TOraArray; // Ordinates Array
FElemInfo: TOraArray; // Eleminfo Array
FSDOPoint: TOraObject; //
FElemIndex: integer;


procedure TSpatialLoaderStruktur.LoadGeometry;
var
Geom: TOraObject;
GType: integer;
Begin
Geom:= FQuery.GetObject(FGeomFieldName);
FSDOPoint:= Geom.AttrAsObject['SDO_POINT'];
FElemInfo:= Geom.AttrAsArray['SDO_ELEM_INFO'];
FElemIndex:= 0;
FOrdinates:= Geom.AttrAsArray['SDO_ORDINATES'];
GType:= Geom.AttrAsInteger['SDO_GTYPE'];
FDim:= GType div 1000;
GType:= GType mod 1000;
FIsComposite:= False;
//
LoadElement(FElemInfo.Size, GType);
End;

Posted: Thu 02 Nov 2006 13:49
by nigelca
I am just evaluating Oracle Data access components for Delphi7

I think this thread may hold the answer to the problem I've got with SDO_GEOMETRY returning 99 values 96 of which are null.

Wht does the call to LoadElement refer to in Aufhauser' example.

i.e. what class does the method belong to and what unit does it reside in

Many thanks

Nigel

Posted: Thu 02 Nov 2006 15:23
by Aufhauser
I wanted to give an example, how to use the single elements of
mdsys.sdo_geometry type.
I used a code fragment of my own code and forgot to clear the line "LoadElement".

Stefan