projects of interest? - mebot
Tim Newsom
cephdon at gmail.com
Wed Jul 18 22:38:31 CEST 2007
On Wed, 18 Jul 2007 12:51, Brad Pitcher wrote:
>> Actually, I was thinking of offloading that work to a mashup like
>> interface.. Say google maps or what not and just displaying the result.
>
> But google maps doesn't reorder destinations to create the optimal path
> does it?
No idea. That's why I said "or what not" /grin.
I know you can build maplets.. But I have never done it and I don't know
what possible there. I am going to assume that you have the ability to
enter a starting point... (Maybe where you are right now).
Then if the mapplets are just plotting functions the best you can do is
find a route. However, there are functions to find the shortest
distance, shortest time etc.. A test would need to be provided to see if
you could enter a set of gps coords as "waypoints" or whatever you call
them and then say map by shortest distance. Maybe it only works in the
order you provide the points.
In that case, (I think mapplets are only Javascript but I don't know)
assuming there is a programming interface you could upload to the
mapplet a set of points and the starting point... Then it could iterate
through the remaining possibilities till it finds the route...
I.e. What the distance from start to each point...
Find the shortest and then find the distance from that one to the ones
remaining.. Continue until completed. That gives you the order for the
points.
Really, you could guess the order based on distance between gps coords,
but that won't take into consideration road length... I.e. From the top
of a mountain to the bottom might be 3 miles based on gps coords, but
due to the winding roads its more like 10 or 15... Kinda big error
there.
Anyway, if you include an external server and sufficient software the
rendering could be pretty quick. And I am guessing most people won't
have more than 20 or 30 places to go in a day... But even at 100, the
sorting time could be pretty small.
I grant you, its not the most efficient algorithm.. But it should do the
trick.
You could add additional features such as end where you started... So it
could balance the travel with the last few stops closest to where you
began, etc. Many ways to do that.
Or another variation on this theme, assuming you have access to a
directory listing, traffic and weather data and you know the category of
some tasks (groceries, gas, books) or maybe the category of locations
(grocery store, gas station, book store) or how about a specific one in
case you have a preference (76, chevron, barns and noble, safeway or
albertsons) - btw, I am in the USA so exchange with names in your
country -
Then once the tasks in your lists are categorized have the mapped route
take you to the closest places based on those and sort in the shortest
time or distance and take into account traffic and weather conditions.
Anyway, its just an idea built upon an idea.
--Tim
More information about the community
mailing list