[postgis-users] SQL query

Brian Sanjeewa Rupasinghe jinkabs at gmail.com
Fri Jul 1 08:58:52 PDT 2011


Hi,

I am using following SQL query to retrieve the coordinates of the first
vertex of the first multipolygon in the
table Building_Poly.

select X(pointN(ExteriorRing(GeometryN(the_geom,1)),*1*)),
Y(pointN(ExteriorRing(GeometryN(the_geom,1)),*1*)) from
building_poly limit 1;

In order to get the other coordinates of the vertices of the polygon, i want
to find out the number of vertices of the
multipolygon and then iterate through. How to do this using a loop?

Cheers, sanjeewa.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110701/bc2fcaf4/attachment.html>


More information about the postgis-users mailing list