[postgis-devel] Doubt - PostGis
Eriovaldo Andrietta
ecandrietta at gmail.com
Sun Nov 7 10:52:37 PST 2010
Hi friends,
I am not sure if here is the right place to post this kind of doubt.
If not, please , tell me a forum where I can clarify my doubts related to
PostGis.
I used following commands in order to insert data into Postgis:
CREATE TABLE tb_point ( ID int4, name varchar(128));
SELECT AddGeometryColumn('tb_point', 'geom', -1, 'POINT', 2 );
--
CREATE TABLE tb_linestring ( ID int4, NAME varchar(25) );
SELECT AddGeometryColumn( 'tb_linestring', 'geom', -1, 'LINESTRING', 2)
BEGIN;
insert into tb_point (id, name, geom) values (1, '1',
GeomFromText('POINT(1 1)',-1));
insert into tb_point (id, name, geom) values (2, '2',
GeomFromText('POINT(2 2)',-1));
insert into tb_point (id, name, geom) values (3, '2',
GeomFromText('POINT(3 3)',-1));
insert into tb_point (id, name, geom) values (4, '2',
GeomFromText('POINT(4 4)',-1));
insert into tb_point (id, name, geom) values (5, '2',
GeomFromText('POINT(5 5)',-1));
insert into tb_point (id, name, geom) values (6, '2',
GeomFromText('POINT(6 6)',-1));
commit;
select count(*) from tb_point;
BEGIN;
INSERT INTO tb_linestring (ID,NAME,GEOM ) VALUES
(1,'1',GeomFromText('LINESTRING(1 1,1 1, 1 2)',-1));
INSERT INTO tb_linestring (ID,NAME,GEOM ) VALUES
(2,'2',GeomFromText('LINESTRING(2 2,1 1, 1 2)',-1));
INSERT INTO tb_linestring (ID,NAME,GEOM ) VALUES
(3,'3',GeomFromText('LINESTRING(3 3,1 1, 1 2)',-1));
INSERT INTO tb_linestring (ID,NAME,GEOM ) VALUES
(4,'4',GeomFromText('LINESTRING(4 4,1 1, 1 2)',-1));
INSERT INTO tb_linestring (ID,NAME,GEOM ) VALUES
(5,'5',GeomFromText('LINESTRING(5 5,1 1, 1 2)',-1));
INSERT INTO tb_linestring (ID,NAME,GEOM ) VALUES
(6,'6',GeomFromText('LINESTRING(6 6,1 1, 1 2)',-1));
commit;
select count(*) from tb_linestring;
I can see data in the database and when I use a tool to see maps, I also got
success...
but:
I entered this kind of geometry
CREATE TABLE tb_circularstring ( ID int4, NAME varchar(25) );
SELECT AddGeometryColumn( 'tb_circularstring', 'geom', -1, 'CIRCULARSTRING',
2)
BEGIN;
INSERT INTO tb_circularstring (ID,NAME,GEOM ) VALUES
(1,'1',GeomFromText('CIRCULARSTRING(8 8, 1 1, 1 0)',-1));
commit;
select * from tb_circularstring;
I can see data in the database, but tools don“t show the geometry to me.
Need I add data into any other table ?
I am using: Quantum GIS, Open Jump, Udig ...
Any tool shows the data
What is wrong.
Regards
Eriovaldo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20101107/17d764ea/attachment.html>
More information about the postgis-devel
mailing list