Postgres native geometry types

Поиск
Список
Период
Сортировка
От Kasia Tuszynska
Тема Postgres native geometry types
Дата
Msg-id 232B5217AD58584C87019E8933556D110221CC5735@redmx2.esri.com
обсуждение исходный текст
Ответы Re: Postgres native geometry types
Re: Postgres native geometry types
Список pgsql-admin

Hi Everybody,

 

I am doing some testing on the postgres native geometry types, namely: point, line, lseg, box, path (closed), path [open], polygon and circle.

 

Does anyone know what are they being used for? PostGIS is usually designated as the gis “module” to postgres and there are other spatial types that work on postgres.

So, what are the native geometry types on postgres used for? http://www.postgresql.org/docs/9.0/static/datatype-geometric.html#AEN6332

 

I got the point, line, lseg, box and circle to wok but I am having some problems creating data with the path and polygon types. I am guessing that the postgres doc has not been updated lately. It says that the line function has not been implemented yet, but it works,  it also omits a crucial part in the usage.

It shows what I would interpret this usage: INSERT INTO gis.test_line (k_id, pg_line) VALUES (1, line((10,10),(20,20)));

 

Where in fact, in the types that I could get it to work I needed the following: INSERT INTO gis.test_line (k_id, pg_line) VALUES (1, line(point(10,10),point(20,20)));

 

Some variations I tried for path and polygon:

 

create table gis.test_path (k_id integer, pg_path path);

INSERT INTO gis.test_path (k_id, pg_path) VALUES (1, path((10,10),(10,20),(20,20), (20,10)));

 

create table gis.test_path2 (k_id integer, pg_path path);

INSERT INTO gis.test_path2 (k_id, pg_path) VALUES (1, path(point(10,10),point(10,20)));

 

create table gis.test_polygon (k_id integer, pg_poly polygon);

INSERT INTO gis.test_polygon (k_id, pg_poly) VALUES (1, polygon((10,10),(10,20),(20,20),(20,10)));

 

create table gis.test_polygon2 (k_id integer, pg_poly polygon);

INSERT INTO gis.test_polygon2 (k_id, pg_poly) VALUES (1, polygon(point(10,10),point(10,20),point(20,20),point(20,10)));

 

Anyone have any suggestions on these two types?

 

Thank you,

Sincerely,

Kasia

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Prabhjot S. Sheena"
Дата:
Сообщение: LONDISTE SKYTOOLS MODULE RPM NOT AVAILABLE FOR POSTGRES-9.0 VERSION
Следующее
От: Vibhor Kumar
Дата:
Сообщение: Re: LONDISTE SKYTOOLS MODULE RPM NOT AVAILABLE FOR POSTGRES-9.0 VERSION