Page 2 of 2

Re: Reading and writing geographic objects

Posted: Mon 03 Jun 2013 15:58
by DemetrionQ
Hello.

You can contact our sales department via the contact form on our website to get more information about your subscription: http://www.devart.com/company/contactform.html

Re: Reading and writing geographic objects

Posted: Mon 03 Jun 2013 22:35
by thvedel
I have contacted the sales department several times the last weeks, but they never return an answer to me...

Actually this is the reason that I ask here what to do.

Re: Reading and writing geographic objects

Posted: Tue 04 Jun 2013 07:48
by AlexP
Hello,

Please contact our sales department at sales*devart*com to update login and password for access to the latest PgDAC version.

Re: Reading and writing geographic objects

Posted: Fri 23 Aug 2013 14:05
Hello.

I have downloaded latest version of PgDAC.
Is this feature has been added in this version?
If yes, could you give me an example how to use it?

Regards
Wojto

Re: Reading and writing geographic objects

Posted: Fri 23 Aug 2013 15:30
by AlexP
Hello,

The code below demonstrates data modification in a Poligon type object, you can work in the similar way with the object types: Point, PointsArray, LSeg, Box, Path and Circle

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var
  p: TPgGeometric;
  i: integer;
begin
  PgQuery1.Edit;
  for i:= 0 to TPgPolygon(PgQuery1f_polygon.AsPgGeometric).Count - 1 do begin
    TPgPolygon(PgQuery1f_polygon.AsPgGeometric).Points[i].X := 0;
    TPgPolygon(PgQuery1f_polygon.AsPgGeometric).Points[i].Y := 0;
  end;
  PgQuery1.Post;
end;

Re: Reading and writing geographic objects

Posted: Mon 26 Aug 2013 08:27
Hello again.

I am affraid it doesn't work.
I would like to make certain:
PgDAC works currently not only with native field types for PostreSQL but with "GEOMETRY" from PostGIS also. So, I use similar code like I wrote in the beginning of this thread:

TPgGeometric *geom = ((TPgGeometricField*) qSelect->FieldByName("the_geom"))->AsPgGeometric;

TPgPolygon *poly = (TPgPolygon*) geom;

for ( int i = 0; i < poly->Count; i++ )
{
TPgPoint *p1 = poly->Points;
}

It is writing in C++ but that is the same idea.
Pointer 'geom' is NULL. How can I get "the_geom" field value? In ODAC I use ->GetObject() method.

Regards
Wojto.

Re: Reading and writing geographic objects

Posted: Tue 27 Aug 2013 10:04
by DemetrionQ
Hello.

I couldn't reproduce the problem. Please provide the script for creating the table. Also make sure the TPgConnection.Options.EnableGeometrics property is set to True.

Re: Reading and writing geographic objects

Posted: Tue 27 Aug 2013 12:31
There is:

CREATE TABLE test_geom
(
f_id integer NOT NULL,
the_geom geometry
)
WITH (
OIDS=FALSE
);
ALTER TABLE test_geom OWNER TO postgres;

INSERT INTO test_geom(f_id, the_geom) VALUES (1, ST_GeometryFromText('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'))


I don't know what variable "PgQuery1f_polygon" means in your example.
TPgConnection.Options.EnableGeometrics property is set to True.

Re: Reading and writing geographic objects

Posted: Thu 29 Aug 2013 10:51
by DemetrionQ
PgDAC supports only standard geometric types of PostgreSQL server: POINT, LSEG, BOX, PATH, POLYGON, CIRCLE.

In our example, PgQuery1f_polygon is a persistent field for the f_polygon column created in the Fields Editor of the PgQuery1 component.

Re: Reading and writing geographic objects

Posted: Thu 29 Aug 2013 12:09
I beg your pardon?
AlexP wrote:Hello,

This feature is added to PgDAC, it will be available in the next build.
So what feature is it?
In previous post I wrote:
[email protected] wrote: I would like to make certain:
PgDAC works currently not only with native field types for PostreSQL but with "GEOMETRY" from PostGIS also.
I did not find answer.
We are going to buy PgDAC components because of that new feauture and you tell me again that functionality is not available?

Ok.
Could you tell me when do you plan to implement that feature?

Re: Reading and writing geographic objects

Posted: Fri 30 Aug 2013 09:05
by DemetrionQ
AlexP wrote:Hello,

This feature is added to PgDAC, it will be available in the next build.
It was about the full support of the standard geometric types, and it was added. We have not announced the support for the PostGIS types, and we don't plan development in this direction for the near future.
You can leave a request to add this functionality at our UserVoice ( http://devart.uservoice.com/forums/1046 ... components ). If the suggestion reaches a large number of votes, we will consider the possibility of its implementation.

Re: Reading and writing geographic objects

Posted: Fri 27 Nov 2020 09:38
by Morelli
Hi,
Had anyone ins this forum successfully read/wrote PostGIS geometries?

Re: Reading and writing geographic objects

Posted: Fri 12 Mar 2021 15:43
by oleg0k
Hello,
We support only official releases of database systems, and we cannot guarantee compatibility of our products with third-party solutions. You are welcome to leave your suggestion about adding support for PostGIS spatial geometry types to PgDAC on our UserVoice page ( https://devart.uservoice.com/forums/104 ... y_id=18923 )

wbr, Oleg
Devart Team