Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

Help me with distance calculate please

This is a discussion on Help me with distance calculate please within the MapPoint Desktop 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 ...

  1. #1
    kingvafa is offline 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 ???

  2. #2
    tfmiltz is offline Member Green Belt
    Join Date
    Feb 2005
    Posts
    52

    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'

  3. #3
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60

    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

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to calculate distance using Mappoint and VB
    By digish in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 02-27-2004, 04:40 PM
  2. How to calculate distance between 2 location with vba
    By ifc in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-25-2004, 09:01 AM
  3. [VB6 + MP2K] How to calculate distance between...
    By Vincent BENNER in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-19-2003, 12:59 PM
  4. how to calculate distance between 2 towns
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 06-06-2003, 03:51 PM
  5. So how do i get it to calculate teh distance betwe....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-19-2001, 08:42 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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