Community of VE/MapPoint Users and Developers
This is a discussion on Distances 'as the crow flies' within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; How do I calculate the straight line distances between two locations?...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
|
Try googling for "Great Circle Distance" An implementation using latitude/longitude points in VB.Net would be: Calculate Distance and Radius in VB.NET - Visual Basic , VB.NET |
| |||
| Re: Distances 'as the crow flies'
Hi, Here is a code sample in Delphi: Code: function TRefPoints.GetDistance(Lat1, Lon1, Lat2, Lon2: double): integer; var Lat, Lon, Dist: double; begin Lat := Lat2 - Lat1; Lon := (Lon2 - Lon1) * Cos(DegToRad((Lat1 + Lat2) / 2)); Dist := Hypot(Lat, Lon); Result := Round(Dist * 1.852 * 60000); // meters end;
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Distances 'as the crow flies'
Of course, since this is MapPoint we're dealing with... Look at the methods Map.Distance(Loc1,Loc2) and Location.DistanceTo(Loc) Can't believe I didn't mention this in my first reply. [Slaps head] |
| |||
| Re: Distances 'as the crow flies'
Hi Paul, Agreed, but the latter is very slow. If it is needed to do many calcultions at once then own written is mutch faster.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| ||||
| Posted By | For | Type | Date | |
| A More Compact Method for Obtaining Lat/Long - MapPoint Articles - MP2K Magazine | This thread | Refback | 01-17-2007 03:19 PM | |
| Microsoft MapPoint 2006 - MP2K Magazine | This thread | Refback | 01-17-2007 08:23 AM | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 01-16-2007 04:30 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting Distances | cmarquez | MapPoint 2006/2009 Discussion | 13 | 10-17-2006 09:34 AM |
| Calculate distances | Anonymous | MapPoint 2006/2009 Discussion | 1 | 11-18-2004 10:58 AM |
| Batch Distances?! | Anonymous | MapPoint 2006/2009 Discussion | 0 | 01-21-2004 12:40 PM |
| Calculating distances from a route | Anonymous | MapPoint 2006/2009 Discussion | 0 | 07-18-2003 11:23 AM |
| hi, we are using mappoint to get distances for ou.... | Anonymous | MapPoint 2006/2009 Discussion | 3 | 07-05-2002 10:01 AM |
Flights to Tunisia
Experience the cultural mix of Tunisia yourself. Visit their impressive historical sites and delicious cuisine. Visit us online to get great value flights to Tunisia.
Best Travel Agent
Travel Counsellors has been named the UK's Best Travel Agent at the Guardian Unlimited Travel awards.
Holidays to Jamaica
At dealchecker.co.uk, we'll shop around for cheap holidays to Jamaica so you don't have to. We search deals from the UK’s top holiday companies all in one go. Try it for free.
Cyprus Holidays
Cyprus holidays will offer you a wealth of activities all in the most beautiful surroundings. Relish the beauty of Cyprus on a short break.
Cyprus
Before visiting Cyprus, make sure you are well informed to make the most of your holiday. Online at ulookubook.com you check out our useful travel guides. Find out all about the Cyprus nightlife, shopping, eating and customs.
Price Comparison
Price comparison is the name of the game at Travel.co.uk. Visit our website and see for yourself.
Holidays in Goa
Want to know more about Indian culture? Visit On The Beach for information on holidays in Goa.