| | Anonymous 03-04-2005, 07:35 AM Hi,
I am evaluating the use of MapPoint for a web application, so I'm less than a newbie.
My main goal is to extract, having the starting and ending point, "the best route"; where "the best" is not the shortest or the fastest, but the one that best satisfy some criteria.
My question is :
It's possible to extract more than one route with the same start point and the same end?
or, better :
It's possible to create some "points-of-interest" in the MapPoint database, assigning them property like "class of Interest" and "Weight of Interest", and them devolve to MapPoint the job to extract the best route?
I hope that my English is good enough to make me understand.
Thank you to everybody
Marcello Wilfried 03-05-2005, 01:33 PM Hi,
Yes you can set each waypoint to Quickest / Shortesd or Perferred. And for each waypoint you can set all speed limits and preferred roads on a scale 0..10. Anonymous 03-07-2005, 04:47 AM Hi Wilfried,
I was looking in the SDK and for "SegmentPreference Enumeration" the only preference I found were Quickest and Shortest.
There is a particular way to set other criteria?
thank you for the help.
Marcello Wilfried 03-07-2005, 12:28 PM Hi Marcello,
There are 3 of them:
geoSegmentQuickest = 0,
geoSegmentShortest = 1,
geoSegmentPreferred = 2, Anonymous 03-08-2005, 02:35 AM Thanks Wilfred,
I think this is not useful for me. As I can understrand wirh "geoSegmentPreferred" you can select preferences about the type of road (highways, major roads ...).
I need to calculate the "best" road for my criteria, the one for example that pass near some hotels, or restaurants.
Marcello Wilfried 03-08-2005, 06:20 AM Hi Marcello,
What you eventually can do is create a database with the interesting points, hotels, restorants, etc that you want. Store also in database the coordinates of it. Then after calculation of the road, you search for each via point if you have interesting points nearby. Then calc the road again with these points as waypoint.
Hope I make sence ... Anonymous 03-09-2005, 06:18 AM Yes Wilfried,
that was the solution I was thinking.
But yesterday nigth, during a meeting, the customer changed Idea about the logic :twisted: .
So now I have to calculate, once extracted from a database a set of 'interesting' waypoint, a route that touck all (or some) of then
Maybe I'm abusing of your patience, but this new logic generate 2 new question :
. It's possible to extract a route without knowing the first and the last waypoints?
. The waypoits must be passed in 'visit order' or you can devolve to MapPoint the work to extract the shortest (fastest) route that incudes all of them?
Thank you for your help
Marcello Wilfried 03-09-2005, 02:54 PM Hi Marcello,
Dont understeand :( My english is too bad :(
Please try to explayn exacly what customar wants. This is to get a more clear view on the problem. Anonymous 03-10-2005, 03:20 AM Hi Wilfried,
my English is bad too,I'm Italian, sorry :wink:
The problem is (simplified):
. insert in a Database a number of "Point of interest" (museums, parks, lakes, sport spots, ...) and then connect them with MapPoint localization
. the user of the site give his preference (I like fishing and climbing)
. based on the user choiches, I have to extract, from the database, a set of "Point of interest" that the user could visit
. I have then to calculate and suggest the route
So I don't know :
. the starting and the ending point of the route
. the shortest way for touch all the "Point of interest", so the order of the
waypoints
Thank you
Marcello
I hope now i Wilfried 03-10-2005, 10:14 AM Hi Marcello,
You have an intersting problem :)
So the biggest problem is:
- how to move all the points in such a way that mappoint can calculate a route (because the points can be in _any_ geografical order)
- where to begin and end the route
Have I understeand more or less ?
Hmm I have to think on this... need coffee !!!! Anonymous 03-11-2005, 02:54 AM Yes Wilfried,
that is the problem, calulate a route with points with no order and no starting or ending point.
I visit your site and I found you are a Delphin (and also a "Clipper-man").
It's exactly my professionalbackground! :wink:
Was the coffee good?
Marcello Wilfried 03-11-2005, 07:13 AM Hi Marcello,
Clipper is a long time ago, and yes the coffee was good :)
I assume the user has to pick somewhere a starting point (where he is), and where he wants to end, and you have to give him all the points that are near to his "tour" he wants to make.
I have code to calculate bearing and distance (trough the bird's eye) from 2 points latitude and longitude. So this way it is easy to find the nearest place in a particular direction. I have it in C and in Delphi, if you wants it then I drop it here.
So if that is more or less waht you have to accomplish I think the algoritm has to be something like:
- find nearest point of interest from starting place in direction of end place
- put it as waypoint to mappoint
- do again until eind point is closer than next point.
I "think" it has to be something like that. Maybe it is a start ? What do you think ? Anonymous 03-11-2005, 09:42 AM Hi Wilfried,
also for me Clipper is only a postcard from the past.
I think that your suggestions are good and I will follow them.
Thank you for the code, but in this moment I'm just offering the solution to my customer, Monday evening I will have a meeting, I will inform you about.
So, if I will need the code, I will ask you in a second moment.
Thank you for your kindness.
Marcello Wilfried 03-11-2005, 01:58 PM Hi Marcello,
Ok. I hope this go trought. because it is an interesing project :)
Have success with you meeting. Anonymous 03-14-2005, 04:36 AM Hi Wilfried,
in the weekend I was looking information in MSDN, and I discovered that in MapPoint 2004 there is a feature of "Route optimization".
Do you know if is this usefull for my problems and if is posssible to use both services (MapPoint 2004 and MapPoint Web Services) in the same project?
Tomorrow I will tell you about the results of the meeting.
Bye
Marcello Wilfried 03-14-2005, 06:03 AM Hi Marcello,
You mean the Optimize method ? I never tryed that one. As for the 2 project in one I dont think this can give any problem, but again: I did never try it. Maybe someone else can confirm this ? Anonymous 03-15-2005, 03:39 AM Hi Wilfried,
yes I was thinking about Optimize method, that should resolve my problem.
I will try, at the moment I don't still have MapPoint, and then I will tell you.
It seems me that westerday night meeting was good (now I'm starting to belive to catch the project), the customer introduced some new requests. so nothing is still decided.
I have a new meeting on Monday night.
Thank you & bye
Marcello Wilfried 03-15-2005, 01:38 PM Hi Marcello,
now I'm starting to belive to catch the project
I hope you catch it. Your project seems not easy but interesting and that is what matters, because it sharpes programmers imagination. An intersting project is like a good old Italian wine, you enjoy whilst tasting it :) | |