Reading and writting spatial data.

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FCS
Posts: 176
Joined: Sat 23 Feb 2013 18:46

Reading and writting spatial data.

Post by FCS » Sun 19 May 2013 08:38

Hello,

How to read and write spatial data from/into the PostgreSQL or Oracle databases?
Is there something like asString for the geometry ?

Regards
Michal

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Reading and writting spatial data.

Post by AlexP » Mon 20 May 2013 06:33

Hello,

The GEOMETRY type is a PostgreSQL and Oracle server-specific types and it cannot be brought to UniDAC. Therefore in UniDAC you can work with such field types only as with strings. For example, to record data to a Point field, you can use the following code:

Code: Select all

  UniQuery1.FieldByName('f_point').AsString := '(2,3)';

FCS
Posts: 176
Joined: Sat 23 Feb 2013 18:46

Re: Reading and writting spatial data.

Post by FCS » Mon 20 May 2013 07:26

Hello,

Thanks, I will try this method.

Regards
Michal

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Reading and writting spatial data.

Post by AlexP » Wed 22 May 2013 10:54

Hello,

If you have any other questions, feel free to contact us

Post Reply