Hi Peter, My bad. My validation logic was not correct. I literally compared updated speed value to expected speed value using equal comparator. They are always different as the way Graphhopper processes double value.
When I provided 1.0 variance in the comparison (i.e. Math.abs(current_speed - new_speed) > 1.0), I could confirm that the graph data actually flushed and persisted to disc. By the way, is the speed used in Graphhopper km/hour or mile/hour? Kind Regards, Tuan. On 3 July 2015 at 01:28, Peter <[email protected]> wrote: > Hi Tuan, > > hmmh, good question :) > > Did you try the RAMDataAccess with store to true and try if this works? > Maybe you can create a small and failing test? > > Regards, > Peter > > > On 02.07.2015 15:22, Tuan Nguyen wrote: > > Hi, > > In my project, I created a GraphHopper object with following > initialization: > hopper = new GraphHopper(); > hopper.setCHEnable(false); > hopper.setMemoryMapped(); > hopper.setOSMFile(PBF_FILE); > hopper.setGraphHopperLocation(GRAPH_FOLDER); > encoder = new CarFlagEncoder(); > hopper.setEncodingManager( new EncodingManager( encoder ) ); > hopper.setPreciseIndexResolution(20); > hopper.importOrLoad(); > > I then used Map Matching component to find and update speed of a number > of edges. I could confirm that this update was successful as the routing > results before & after updating speed were different. > > However, when I tried to persist the updated edges by calling > hopper.getGraph().flush(), the new speed was not stored to disc. > > MMap was used as DataAccessType so I suppose flush is enabled. > > Am I missing anything here? > > Kind Regards, > Tuan. > > > _______________________________________________ > GraphHopper mailing > [email protected]https://lists.openstreetmap.org/listinfo/graphhopper > > > > _______________________________________________ > GraphHopper mailing list > [email protected] > https://lists.openstreetmap.org/listinfo/graphhopper > >
_______________________________________________ GraphHopper mailing list [email protected] https://lists.openstreetmap.org/listinfo/graphhopper
