MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




As the crows flies and rail

This is a discussion on As the crows flies and rail within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; MapPoint is a very nice tool to find road distances between two cities. Is there any way to do the ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 05-24-2007
Junior Member
White Belt
 
Join Date: May 2007
Location: Montreal
Posts: 11
Question As the crows flies and rail

MapPoint is a very nice tool to find road distances between two cities.

Is there any way to do the same things with railway or as the crows flies distances?

Thanks for your help

A. Ouellet

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 05-25-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,047
Re: As the crows flies and rail

Hi,

You can use Distance or DistanceTo methods.
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 05-25-2007
Junior Member
White Belt
 
Join Date: May 2007
Location: Montreal
Posts: 11
Re: As the crows flies and rail

Hi Wilfred and everybody,

I succeed to find route and as the crow flies distances between two cities. However, I haven't any idea on how to find railway distance. I possibly also need to find maritime distance between two ports. Is there a way to do that?


Thanks a lot,

A. Ouellet

P.S: I am a french Canadian. I am sorry for all possible English mistakes
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 05-25-2007
Junior Member
White Belt
 
Join Date: May 2007
Location: Montreal
Posts: 11
Re: As the crows flies and rail

I just forgot. Here is the code I use. It work good.

A. Ouellet

Private Sub CommandButton1_Click()
Dim oApp As MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLocOne As MapPoint.Location
Dim objLocTwo As MapPoint.Location
Dim objRoute As Route
Dim LocOne As String
Dim LocTwo As String
Dim sFileName As String
Dim Distance As Long
Dim i As Integer

Set oApp = CreateObject("MapPoint.Application.NA.11")
Set objMap = oApp.NewMap
Set objRoute = objMap.ActiveRoute

i = 3
Do Until Cells(i, 1) = 0
'As the crow flies
LocOne = Cells(i, 1)
LocTwo = Cells(i, 2)
Set objLocOne = objMap.FindResults(LocOne).Item(1)
Set objLocTwo = objMap.FindResults(LocTwo).Item(1)
objMap.AddPushpin objLocOne
objMap.AddPushpin objLocTwo
Distance = objMap.Distance(objLocOne, objLocTwo)
Cells(i, 3) = Distance
Cells(i, 4) = Distance * 1.609344 'km

'Route distances
objRoute.Waypoints.Add objMap.FindResults(LocOne).Item(1)
objRoute.Waypoints.Add objMap.FindResults(LocTwo).Item(1)
objRoute.Calculate

Distance = objRoute.Distance
Cells(i, 5) = Distance
Cells(i, 6) = Distance * 1.609344 'km

i = i + 1
Loop

'Insert map in Excel
objMap.DataSets.ZoomTo 'Zoom sur la map
sFileName = "\\Exchange-srv\Alexandre\Recherche\MapPoint\Map.ptm"
objMap.SaveAs sFileName
ActiveSheet.OLEObjects.Add(Filename:=sFileName, Link:=False,_ DisplayAsIcon:=False).Select

End Sub
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 05-25-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,047
Re: As the crows flies and rail

Hi,

For railway distance I think the only possible way is to put Location objects and calculate distance in segments.

What exacly do you mean by 'maritime distance' ? Do you mean the distance in Nautical miles ?
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 05-25-2007
Junior Member
White Belt
 
Join Date: May 2007
Location: Montreal
Posts: 11
Re: As the crows flies and rail

Hi Wilfried,

For the railway distance, that’s what I though.

By 'maritime distance', I mean distance between two ports in km. As a crow flies distance is a good approximation, but imprecise. For example, look at the way to get the Montreal port when coming from Europe.

Thank you again,

A. Ouellet

P.S: Sorry again for english mistakes
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 05-26-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,047
Re: As the crows flies and rail

Hi,

I understeand, thanks for clarify. I think with maritime distance it will be the same problem as for rail distance.
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


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/crows-flies-rail-5898.html

Posted By For Type Date
Minnesota Map and Map of Minnesota - MapPoint State Map Gallery - MP2K Magazine This thread Refback 05-27-2007 04:58 PM
The Magazine for MapPoint - MP2K Magazine This thread Refback 05-25-2007 10:03 PM

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
Distances 'as the crow flies' TRK MapPoint 2006/2009 Discussion 4 01-20-2007 03:25 AM


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


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

Catered Ski Holidays
Book catered ski holidays online at Holiday Hypermarket. Our powerful ski holidays search will find you great deals for low prices.

Business Travel Agent
Leading Business Travel Agent. Personal service is at the heart of our business. Talk to one of our travel agents today.

Cape Town Flight
Book a Cape Town Flight for great value when you book through dealchecker.co.uk. It doesn't take long to find the latest great deals for you.

Barbados Holidays
Barbados holidays can be a wonderful break from the rat race or an exciting, action packed adventure. Plan the perfect holiday in Barbados.

Cheap Morocco Holidays
Cheap Morocco holidays may be the answer to your cheap holiday search. With sunshine throughout most of the year it can be great value if you avoid the peak season. Why not include a trip to the small tranquil town of Chefchaouen Tangier in your visit?

Holiday Comparison
We can help you with holiday comparison when you check out the options at Travel.co.uk

Holidays in Florida
Take a break! Enjoy stunning coastline! Info on holidays in Florida available 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