From 8609ccbb1d584750cbb37723f2b743201b79a4ad Mon Sep 17 00:00:00 2001 From: Al Date: Mon, 19 Oct 2015 15:40:43 -0400 Subject: [PATCH] [polygons/osm] lon, lat --- scripts/geodata/osm/osm_admin_boundaries.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/geodata/osm/osm_admin_boundaries.py b/scripts/geodata/osm/osm_admin_boundaries.py index 027a5294..1c50f2cb 100644 --- a/scripts/geodata/osm/osm_admin_boundaries.py +++ b/scripts/geodata/osm/osm_admin_boundaries.py @@ -166,9 +166,10 @@ class OSMAdminPolygonReader(object): if lat is None or lon is None: continue # Nodes are stored in a sorted array, coordinate indices are simply - # [lat, lon, lat, lon, ...] so the index can be calculated as 2 * i - self.coords.append(lat) + # [lon, lat, lon, lat ...] so the index can be calculated as 2 * i + # Note that the pairs are lon, lat instead of lat, lon for geometry purposes self.coords.append(lon) + self.coords.append(lat) self.node_ids.append(node_id) elif element_id.startswith('way'): way_id = long(element_id.split(':')[-1])