Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: RE: Re: Latitude/longitude in spatwmat


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: RE: Re: Latitude/longitude in spatwmat
Date   Mon, 29 Sep 2003 16:31:27 -0400

If you're dealing with a relatively range of latitude (within a few
degrees), then I think it may solve the problem.  For example, if you're
working generally near latitude 40 and you want to work in x,y in miles,
then couldn't you just:

gen x=69*latitude
gen y=53*longitude

and then euclidian distances would be fairly close to true distances...


Michael Blasnik
[email protected]


----- Original Message ----- 
From: "Glen Waddell" <[email protected]>
To: <[email protected]>
Sent: Monday, September 29, 2003 4:05 PM
Subject: st: RE: Re: Latitude/longitude in spatwmat


> Michael Blasnik writes
>
> > Well, latitude  to distance is fairly simple -- it's just the
> circumference of
> > the earth divided by 360, which equals about 69 miles.  The longitude
> conversion
> > will vary with latitude.  ...  You can use some trig if you need to
> get more
> > precise.
>
> Agreed.  The distance from {lat1,lon1} to {lat2,lon2} is simple.  It is
> equal to
>
> radius*(acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon2-lon1)))
>
> where radius is of Earth in miles and lat/lon are in radians.  However,
> this does not solve the problem of projecting latitude and longitude
> onto an {x,y} plane.
>
>
> Glen
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Michael
> Blasnik
> Sent: Monday, September 29, 2003 12:13 PM
> To: [email protected]
> Subject: st: Re: Latitude/longitude in spatwmat
>
>
> Well, latitude  to distance is fairly simple -- it's just the
> circumference of the earth divided by 360, which equals about 69 miles.
> The longitude conversion will vary with latitude.  At the equator (lat=0
> degrees), one degree longitude equals one degree latitude.  The value
> drops as move away from the equator of course.  I think that at
> latitudes of 30, 40, and 50 degrees it's about 60, 53, and 44 miles
> respectively.  You can use some trig if you need to get more precise.
>
> Michael Blasnik
> [email protected]
>
>


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index