MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Help me with distance calculate please

This is a discussion on Help me with distance calculate please within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi all i am kind of new to mappoint, i need only the total distance between 2 latlong, (driving distance ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (5) Thread Tools Display Modes
  5 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-06-2007
Junior Member
White Belt
 
Join Date: Nov 2007
Posts: 1
Help me with distance calculate please

Hi all
i am kind of new to mappoint, i need only the total distance between 2 latlong, (driving distance not air milage). i am using php and nuSOAP to call mappoint webserver by xml.
i am calling CalculateRoute but i get lots of information back which i dont use. which is all objects information of my direction.
which some times can be 600kb and it slow down my process alot becasue i only need a double or even int as my total distance.

any idea ???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 11-07-2007
Member
Yellow Belt
 
Join Date: Feb 2005
Posts: 48
Re: Help me with distance calculate please

I once sought this, prior to having a GIS solution in an object model, but I figured here is a question I CAN answer here -heh.

You can compute this without using MapPoint, but I am not sure 'how' accurate it is considering the earth is not a perfect sphere, then again, I don't know how well MapPoint models the earth 'other' than 'as' a sphere.

Try here

Calculate distance and bearing between two Latitude/Longitude points using Haversine formula in JavaScript

I unfortunately lack the mathematics to fully comprehend how to derive this computation, but there are plenty of examples of this approach to calculating distance between two lat/lon pairs.

I do wonder if it would be appropriate to offset the distance by the % the earth's radius at the equator on its rotational axis increases to 'fix' the perfect sphere problem with this approach.

To those that have encountered this formula, it will be evident I'm not offering up as creative a solution as some of the black belts here - but glad I can actually help someone for once.

Tim Miltz

Quote yogi Beara I saw recently - good GIS one 'It is important to know where you are going, because you just might not get there if you don't'
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 11-07-2007
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 848
Blog Entries: 7
Re: Help me with distance calculate please

That gives the "air distance" ('as the crow flies, or Great Circle distance) - not the road/route mileage.

Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 11-09-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Re: Help me with distance calculate please

Hi,

Quote:
Originally Posted by kingvafa View Post
Hi all
i am kind of new to mappoint, i need only the total distance between 2 latlong, (driving distance not air milage). i am using php and nuSOAP to call mappoint webserver by xml.
i am calling CalculateRoute but i get lots of information back which i dont use. which is all objects information of my direction.
which some times can be 600kb and it slow down my process alot becasue i only need a double or even int as my total distance.

any idea ???
There is a TotalDistance property in the route object. You dont need to parse to all the objects if I recall whell from the top of my head.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
calculate, distance


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/help-me-distance-calculate-please-6696.html

Posted By For Type Date
Snap to a Road - MapPoint Articles - MP2K Magazine This thread Refback 11-09-2007 10:15 AM
Programming MapPoint in .NET - MP2K Magazine This thread Refback 11-07-2007 03:17 AM
A More Compact Method for Obtaining Lat/Long - MapPoint Articles - MP2K Magazine This thread Refback 11-07-2007 03:15 AM
Pushpin Tool Add-in - MP2K Magazine This thread Refback 11-07-2007 03:14 AM
Determing Whether A Point Is Located Inside Polygon - MapPoint Articles - MP2K Magazine This thread Refback 11-06-2007 11:50 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to calculate distance using Mappoint and VB digish MapPoint 2006/2009 Discussion 0 02-27-2004 03:40 PM
How to calculate distance between 2 location with vba ifc MapPoint 2006/2009 Discussion 1 02-25-2004 08:01 AM
[VB6 + MP2K] How to calculate distance between... Vincent BENNER MapPoint 2006/2009 Discussion 1 11-19-2003 11:59 AM
how to calculate distance between 2 towns Anonymous MapPoint 2006/2009 Discussion 3 06-06-2003 02:51 PM
So how do i get it to calculate teh distance betwe.... Anonymous MapPoint 2006/2009 Discussion 1 12-19-2001 07:42 AM


All times are GMT -5. The time now is 08:02 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Ski Holiday Packages
Choose from a selection of ski holiday packages from the top travel brands. Holiday Hypermarket makes it easy to search and browse great value ski holidays.

Spain Holidays
Find great Spain Holidays with Travel Counsellors. A personal Travel Counsellor can help you plan the perfect holiday to Spain.

Holidays Italy
Book your holidays in Italy. Italy has a great climate and the beaches to go with it. Book a great deal for great value online at dealchecker.co.uk.

Holidays in Cuba
Holidays in Cuba are an eclectic mix of golden beaches, rich, colourful scenery and a proud cultural heritage. Book a break in Cuba now!

Balearics
Before booking to the Balearics Islands make sure you check out our travel guide online. The Balearics are renowned for their vibrant nightlife but there are also some stunning Gothic cathedrals, Stone Age ruins and fishing villages.

Compare Holidays
Compare holidays online where you can see all the amazing possibilities at Travel.co.uk

Florida Holidays
Take a sunny holiday break! Find info on Florida holidays at On The Beach!


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52