[postgis-users] How to add circle to Postgis database?

Jeremy Dunck jdunck at gmail.com
Wed Mar 7 11:36:29 PST 2007


On 3/7/07, Brad Ediger <brad at bradediger.com> wrote:
> On Mar 7, 2007, at 12:59 PM, Brent Wood wrote:
...
> > There is unfortunately a nasty trap here, as the point will need to be
> > reprojected to a suitable equidistant or equal area projection to
> > generate a
> > true circle, ...

> (SRID 27582 is a Lambert II planar projection, as measured in meters.)
>
> CREATE OR REPLACE FUNCTION circle(geometry, numeric) RETURNS geometry
>      AS 'SELECT Transform(SetSRID(Buffer(Transform(SetSRID($1, 4326),
> 27582), $2), 27582), 4326);'
>    LANGUAGE sql;

Hmm, if I understand correctly, Lambert is conformal, which doesn't
fit the  criteria suggested by Brent (i.e. equidistant or equal-area).

I'm a newbie at this stuff, so it's fairly likely I'm missing something.  :-/

I'm jumping in here because I have the same desire to use a circle
around a given point.  Cheers for the pointers so far!



More information about the postgis-users mailing list