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

st: RE: Re: Latitude/longitude in spatwmat


From   "Glen Waddell" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: Latitude/longitude in spatwmat
Date   Mon, 29 Sep 2003 13:05:57 -0700

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

____________________________
Glen R. Waddell
Department of Economics
University of Oregon
Eugene, OR 97403-1285
phone: (541) 346-1259
fax: (541) 346-1243
www.uoregon.edu/~waddell/



-----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]



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


>
> I currently have latitude and longitude coordinates in a dataset but
> need to have them projected onto an {x,y} plane in order to take
> advantage of the 'spatwmat' command.  Do you know if there is a
> conversion equation, or at least a legitimate approximation for small
> areas?
>
> Glen
>
> ____________________________
> Glen R. Waddell
> Department of Economics
> University of Oregon
> Eugene, OR 97403-1285
> phone: (541) 346-1259
> fax: (541) 346-1243
> www.uoregon.edu/~waddell/


*
*   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/

*
*   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