graphhopper/graphhopper — pull request #226 by cgarreau (2014-06-26 16:17:09+00:00)
Title: Partial fix for #86 - removing dead-end small subnetworks

Hi,
This implements a solution to the "route not found" issues when the nearest point is link to a dead-end subnetworks.

The algorithm is the following:
- First loop on nodes using a one-way explorer ;
- It gives a list of all the sub-networks with their size ;
- Sort the list by size (bigger first) in order to keep the big networks and kill all small networks (size < minNetworkSize).
- For each sub-network (identified by its first nodeid) explore all nodes starting from this nodeId and not in the big networks (>minNetworkSize) and remove them ;

The algorithm is done twice (forward and backward).

We do it only for mono-encoding manager.
Tested on worldwide map. it fixes all issues we have identified (a few hundred of routes among a test file of 5000).