[GraphHopper] Dynamic routing for Crisis/Disaster Areas
Peter K
peathal at yahoo.de
Mon Jan 20 11:36:57 UTC 2014
Hey Mark,
do you want to make the changes on the device and just download changed
ways? If yes, you could e.g. associate an access status to a GPS
coordinate. Additionally you'll have to create a custom FlagEncoder.
Then from that do:
for(point : pointsToUpdateAccess) {
QueryResult qr = locationIndex.findClosest(point.lat, point.lon, ...);
EdgeIteratorState edge = qr.getClosestEdge();
// now write the flags you create in your custom method
edge.setFlags(yourCustomEncoder.setAccess(edge.getFlags(), point.getAccessAsString()));
}
BTW: this will work only for the none-CH case. This can have okayish
performance for small areas like a city if you do
hopper.setInMemory(true, true)
Regards,
Peter.
> Hi Peter
>
> One of the applications we will use GraphHopper for is the provision
> of off line routeable maps for use on an Android Application in
> Disaster and Crisis Situations
>
> The maps will be created form OSM data exrtacted using a bounding box
> and Osmois particular to the disaster in question,. We envisage a new
> map being created once or twice per day to be downloaded when
> responders are bck at base with the latest data. This is a result of
> teh disaster and crisis mapping done in eal time by members of the
> Humanitarian Open Street map Team (HOT) who put in massive efforts
> mapping from Satellite Images.
>
> Part of the functionality of the Android App will be to allow people
> in the filed to note road closures , etc, information that will affect
> routing in these areas.
>
> We have been considering how best to implement this featute so that
> the routing graph is updated to reflect the changes as soon as
> possible. In this way, the Off Line App becomes a very useful tool for
> responders to figure out how to get from A to B with very up to date
> information form the APP reported by others.
>
> Our first thought was to actually update the OSM database with a Node
> in the road and a cost or similar that prevented the route to occur,
> but I expect we will meet some resistance to this, primarily because
> the data will need to be cleaned up at some stage and there is no way
> to make sure this happens, hence future routing will be an issue
>
> It occurred to me that there must be a way to do it at the time the
> Graph is created. IN a perfect world, we would our like App to be able
> to flag road sections as follows:
>
> Totally Impassable
> Passable on Foot only
> Passable by Cyclist Only
> Passable by Motor Cycle Only
> Passable by 4WD only
> Open (not flagged at all)
>
> (Obviously, if a 4WD can pass, it means that the Foot, Motor Cycle,
> Cyclist, etc can also pass)
>
> Do you see any way that this could be implemented at Graph Creation Time?
>
> One thought I had was a separate file of Lats/Longs and a code that
> indicated the road status flag, or no flag if road in normal state.
> This file could be preprocessed prior to running the GraphHopper
> graph creation on the OSM file itself or as part of the Graph Creation
> Process
>
> I would be very keen to hear your thoughts or anyone else's on how
> best to implement this.
>
> This is a Humanitarian project we are doing at no cost and will make
> freely available to the community, anyone who wants to use it.
>
>
> Kind Regards
>
> Mark Cupitt
>
> "If we change the world, let it bear the mark of our intelligence"
>
More information about the GraphHopper
mailing list