[postgis-users] Obtaining vertex order...

Manu manuelfgm at gmail.com
Fri Jul 20 08:59:49 PDT 2007

I've got it!!!

create table wp_obs as select nextval('wp_seq3') as dummy,  geom from
(select Pointn(exteriorring(obstacles.geom), generate_series(1,npoints(
obstacles.geom)-1)) as geom from obstacles, place where obstacles.geom &&
place.geometry and intersects(place.geometry,obstacles.geom) order by
distance (Pointn(exteriorring(obstacles.geom), generate_series(1,npoints(
obstacles.geom)-1)),GeomFromText('POINT(3.2 -35.9)',-1))) an;

I think this is the largest query I made in postgres. Thank you Regina, you
inspired me with your "subqueries method", you're my muse =)

manuelfgm at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070720/d83bb553/attachment.html>

More information about the postgis-users mailing list