Author 
Message 
christriddle@googlemail.c science forum beginner
Joined: 10 Jul 2006
Posts: 12

Posted: Mon Jul 10, 2006 10:29 am Post subject:
Projected small circles



Hi,
I'm having a problem with drawing small circles (in other words,
ranges) of radius r around a centre point C on a projected map (Plate
Carrée (or Equirectangular) projection).
For example, I'd like an outline of all the places in the world x
distance away from London.
Lat/long coords of the centre poiunt are simple to work out via the
map. The ideal answer would be to return more lat/long coords to draw
on the map.
I know I need to move from R^2 into R^3 then back to R^2, but any
attempts at this has just confused me! I was only ever good at pure
maths at university.
So, any help would be appreciated...
Thanks in advance,
Chris Riddle 

Back to top 


matt271829news@yahoo.co. science forum Guru
Joined: 11 Sep 2005
Posts: 846

Posted: Mon Jul 10, 2006 6:15 pm Post subject:
Re: Projected small circles



christriddle@googlemail.com wrote:
Quote:  Hi,
I'm having a problem with drawing small circles (in other words,
ranges) of radius r around a centre point C on a projected map (Plate
Carrée (or Equirectangular) projection).
For example, I'd like an outline of all the places in the world x
distance away from London.
Lat/long coords of the centre poiunt are simple to work out via the
map. The ideal answer would be to return more lat/long coords to draw
on the map.
I know I need to move from R^2 into R^3 then back to R^2, but any
attempts at this has just confused me! I was only ever good at pure
maths at university.

Let r be the earth's radius, and assume the earth is a perfect sphere.
Let lat_0 and lng_0 be the latitude and longitude of the central point
C, and let d be the "radius" of the circle drawn around it, measured as
the great circle arc length from C. (Sorry, I switched your variables
names.)
Let angle t be a parameter that ranges from zero to 2*pi (radians) to
describe this circle. Set up xyz coordinate axes, with the centre of
earth at the origin, positive z axis through the north pole, equator
lying on the xy plane, and positive x axis through latitude 0,
longitude 0. I get the "normalised" (x,y,z) coordinates of the point on
the circle corresponding to t as given by
x = Cos(d/r)*Cos(lat_0)*Cos(lng_0) 
Sin(d/r)*Sin(lat_0)*Cos(lng_0)*Sin(t)  Sin(d/r)*Sin(lng_0)*Cos(t)
y = Cos(d/r)*Cos(lat_0)*Sin(lng_0) 
Sin(d/r)*Sin(lat_0)*Sin(lng_0)*Sin(t) + Sin(d/r)*Cos(lng_0)*Cos(t)
z = Cos(d/r)*Sin(lat_0) + Sin(d/r)*Cos(lat_0)*Sin(t)
(Probably this could be expressed more elegantly in matrix notation!)
"Normalised" means that I have divided all the coordinates through by
r, as if the point were on the unit sphere, since the r's will just
cancel in the next step anyway. Note that the angle d/r is in radians.
And then the latitude and longitude of this point are given by
lat = arcsin(z)
lng = arctan(x,y)
where the twoparameter "quadrant sensitive" version of arctan is used. 

Back to top 


christriddle@googlemail.c science forum beginner
Joined: 10 Jul 2006
Posts: 12

Posted: Tue Jul 11, 2006 8:54 am Post subject:
Re: Projected small circles



Perfect... Thanks for your help!
Chris Riddle 

Back to top 


Google


Back to top 



The time now is Sat Dec 15, 2018 12:31 pm  All times are GMT

