[polygons/osm] Adding a unified neighborhood reverse geocoder incorporating Zetashapes, OSM and Quattroshapes. Uses the new Soft TFIDF implementation to approximately match OSM names to Quattroshapes/Zetashapes names and geohash indices for more coarse point-in-polygon tests (OSM neighborhoods are stored as points not polygons, so need to match with a geometry from the other sources)
This commit is contained in:
@@ -2,6 +2,13 @@ VISIT, VISIT_EDGE, POST_VISIT = range(3)
|
||||
|
||||
|
||||
def strongly_connected_components(graph):
|
||||
'''
|
||||
Find strongly connected components in a graph using iterative
|
||||
depth-first search.
|
||||
|
||||
Based on:
|
||||
http://code.activestate.com/recipes/578507-strongly-connected-components-of-a-directed-graph/
|
||||
'''
|
||||
identified = set()
|
||||
stack = []
|
||||
index = {}
|
||||
|
||||
Reference in New Issue
Block a user