[postgis-users] Creating a circle geometry

strk at refractions.net strk at refractions.net
Wed Feb 16 08:49:41 PST 2005


On Wed, Feb 16, 2005 at 11:44:14AM -0500, Surridge, Christopher S wrote:
> That sounds like what I want, but I'm not sure what to use for distance. My guess is that its dependent on SRID, but which one would I use to specify locations in lat/long and distances in meters?

1) Transform your points to an isometric projection with meters units.
2) Buffer them
3) Transform them back to lat/long

--strk;

> 
> thanks
> 
> --chris
> 
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of
> Richard_D_Levine at raytheon.com
> Sent: Wednesday, February 16, 2005 11:24 AM
> To: PostGIS Users Discussion
> Cc: PostGIS Users Discussion (E-mail);
> postgis-users-bounces at postgis.refractions.net
> Subject: Re: [postgis-users] Creating a circle geometry
> 
> 
> 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
> 
> 
> 
> _______________________________________________
> 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