From 0b2d3d965f854fc1e9f61cc09f6276ad002344cb Mon Sep 17 00:00:00 2001 From: Al Date: Fri, 19 Aug 2016 12:23:08 -0400 Subject: [PATCH] [fix] using lat/lon from the node properties in intersections data --- scripts/geodata/osm/formatter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/geodata/osm/formatter.py b/scripts/geodata/osm/formatter.py index 263c28f1..6b8bd648 100644 --- a/scripts/geodata/osm/formatter.py +++ b/scripts/geodata/osm/formatter.py @@ -1051,7 +1051,7 @@ class OSMAddressFormatter(object): all_name_tags = set(OSM_NAME_TAGS) all_base_name_tags = set(OSM_BASE_NAME_TAGS) - for node_id, latitude, longitude, ways in OSMIntersectionReader.read_intersections(infile): + for node_id, node_props, ways in OSMIntersectionReader.read_intersections(infile): distinct_ways = set() valid_ways = [] for way in ways: @@ -1063,6 +1063,9 @@ class OSMAddressFormatter(object): if not ways or len(ways) < 2: continue + latitude = node_props['lat'] + longitude = node_props['lon'] + try: latitude, longitude = latlon_to_decimal(latitude, longitude) except Exception: