LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 23 May 2006 10:45:18 -0700
Reply-To:     Howard Cherniack <cherns@compuserve.com>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Howard Cherniack <cherns@COMPUSERVE.COM>
Subject:      LAT/LONG COORDINATES--DISTANCE BETWEEN THEM
In-Reply-To:  <200605192156.k4JLutJb028671@liaag2ag.mx.compuserve.com>
Content-Type: text/plain; charset=us-ascii

Unless your hypothesis is that the interaction between prisons and schools is due to some sort of emanations, or your study is set on a featureless plane, or your subjects do a lot of cross-country travel or teleportation, I suggest that a better metric than either pythagorean or great-circle distance might be travel time. Clearly some of the actors in the study may be hoofing it or taking public transportation, but perhaps something like automobile travel time, as calculated by a site like MapQuest, might be a useful surrogate. Just a thought. Cheers, --[the other] Howard

(PS: what is your second longitude measurement?)

> Date: Fri, 19 May 2006 15:57:02 -0500 > From: Pavlo Row <pavlo@INORBIT.COM> > Subject: LAT/LONG COORDINATES--DISTANCE BETWEEN THEM

> Hello,

> I have a data set containing LATITUDE and LONGITUDE > coordinates(degrees minute seconds). > I show an example of two records:

> LATITUDE LONGITUDE > 40 02 40 -76 24 45 > 42 21 12 0880536

> Q1: In SAS, how can I compute the distance in miles (km, etc.) > between LATITUDE and LONGITUDE columns above? I would like to use > an accurate mathematical formula to compute the distance.

> Q2: Same as in Q1 but we can use a less sophisticated > mathematical formula to compute the distance.

> What I am after in this question is that I wish to find the > distance between high-schools and nearby prisons with > sex-offenders, etc. If I know the LAT/LONG of school and prison, > can I find the distance beyween them?

> In Q1 I assume that the school and prison may or may NOT be > close to each other. By close I mean within 10 miles or so. Since > I don't know how close they are, I wish to use a more > sophisticated mathematical formula to compute a fairly accurate > distance, as accurate as we can anyway.

> In Q2 I assume that the school and prison are close to each > other so that the pythagorean distance can be used, I assume.

> Thanks all.

> NICK


Back to: Top of message | Previous page | Main SAS-L page