[postgis-users] st_makeline
Paragon
lr at pcorp.us
Sun May 4 18:08:00 PDT 2008
Well geometry is the superclass of all geometry type objects as defined in
the OpenGIS Consortium (OGC) specs that PostGIS, DB2, Oracle and upcoming
SQL Server 2008 follow. This part of the PostGIS manual describes it a bit
http://postgis.refractions.net/docs/ch04.html#id2681045
This pdf has a nice hierarchy diagram of how the various geometry types are
conceptually related
http://doesen0.informatik.uni-leipzig.de/proceedings/paper/68.pdf
Geometry set is a compound term that is a combination of PostGIS and
PostgreSQL terminology.
Basically PostgreSQL has functions that can take and output SETOF some class
of objects. So SETOF geometry is a geometry set.
SETOF is basically an array of instances of a particular class of objects.
This is different from the OGC term GEOMETRYCOLLECTION which itself is still
a geometry and also represents an arbitrary set of geometries. Sorry if
all this is confusing.
Hope that helps,
Regina
_____
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 8:30 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] st_makeline
Thanks for your answer.
Is geometry and geometry set explained anywhere??
Bob
----- Original Message -----
From: Drew Sheedy <mailto:drew at olvec.net>
To: PostGIS Users <mailto:postgis-users at postgis.refractions.net> 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/b3d63d26/attachment.html>
More information about the postgis-users
mailing list