On Tue, Sep 7, 2010 at 11:36, Oleg Demchenko <[email protected]> wrote: > 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.
No, IDataSet is the map. TrafficData is temporary data and used live in the metric and not stored in the map. The TMC-implementation for traffic data stores messages in it's own H2-database until they expire. > 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. If the h2.jar in your classpath? The databse is created if it does not exist. > OK, I commented myTrafficMessages initialization and set > Collection<TrafficMessage> allMessages = null during initialization. So, not > traffic blocks anymore :-) Works too. ;) > 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. It is supposed to use the supplied map to find out if you are without a city-polygon or within a radius around a city-node. It may reuse the address-database build during map-import if I remember correctly. _______________________________________________ Routing mailing list [email protected] http://lists.openstreetmap.org/listinfo/routing
