[postgis-users] Creating a circle geometry

Richard_D_Levine at raytheon.com Richard_D_Levine at raytheon.com
Wed Feb 16 08:24:05 PST 2005


What about creating a polygon approximation of the circle using buffer()?

http://postgis.refractions.net/pipermail/postgis-users/2004-October/005949.html

Rick


|---------+--------------------------------------------->
|         |           strk at refractions.net              |
|         |           Sent by:                          |
|         |           postgis-users-bounces at postgis.refr|
|         |           actions.net                       |
|         |                                             |
|         |                                             |
|         |           02/16/2005 11:12 AM               |
|         |           Please respond to PostGIS Users   |
|         |           Discussion                        |
|         |                                             |
|---------+--------------------------------------------->
  >----------------------------------------------------------------------------------------------|
  |                                                                                              |
  |       To:       "PostGIS Users Discussion (E-mail)" <postgis-users at postgis.refractions.net>  |
  |       cc:                                                                                    |
  |       Subject:  Re: [postgis-users] Creating a circle geometry                               |
  >----------------------------------------------------------------------------------------------|




On Wed, Feb 16, 2005 at 11:05:35AM -0500, Surridge, Christopher S wrote:
> I have the cvs version of postgis working on Solaris 10 now (thanks strk)
and I'm trying to figure out how to insert a circle geometry. I have data
that consists of a center given as a latitude/longitude and a radius in
meters. There is a createCircle method in GEOS, but I can't figure out how
to use it through postgis. Even if I could, looking through the code for
createCircle, I'm not sure it will give the desired results for a lat/long
coordinate system. I would settle for a bounding box created using expand,
but I have the same concerns about the coordinate system in this case. Is
there an easy way to do this that I'm missing, or do I just have to suck it
up and do the meters to degrees and spherical coordinates math myself?

There is no postgis interface to GEOS createCircle.
If there was, or you settle to use bounding box,
you could try creating the geom in a isometric
projection and then transform it back to lat/long.
Also, consider incrementing the number of vertexes
when doing so, to get better curves at transform
time - see segmentize().

--strk;

>
> Thanks,
>
> --chris
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
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