[postgis-users] making polygons from center + vertex

Francis Markham fmarkham at gmail.com
Wed Aug 11 19:04:03 PDT 2010


Sure is, check out the ST_Buffer function
http://postgis.refractions.net/docs/ST_Buffer.html
   ST_Buffer(geometry g1, float radius_of_buffer);

If you give it a point as g1, and the radius of the circle it will
calculate a pseduo-circular polygon for you.  If you have two points
g1 and g2 you could use ST_Buffer(g1, ST_Distance(g1, g2));

-Francis

On 12 August 2010 11:36, Arnaud Sahuguet <arnaud.sahuguet at gmail.com> wrote:
>
> I found this really neat Google Maps example where you can draw polygons using 2 points: the center and one vertex.
> See http://www.barnabu.co.uk/geapi/polyplot/
> Is there a POST GIS function to create the corresponding polygon?
>
> regards,
>
> --
> Arnaud Sahuguet
>
> _______________________________________________
> 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