[postgis-users] points to polyline or polygon
Tyler Mitchell
TMitchell at lignum.com
Tue Jul 15 13:38:08 PDT 2003
This is an interesting question to me. If I understand correctly, you want
to "cast" a set of points into a linestring. Getting your list of points
should be as easy as:
SELECT COLLECT(the_geom) FROM mytable GROUP BY somefield.
But this returns the geometry as MULTIPOINT, which isn't really want you
want, but if you see the text representation, it does look like a
linestring:
SRID=-1;MULTIPOINT(596681.75 5830977.5,532989.625 5869892,547653.0625
5808612,608081.1875 5799629)
So can anyone else give a pointer on taking the above output and casting it
into a linestring instead?
Tyler
Randy James <rjames57 at yahoo.com>
Sent by: To: postgis-users at postgis.refractions.net
postgis-users-bounces at postgis.refr cc:
actions.net Fax to:
Subject: [postgis-users] points to polyline or polygon
07/15/2003 12:54 PM
Please respond to PostGIS Users
Discussion
Hi
I managed to get a user interface with php mapscript that
inserts points in a postgis database, and now i am
attempting to insert lines and polygons from a web browser.
Has anyone done this?
I have a string of points that were entered in, one row per
point and was wondering if anyone has converted a string of
points to a line or polygon, or has a sample sql that will
do it.
I have a column in the table that has a ID for the line, I
am using the same ID on all points that I want merged into
a line. Than i hopefully can use a sql statement to select
all points with the same id and make them into a line, or
polygon.
Any input would be of help.
Cheers
Randy
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
_______________________________________________
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