MI Calculating distance between to lat and long points

2000-02-23 Thread Lisa Cloutier

Hello

Does anyone know the formula or method for calculating the distance in miles
between to latitude/longitude points.  The projection is NAD 83.  Either a
formula or a MI solution would be acceptable.

Thanks,
Lisa Cloutier
Metricom, Houston
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI Calculating distance between to lat and long points

2000-02-23 Thread David Ward

Lisa:

Try.

Javascript:  http://www.best.com/~williams/gccalc.htm
Formulas:   http://forum.swarthmore.edu/dr.math/problems/longandlat.html

  - David Ward
www.earthwardconsulting.com  www.towermaps.com

Lisa Cloutier wrote:

 Hello

 Does anyone know the formula or method for calculating the distance in miles
 between to latitude/longitude points.  The projection is NAD 83.  Either a
 formula or a MI solution would be acceptable.

 Thanks,
 Lisa Cloutier
 Metricom, Houston


--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



FW: MI Calculating distance between to lat and long points

2000-02-23 Thread Lisa Cloutier



-Original Message-
From: Russell Mincher [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 23, 2000 12:04 PM
To: Lisa Cloutier
Subject: Re: MI Calculating distance between to lat and long points


Back in '97 Dan Phillips gave following formula in response to a similar
question, I believe it gives the answer in statute miles but it would pay to
check.   I do recall modifying it to give me the answer in metres, I still
use it and it works very well.   The coordinate pairs are in decimal
degrees.

distance=69.093
*acos(sin(lat1*.01745329252)*sin(lat2*.01745329252)+(cos(lat1*.01745329252)*
cos
((lat2*.01745329252))*cos((lon2*.01745329252)-(lon1*.01745329252*57.295
77951)

(Where lat1 and lon1 are the first coordiante pair and lat2 and lon2
are the second coordinate pair)


This replaced my initial method which was very tedious but did utilise MI
and I provide because it may have more use in your application:

Every year I receive the start and end positions of up to 500 dredge tows
during a biomass survey together with all of the results of data regarding
what comes up in the dredge.   I then provide the scientist analysing the
data with exact tow lengths so that the data can be standardised.

I received the coordinates in an excel spreadsheet.
I used to export the data as a text file and work up each pair as a line in
a MIF.
(line Lon1 Lat1 Lon2 Lat2)
I would then import the MIF
Create a new field (column) in the table and populate it with

Update TABLE set NEWCOLUMN = objectlen(obj,"m")  (remember I am working
in metres)
Then I would export the table back into excel so that I could use the
lengths calculated by MI

You can see why Dan's contribution was such a help to me, I could do the
whole thing in excel which was the format I received the data and had to
produce my results in.

I would be very interested in any alternative methods / responses you
receive

Regards



Russ Mincher



- Original Message -
From: Lisa Cloutier [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 24, 2000 5:06 AM
Subject: MI Calculating distance between to lat and long points


 Hello

 Does anyone know the formula or method for calculating the distance in
miles
 between to latitude/longitude points.  The projection is NAD 83.  Either a
 formula or a MI solution would be acceptable.

 Thanks,
 Lisa Cloutier
 Metricom, Houston
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



RE: MI Calculating distance between to lat and long points

2000-02-23 Thread Rob Martinson

Sometime last year we posted a short writeup explaining how to create a
simple dealer locator online. The VB source (and a .dll) for calculating
great circle distance is available there at:
http://www.directionsmag.com/devel/devel_articles.asp?ID=1

Hope this helps...

Rob Martinson



- Original Message -
From: Lisa Cloutier [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 24, 2000 5:06 AM
Subject: MI Calculating distance between to lat and long points


 Hello

 Does anyone know the formula or method for calculating the distance in
miles
 between to latitude/longitude points.  The projection is NAD 83.  Either a
 formula or a MI solution would be acceptable.

 Thanks,
 Lisa Cloutier
 Metricom, Houston
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



Re: MI Calculating Distance

1999-07-15 Thread jchgis

This is a little application I wrote to do this exact thing. It has table and
colum names hardcoded in it, so you may have to do a bit of tailoring (this one
finds the nearest doctor for each specialty per given patient). Also, you need a
lattitude and longitude for each customer...

Include "mapbasic.def"
Dim TempDist, MinDist as float
Dim Specialty as String
Dim CurDistCol, CurMember, FirstDoctor as Integer

Open Table "E:\Generation Health\GeoDoctors" interactive
Open Table "E:\Generation Health\GeoMembers" interactive

Fetch first from GeoDoctors 'Chiro=26, Derm=66, Ent=85, hosp=101, neuro=110,
ob-gyn=127

Fetch first from GeoMembers
FirstDoctor=127
Do while not EOT(GeoMembers)
 CurMember=GeoMembers.RowId
 Fetch rec FirstDoctor from GeoDoctors
 Specialty=GeoDoctors.specialty
 Print(Specialty+" member #"+CurMember+" First Doctor="+FirstDoctor)
 MinDist=Distance(GeoMembers.long, GeoMembers.lat, GeoDoctors.long,
GeoDoctors.lat, "mi")
  Do
  Fetch next from GeoDoctors
  TempDist=Distance(GeoMembers.long, GeoMembers.lat, GeoDoctors.long,
GeoDoctors.lat, "mi")
  if TempDistMinDist then
  MinDist=TempDist
  end if
  Loop While GeoDoctors.specialty=Specialty and Not EOT(GeoDoctors)
 Update GeoMembers
 Set OBGYN=MinDist
 where RowId=CurMember
 Fetch next from GeoMembers
Loop

Gary Talbott wrote:

 I have a database of about 2000 +- customer accounts, and another database
 of all our service locations. I need to know the nearest service location
 for each of these customers. Is there a mapbasic program out there that will
 calculate the distance and then sort the table from near to far from each
 particular service location. Or at least some thing close. I have
 experimented with the 3.0 bundle of object distance, I need a little more
 than that.

 From,
 Gary Talbott
 [EMAIL PROTECTED]

 HAVE A GREAT DAY !

 ___
 Get Free Email and Do More On The Web. Visit http://www.msn.com
 --
 To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
 "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



MI Calculating Distance

1999-07-13 Thread Gary Talbott

I have a database of about 2000 +- customer accounts, and another database 
of all our service locations. I need to know the nearest service location 
for each of these customers. Is there a mapbasic program out there that will 
calculate the distance and then sort the table from near to far from each 
particular service location. Or at least some thing close. I have 
experimented with the 3.0 bundle of object distance, I need a little more 
than that.


From,
Gary Talbott
[EMAIL PROTECTED]

HAVE A GREAT DAY !


___
Get Free Email and Do More On The Web. Visit http://www.msn.com
--
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]