From 2ba8c2f1b57dfe476f1ccec29bcdb44828f2bb7c Mon Sep 17 00:00:00 2001 From: Justin Kunimune Date: Fri, 20 Sep 2019 16:21:24 -0400 Subject: [PATCH] =?UTF-8?q?What=20=5Fis=5F=20this=E2=80=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This script doesn't even compile! --- src/zupplemental/generate_lakes.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/zupplemental/generate_lakes.py diff --git a/src/zupplemental/generate_lakes.py b/src/zupplemental/generate_lakes.py deleted file mode 100644 index 15dda16..0000000 --- a/src/zupplemental/generate_lakes.py +++ /dev/null @@ -1,29 +0,0 @@ -import math -import numpy as np -import shapefile - -from helpers import plot - - -SOURCE = 'ne_50m' -SKIP = 1 -MAX_RANK = 2 -INCLUDE_LAKES = False - - -"""data from http://www.naturalearthdata.com/""" -sf = shapefile.Reader("../data/{}_lakes".format(SOURCE)) -for record, lake in zip(sf.records(), sf.shapes()): - if float(record[-2]) > MAX_RANK: #if this lake isn't important enough - continue #skip it - - x1l, y1l, x2l, y2l = lake.bbox - for i, continent in enumerate(final_coasts): - xc, yc = zip(*continent) - x1c, y1c, x2c, y2c = min(xc), min(yc), max(xc), max(yc) - if x1c < x1l and y1c < y1l and x2c > x2l and y2c > y2l: #if this continent contains this lake - curve = lake.points[0:len(lake.points):SKIP] - if curve[-1] != lake.points[-1]: curve.append(lake.points[-1]) - split_points[continent[0]] = split_points.get(continent[0], []) + [len(continent)+p for p in lake.parts] #mark the movetos - final_coasts[i] = continent + curve #add it - break \ No newline at end of file