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

Speed Limit or Street Type

This is a discussion on Speed Limit or Street Type within the MapPoint Desktop Discussion forums, part of the Map Forums category; How can I extract the street type from a Location object. I am reverse geocoding Lat/Lon from NMEA data and ...

  1. #1
    Srini is offline Junior Member White Belt
    Join Date
    Aug 2005
    Posts
    4

    Speed Limit or Street Type

    How can I extract the street type from a Location object. I am reverse geocoding Lat/Lon from NMEA data and want to get the speed or the RoadType. Can I get this without creating a route object and adding them as waypoints ?

    Thanks

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

    I dont think you can
    But how do you extract this information with a route object ?

  3. #3
    Srini is offline Junior Member White Belt
    Join Date
    Aug 2005
    Posts
    4
    But how do you extract this information with a route object ?
    I am not sure . I was browsing the help and saw this

    objRoute.DriverProfile.Speed(geoRoadLimitedAccess) = 55

    So I though there might be some way to do it using a Route object to get the geoRoadType . Mappoint has this information as it uses it in computing the time to travel. Its just a question if this is exposed as an API ?

    I cannot believe MS would not expose such crucial data for most mapping needs.

    Thanks

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

    You need exacly what I needed a while ago but I could not find it Maybe someone else knows it _if_ it is exposed in the API...

  5. #5
    Srini is offline Junior Member White Belt
    Join Date
    Aug 2005
    Posts
    4
    I tried this trick but it does not work. The idea was to get the drive time and distance to a very close location and compute the speed. But the speed is too low. Either I am missing something or Mappoint takes into consideration turns and stops etc.

    try
    {
    MapPoint.Location Loc;
    Loc = MP.ActiveMap.GetLocation(32.897125,-117.119782,1.0);
    MP.ActiveMap.ActiveRoute.Waypoints.Add(Loc,"Loc1") ;
    MapPoint.FindResults FR = Loc.FindNearby(1.0);
    object O = null;
    //Get the farthest object
    foreach(object L in FR)
    {
    O = L;
    }
    MP.ActiveMap.ActiveRoute.Waypoints.Add(O,"Loc2");
    MP.ActiveMap.ActiveRoute.Calculate();
    double d = MP.ActiveMap.ActiveRoute.Distance;
    double t = MP.ActiveMap.ActiveRoute.DrivingTime ;
    double t1 = t*24; //Same result if divide by geoOneHour
    double s = d/t1;
    MessageBox.Show("Distance = " + d.ToString() + "\r\nTime=" + t1.ToString() + "\r\nSpeed=" + s.ToString(),"Ave Speed" );
    }
    catch(Exception E)
    {
    MessageBox.Show(E.Message.ToString());
    }

    Can anyone shed some light on why the result is not correct ? The speed comes to around 4 MPH if get the nearest and about 12 for farthest.

    Thanks

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

    or Mappoint takes into consideration turns and stops etc.
    Great idea, but I think you right, wont work...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Getting the speed limit at a particular coordinate
    By BobFromBoston in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 09-13-2011, 09:48 PM
  2. Street type from coords
    By michele in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 05-10-2006, 09:36 AM
  3. street address limit
    By bob in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 11-04-2003, 08:51 AM
  4. Limit map ????
    By douglas in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-06-2003, 06:45 PM
  5. What is the actual limit?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-03-2002, 03:53 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