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
    Posts
    5,137

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

    objRoute.Calculate()
    distance = objRoute.Distance

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

    Thanks,
    Tony

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    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.

    Eric
    ~ 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
    Posts
    5,137
    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
    Posts
    4
    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
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    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.

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

  6. #6
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    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.

    Thanks,
    Chris

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

    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
    www.technologix.ca

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