Thanks Jan.
I am using a WGS84 projection (the default geographic projection). Is there
a way to modify the algorithm to work with a non-cartesian CRS? I am not
sure what would be involved.
Would it suffice to convert to Cartesian, collect all of the points, and
then transform back to WGS84?
Thanks,
Cliff
On Mon, Apr 21, 2008 at 10:07 PM, Jan Goyvaerts <[EMAIL PROTECTED]>
wrote:
> Hi Cliff,
>
> No Java code at hand, but in pseudo code this should basically look like
> this:
>
> for angle = 0 to 359 step 1 do
> x = centerX + raduis * sine(angle)
> y = centerY + radius * cosine(angle)
> done
>
> (Decrease the step value of the for loop to make it look smoother.)
>
> This is assuming the coordinate reference system is carthesian. The
> projection you'll use for the map is of importance too. As it might not
> display the geometry as a round circle.
>
> Jan
>
> On Mon, 21 Apr 2008 20:16:16 +0100
> "Cliff Darling" <[EMAIL PROTECTED]> wrote:
>
> > Does anyone have a code snippet for creating a polygon that represents a
> > circle around a center point with a given radius?
> >
> > Thanks,
> >
> > Cliff
> >
>
>
> --
> Jan Goyvaerts <[EMAIL PROTECTED]>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Geotools-gt2-users mailing list
> Geotools-gt2-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users