MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Route distance processing speed

This is a discussion on Route distance processing speed within the MapPoint 2006/2009 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 ...


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 Thread Tools Display Modes
  #1 (permalink)  
Old 09-10-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
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 09-10-2004
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,480
Blog Entries: 1
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
__________________
~ Now taking orders for MapPoint 2009 ~
~
~ Upgrade to MapForums Plus membership ~
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 09-15-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
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 02-19-2005
Junior Member
White Belt
 
Join Date: Feb 2005
Posts: 4
Send a message via AIM to IamRascal
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 899
Blog Entries: 10
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
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
  #6 (permalink)  
Old 02-21-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 03-07-2005
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
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
distance, processing, route, speed


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 between location and route ? tontaegu MapPoint 2006/2009 Discussion 1 10-19-2005 02:14 PM
Route Distance in Miles plastipak MapPoint 2006/2009 Discussion 0 07-01-2004 10:59 AM
Route comparison speed sjmorin MapPoint 2006/2009 Discussion 3 06-14-2004 10:52 AM
How do I calculate a route distance without displaying route spideybud MapPoint 2006/2009 Discussion 4 09-09-2003 11:14 AM
Change the Speed and the route changes -Can this be stopped? mizzy MapPoint 2006/2009 Discussion 0 09-09-2003 05:49 AM


All times are GMT -5. The time now is 10:02 PM.


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


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