[R] Re : Draw a circle with a given radius in an existing map

Roger Bivand Roger.Bivand at nhh.no
Tue Nov 7 08:27:39 CET 2006


On Tue, 7 Nov 2006, justin bem wrote:

> Try this :
>     >it<-seq(0,2*pi, l=100)
>     >xt<-r*cos(it)
>     >yt<-r*sin(it)
>     >points(xt,yt,type="l",col="blue")
> 
> a circle of radium r is define by
>    xt=r*cos(t)
>    yt=r*sin(t) 

Isn't this suggestion on the plane, when the question was about finding
the coordinates on the surface of the sphere (globe) in degrees of
longitude and latitute that are x miles from the centre?

If the area is not large, then projecting the centre point to a suitable 
planar projection, making the circle on the plane as above, and inverse 
projecting back to geographical coordinates should work (function 
project() in package rgdal). If the radius is in thousands of miles, the 
projection distortion would be considerable, though.

> 
> Justin BEM
> Elève Ingénieur Statisticien Economiste
> BP 294 Yaoundé.
> Tél (00237)9597295.
> 
> 
> 
> ----- Message d'origine ----
> De : Xiaomei Ma <xiaomei.ma at yale.edu>
> À : R-help at stat.math.ethz.ch
> Envoyé le : Mardi, 7 Novembre 2006, 6h11mn 27s
> Objet : [R] Draw a circle with a given radius in an existing map
> 
> 
> I have drawn a map in which the X and Y axes are latitude and 
> longitude. Now I need to draw one circle on the map - the center is a 
> point with specific latitude and longitude, but the challenge is that 
> the radius is in miles. Is there a way to do this? I'd very much 
> appreciate your response.
> 
> XM
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 
> 	
> 
> 	
> 		
> ___________________________________________________________________________ 
> Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
> Profitez des connaissances, des opinions et des expériences des internaut
> 
> 	[[alternative HTML version deleted]]
> 
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-help mailing list