[osm] build OSM training data for intersections using the JSON output from intersections.py rather having to compute each time
This commit is contained in:
@@ -1027,7 +1027,7 @@ class OSMAddressFormatter(object):
|
||||
if i % 1000 == 0 and i > 0:
|
||||
print('did {} formatted places'.format(i))
|
||||
|
||||
def build_intersections_training_data(self, infile, out_dir, way_db_dir, tag_components=True):
|
||||
def build_intersections_training_data(self, infile, out_dir, tag_components=True):
|
||||
'''
|
||||
Intersection addresses like "4th & Main Street" are represented in OSM
|
||||
by ways that share at least one node.
|
||||
@@ -1053,8 +1053,7 @@ class OSMAddressFormatter(object):
|
||||
|
||||
replace_with_base_name_prob = float(nested_get(self.config, ('intersections', 'replace_with_base_name_probability'), default=0.0))
|
||||
|
||||
reader = OSMIntersectionReader(infile, way_db_dir)
|
||||
for node_id, latitude, longitude, ways in reader.intersections():
|
||||
for node_id, latitude, longitude, ways in OSMIntersectionReader.read_intersections(infile):
|
||||
if not ways or len(ways) < 2:
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user