[postgis-users] makepolygon with geom info

Paragon Corporation lr at pcorp.us
Tue Jul 1 23:37:45 PDT 2008

Sorry I had a typo  - try the below instead:

SELECT Max(f.gid) as newgid, f.name,
ST_MakePolygon(ST_MakeLine(f.the_geom)) As newgeom
FROM (SELECT name, 0 as psort, gid, the_geom
		FROM foll 
		SELECT fs.*
		(SELECT DISTINCT ON(name) name, 1 As psort, gid ,
			FROM foll
		ORDER BY name, gid) fs
	ORDER BY 1,2,3) As f
WHERE f.name = 'abc'
GROUP BY  f.name 

Hope that helps,

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of S.Reena
Sent: Wednesday, July 02, 2008 1:42 AM
To: postgis-users at postgis.refractions.net
Subject: RE: [postgis-users] makepolygon with geom info

I tried that but its givin the error as f.gid doesnt exist....in the 2nd
query..while the first query was fine ..it just said that lwshell doesnt
exist..as the start n end points r different......
View this message in context:
Sent from the PostGIS - User mailing list archive at Nabble.com.

postgis-users mailing list
postgis-users at postgis.refractions.net

More information about the postgis-users mailing list