[Routing] IRouteMetric selection for TurnRestrictedMultiTargetDijkstraRouter route method
Oleg Demchenko
oleg.demchenko at gmail.com
Tue Sep 7 10:36:57 BST 2010
Hi Marcus.
First of all thank you for you prompt response. Debugging my data I've
review your metric/navigation code and found it very smart,
precise and heuristic.
Regarding Traffic messages: my understanding that using iDataset specified
for a metric object you are creating several tables there and downloading
(probably using other plugin/process) to those tables traffic data from an
external source.
Error happened during execution of
private TrafficMessageStore myTrafficMessages = TrafficMessageStore.
getInstance();
I think reason was I forgot initialize metric object iDataset with setMap
method. Type of error was : cannot find datasource.
OK, I commented myTrafficMessages initialization and set Collection<
TrafficMessage> allMessages = null during initialization. So, not traffic
blocks anymore :-)
Also I've met some challenges to find way maxspeed within getEstimatedSpeed
method.
1) Method can't determine a country (there is no country specified in
attributes for the most ways/nodes in a file) and fails with exception
trying to find max speed for a country (DEFAULTCOUNTRY) and way type. OK,
I've corrected a code a little bit, because I "know" a country.
2) There is a challenge within TrafficRuleManage class, when metric trying
to check inCity attribute. Exceptions happens within public static
IAddressDBPlaceFinder getCities(final IDataSet aMap). Can you tell me more
how it is working?. It is supposed call to external service/application or
class should find it using *.OSM (iDataSet) data itself? How can I set city
borders for my (country) area/data? I really would like to keep this logic,
because car speed within cities is slower.
Thank you for a links to the latest sources sent. I will use them for sure.
At some later time these:
http://travelingsales.svn.sourceforge.net/viewvc/travelingsales/trunk/osmnavigation/src/org/openstreetmap/travelingsalesman/navigation/traffic/
may be used. Currently they are only used for getEstimatedSpeed() .
Marcus
> --
> All the best
> Oleg Demchenko
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/routing/attachments/20100907/f9981df5/attachment.html>
More information about the Routing
mailing list