Reading and writing geographic objects
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Reading and writing geographic objects
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
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
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.
Actually this is the reason that I ask here what to do.
Re: Reading and writing geographic objects
Hello,
Please contact our sales department at sales*devart*com to update login and password for access to the latest PgDAC version.
Please contact our sales department at sales*devart*com to update login and password for access to the latest PgDAC version.
-
- Posts: 27
- Joined: Fri 12 Feb 2010 07:44
Re: Reading and writing geographic objects
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
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
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
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;
-
- Posts: 27
- Joined: Fri 12 Feb 2010 07:44
Re: Reading and writing geographic objects
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.
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.
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Reading and writing geographic objects
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.
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.
-
- Posts: 27
- Joined: Fri 12 Feb 2010 07:44
Re: Reading and writing geographic objects
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.
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.
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Reading and writing geographic objects
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.
In our example, PgQuery1f_polygon is a persistent field for the f_polygon column created in the Fields Editor of the PgQuery1 component.
-
- Posts: 27
- Joined: Fri 12 Feb 2010 07:44
Re: Reading and writing geographic objects
I beg your pardon?
In previous post I wrote:
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?
So what feature is it?AlexP wrote:Hello,
This feature is added to PgDAC, it will be available in the next build.
In previous post I wrote:
I did not find answer.[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.
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?
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Reading and writing geographic objects
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.AlexP wrote:Hello,
This feature is added to PgDAC, it will be available in the next build.
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
Hi,
Had anyone ins this forum successfully read/wrote PostGIS geometries?
Had anyone ins this forum successfully read/wrote PostGIS geometries?
Re: Reading and writing geographic objects
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
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