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

Route Segment

This is a discussion on Route Segment within the Development forums, part of the MapPoint Desktop Discussion category; Hi, simple question: how route segment works? I mean are they straight line (like a bird view) between 2 points? ...

  1. #1
    lacja is offline Member Yellow Belt
    Join Date
    Aug 2006
    Posts
    47

    Route Segment

    Hi,

    simple question: how route segment works? I mean are they straight line (like a bird view) between 2 points?

    I'm trying to calculate a distance between the route an a point (mouse click).

    I'm using distanceto method. Works alomost well when the part of the road is straight but, this is not enough.

    My final goal is to be able to determine if a vehicle is far or not from our calculated route.

    Thanks

  2. #2
    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: Route Segment

    DistanceTo gives you straight line (technically a great circle) distance.

    MapPoint does support proper routing. Have a look at the Route object, accessible via the Map object's ActiveRoute property.

    Note that your two points near to roads - otherwise a valid route won't exist. It will also take longer to compute.


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

  3. #3
    lacja is offline Member Yellow Belt
    Join Date
    Aug 2006
    Posts
    47

    Re: Route Segment

    Thanks for your answer.

    Yes I've take a look at the route object.

    My problem is to detect when the vehicle displayed on the map is following the calculated route or not.

    My the current position of a vehicle and the destination, I display a calculated route.

    Then, I receive every second a new gps position of my vehicle. I display the vehicle moving on the map.
    I just want to be able to detect if the vehicle took my calculated route.
    If not, I'll just calculate a new route.

    They only way I've found to detect if the vehicle didn't took the original route is to calculate the distance from my vehicle position to the route using DISTANCETO method.

    But, I've notice that the route segment is not the same than the route we can see.

    Any better idea?


    So, each seconds I get a gps position for my vehicle. I display it on the

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

    Re: Route Segment

    Hi,

    I think the closest you get is the distance to a route segment as you do now.

  5. #5
    lacja is offline Member Yellow Belt
    Join Date
    Aug 2006
    Posts
    47

    Re: Route Segment

    Hi,

    I think you're right but is it also correct if I say that route segment are straight lines (like bird view). My formula that calculates the "distanceto" gives me strange results when the route gets curved.

    If this is true, is there any way to solve this?

  6. #6
    app_2_win is offline Member Yellow Belt
    Join Date
    Oct 2008
    Location
    Central Oregon
    Posts
    34

    Re: Route Segment

    Quote Originally Posted by lacja View Post
    Thanks for your answer.

    Yes I've take a look at the route object.

    My problem is to detect when the vehicle displayed on the map is following the calculated route or not.

    My the current position of a vehicle and the destination, I display a calculated route.

    Then, I receive every second a new gps position of my vehicle. I display the vehicle moving on the map.
    I just want to be able to detect if the vehicle took my calculated route.
    If not, I'll just calculate a new route.

    They only way I've found to detect if the vehicle didn't took the original route is to calculate the distance from my vehicle position to the route using DISTANCETO method.

    But, I've notice that the route segment is not the same than the route we can see.

    Any better idea?


    So, each seconds I get a gps position for my vehicle. I display it on the
    The only way I could do this was to sync up at route points. In tricky areas I would put info points that would not route, but were in my database. When you fill out the MP survey, this type of stuff is what the activeX is lacking... but you know it's in there somewhere because the MP program does it.
    Larry

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. To Determine if a point belongs to a route segment
    By PeppeM in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-08-2006, 08:00 AM
  2. how to get region from a route segment
    By paragon in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-24-2005, 03:09 PM
  3. Changing cost of a route segment
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 04-27-2004, 01:02 PM
  4. Geocoding - find what street segment I am on...
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-31-2004, 12:16 AM
  5. Calculate route with Segment preferences vs optimize
    By David Kachuck in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-03-2003, 04:29 PM

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