[postgis-users] convert circle to polygon/multilinestring geom

Donal Regan donal_regan10 at yahoo.co.uk
Fri Sep 8 19:50:44 PDT 2006


Excellent. Thank you.

Michael Fuhr <mike at fuhr.org> wrote: On Fri, Sep 08, 2006 at 10:57:13AM +0100, Donal Regan wrote:
> How can I convert postgres circle type data in the form
> ((136.415486320932,36.4781234937248),0.120176281150151)
> to a postgis geometry type data such as a polygon or multilinestring?

You could use Buffer(), optionally providing a third argument to
specify the number of segments in a quarter circle (the default
is 8):

Buffer(GeomFromText('POINT(136.415 36.478)'), 0.12)
Buffer(GeomFromText('POINT(136.415 36.478)'), 0.12, 16)

If you have a table with a circle column then you could convert it
to a geometry like this:

Buffer(MakePoint((point(col))[0], (point(col))[1]), radius(col))

-- 
Michael Fuhr
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


 		
---------------------------------
 All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060909/5d962371/attachment.html>


More information about the postgis-users mailing list