[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Michael Blasnik" <michael.blasnik@verizon.net> |

To |
<statalist@hsphsun2.harvard.edu> |

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 michael.blasnik@verizon.net ----- Original Message ----- From: "Glen Waddell" <waddell@uoregon.edu> To: <statalist@hsphsun2.harvard.edu> 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: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Michael > Blasnik > Sent: Monday, September 29, 2003 12:13 PM > To: statalist@hsphsun2.harvard.edu > 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 > michael.blasnik@verizon.net > > * * 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/

**References**:**st: RE: Re: Latitude/longitude in spatwmat***From:*"Glen Waddell" <waddell@uoregon.edu>

- Prev by Date:
**Re: st: programmable windowing keys?** - Next by Date:
**st: RE: RE: ci, return lists, and statsby commands** - Previous by thread:
**st: RE: Re: Latitude/longitude in spatwmat** - Next by thread:
**st: panel data hausman negative** - Index(es):

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