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
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to