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 7 of 7

Route distance processing speed

This is a discussion on Route distance processing speed within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am working on a app that automates the process of getting route distances between zip codes in vb.net. I ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002

    Route distance processing speed

    I am working on a app that automates the process of getting route distances between zip codes in vb.net. I have code that works, however it is quite slow (26 minutes for 230 records on a fast computer). I am trying to find distances from 41,000 some zip codes per division of my company(3 total), and update a database witht he distance information. I know the speed isn't database related because i have taken out part of the code where it update the database. Here is an example of how i find the route distance.

    objRoute = map.ActiveRoute

    objRoute.Waypoints.Add(map.FindAddressResults(, , , , div, ).Item(1))
    objRoute.Waypoints.Add(map.FindAddressResults(, , , , zip, ).Item(1))

    distance = objRoute.Distance

    This code produces the results I want but it is really slow.


  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Blog Entries
    The FindAddressResults, and the Calculate method are both slow.

    You only have three "div's", right? Make sure the logic in your code is such that this only runs three times:
    FindAddressResults(, , , , div, )

    For the zips, you might try FindPlaceResults? I don't know for sure, but you can possibly play around and make that faster.

    Finally, do you need road distance? Once you have the lat/lon's, you can do great circle (crow flies) distance calculations directly in VB code without involving MapPoint.

    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    I originally went the route of the great circle (crow flies) method, however my company is using this for an estimation for freight. If we ship some where and estimate the freight using crow files and ther is a big lake between each point a freight truck would have to go around the lake, thus making the mileage more.

  4. #4
    IamRascal is offline Junior Member White Belt
    Join Date
    Feb 2005
    I'm working on a similar problem. However I geocode the addresses before I send them to the route locator. It can do roughly 3 a second, I'm still looking for a way to make this faster as I'm processing more than 50K records. More ram is on the way for the box, so I'm hoping that will help some.

    any other sugestions are appreciated

  5. #5
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Blog Entries
    3 a second is pretty good going in my experience. I usually allow 1 per second.
    I'm guessing that your routes are fairly short, and that you're working through the add-in mechanism?

    Add-ins run "in-process" which avoids the thread->thread communication overhead.

    Distance makes a huge difference as well. My 1 per second is averaged from batch work that can include routes contained within a city, or spanning multiple states.

    Closing various MapPoint windows helps, as does minimising it. This removes the re-display overhead.

    Winwaed Software Technology LLC
    See http://www.mapping-tools.com for MapPoint Tools

  6. #6
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    I'm using the API, via the objects model instead of a controller. So no rendering is done for the image. The routes are usually less than 50 miles.

    Thanks for the input on processing speed tho. Guess 3/sec isn't that bad.


  7. #7
    rskrzydlo is offline Junior Member White Belt
    Join Date
    Feb 2005

    re:driving distance calculation speeds

    I too have started to use mappoint for processing distances with the same frustration over the speed of using the routing. I also need driving distances for freight purposes. I develop network optimization packages that I am embedding this function in. Previous to Mappoint, I used PCMiler with PCMiler Batch and it could process 50,000 records in maybe half an hour. In fact I have one user with a database of over 4 million records containing distances between 2 points, all processed by PC Miler. The downside of this option is that the software cost $3,000 and didn't provide any of the unique mapping capabilities of Mappoint. However, it is an option to consider if your primary goal is the generation of mileages and you can justify the time saving.

    Ralph Skrzydlo

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 between location and route ?
    By tontaegu in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-19-2005, 02:14 PM
  2. Route Distance in Miles
    By plastipak in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-01-2004, 10:59 AM
  3. Route comparison speed
    By sjmorin in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 06-14-2004, 10:52 AM
  4. How do I calculate a route distance without displaying route
    By spideybud in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 09-09-2003, 11:14 AM
  5. Change the Speed and the route changes -Can this be stopped?
    By mizzy in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-09-2003, 05:49 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 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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127