Fix lost of the last iteration in cycle

This commit is contained in:
alexey-zakharenkov 2020-02-26 13:33:58 +03:00 committed by GitHub
parent fc376dfa7a
commit 55dbcf8c7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -793,7 +793,7 @@ def import_osm():
polygons = []
for way in outer:
rings = [way_to_wkt(nodes, way['nodes'])]
for i in range(len(inner)-1, 0, -1):
for i in range(len(inner)-1, -1, -1):
if bbox_contains(way['bbox'], inner[i]['bbox']):
rings.append(way_to_wkt(nodes, inner[i]['nodes']))
del inner[i]