[postgis-users] st_makeline

Bob Pawley rjpawley at shaw.ca
Sun May 4 17:29:37 PDT 2008


Thanks for your answer.

Is  geometry and geometry set explained anywhere??

Bob
  ----- Original Message ----- 
  From: Drew Sheedy 
  To: PostGIS Users Discussion 
  Sent: Sunday, May 04, 2008 4:37 PM
  Subject: Re: [postgis-users] st_makeline


  Hi Bob,

  I'm new to postgis as well (and am and loving it).

  You do have syntax errors in your sql. Note the definitions of the functions that you are using from the postgis manual:

  ST_MakePoint(<x>, <y>, [<z>], [<m>])
  ST_MakeLine(geometry set)
  ST_MakeLine(geometry, geometry)

  So your point sql is valid as it accepts integers, though your line sql is not because you are not using a geometry type.

  Try the following: st_makeLine(st_makePoint(0, 2), st_makePoint(0, 1))

  HTH

  Drew


  On Mon, May 5, 2008 at 8:15 AM, Bob Pawley <rjpawley at shaw.ca> wrote:

    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





------------------------------------------------------------------------------


  _______________________________________________
  postgis-users mailing list
  postgis-users at postgis.refractions.net
  http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080504/7605d197/attachment.html>


More information about the postgis-users mailing list