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

Brad Ediger brad at bradediger.com
Wed Mar 7 11:54:53 PST 2007


On Mar 7, 2007, at 1:36 PM, Jeremy Dunck wrote:

> 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!

To amend my own post, here's what appears to be a Lambert equal-area  
projection, supported by PROJ.4 (EPSG code 9820). Use at your own risk!

http://remotesensing.org/geotiff/proj_list/ 
lambert_azimuthal_equal_area.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2421 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070307/bbfa1bf5/attachment.bin>


More information about the postgis-users mailing list