[postgis-users] st_makeline

Paragon lr at pcorp.us
Sun May 4 16:46:33 PDT 2008


Bob,

Strange - your st_makepoint(0 2) should give you an error too.  That should
be st_makepoint(0,2).  So I assume that was just a typo.

Regarding st_makeline.  That function has 2 flavors.  There is an
non-aggregate version that takes two points and an aggregate version that
takes rows of points.

To use the 2 point flavor try the followng

INSERT INTO graphics.process(the_geom)
	VALUES(st_makeline(st_makepoint(0,2), st_makepoint(0,1)))

To use the aggregate form - below is an example of its use

http://www.bostongis.com/postgis_makeline.snippet


Hope that helps,
Regina

 

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Bob
Pawley
Sent: Sunday, May 04, 2008 6:15 PM
To: PostGIS Users Discussion
Subject: [postgis-users] st_makeline

Hi

I am trying to learn the basics of Postgis by populating a table with
various geometries.

When I run this -
Insert into graphics.process (the_geom) values (st_makepoint(0 2));

it results in a point which I can see on the viewer.

However, when I run the following, or any variation of coordinate syntax to
obtain a line, I get a syntax error.

 Insert into graphics.process (the_geom) values (st_makeline (0 2), (0 1));
Or Insert into graphics.process (the_geom) values (st_makeline (0 2, 0 1));
Or Insert into graphics.process (the_geom) values (st_makeline (0 2 0 1));
Or Insert into graphics.process (the_geom) values (st_makeline (0, 2, 0,
1)); Or Insert into graphics.process (the_geom) values (st_makeline (0, 2),
(0, 1));

Any thoughts would be appreciated.

Bob

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users






More information about the postgis-users mailing list