SDO_GEOMETRY support

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
matej
Posts: 5
Joined: Mon 08 Nov 2004 21:01

SDO_GEOMETRY support

Post by matej » Sat 16 Sep 2006 21:24

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

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Mon 18 Sep 2006 12:51

No, Net option doesn't support objects.

matej
Posts: 5
Joined: Mon 08 Nov 2004 21:01

Post by matej » Tue 19 Sep 2006 05:32

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

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Tue 19 Sep 2006 11:43

We have no demo for SDO_GEOMETRY object type. Please refer to our Objects demo.

matej
Posts: 5
Joined: Mon 08 Nov 2004 21:01

Post by matej » Tue 19 Sep 2006 12:17

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

Aufhauser
Posts: 56
Joined: Mon 21 Nov 2005 09:44
Location: Herzogenburg, Austria

Post by Aufhauser » Thu 21 Sep 2006 09:56

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;

nigelca
Posts: 2
Joined: Thu 02 Nov 2006 13:38

Post by nigelca » Thu 02 Nov 2006 13:49

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

Aufhauser
Posts: 56
Joined: Mon 21 Nov 2005 09:44
Location: Herzogenburg, Austria

Post by Aufhauser » Thu 02 Nov 2006 15:23

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

Post Reply