diff --git a/intro-sequence/tools/city/fetch_osm.py b/intro-sequence/tools/city/fetch_osm.py index d442add87..e1e9dd144 100644 --- a/intro-sequence/tools/city/fetch_osm.py +++ b/intro-sequence/tools/city/fetch_osm.py @@ -394,7 +394,7 @@ def nyc_extra(slug, F): print(f" {p['kind']:9s} {p['x']:8.1f} {p['y']:8.1f} {'in ' if p['inside'] else 'OUT'} {p['name']}") found = {k: [p for p in pads if p['kind'] == 'heliport' and k.split()[0].lower() in p['name'].lower() and 'heliport' in p['name'].lower()] for k in KNOWN_HELI} - helipads = [[p['x'], p['y'], p['name'] or p['kind']] for p in pads] + helipads = [[p['x'], p['y'], p['name'] or (f"{p['kind']} {p['ref']}".strip())] for p in pads] write_json(os.path.join(OUT, slug, 'extra.json'), {'helipads': helipads, 'detail': pads, diff --git a/intro-sequence/tools/city/geo.py b/intro-sequence/tools/city/geo.py index fce78dc50..5525d17e9 100644 --- a/intro-sequence/tools/city/geo.py +++ b/intro-sequence/tools/city/geo.py @@ -221,8 +221,8 @@ def clip_polyline(pts, xmin, ymin, xmax, ymax): pieces.append(cur) cur = [] continue - a = (x1 + t0 * dx, y1 + t0 * dy) - b = (x1 + t1 * dx, y1 + t1 * dy) + a = (x1, y1) if t0 == 0.0 else (x1 + t0 * dx, y1 + t0 * dy) + b = (x2, y2) if t1 == 1.0 else (x1 + t1 * dx, y1 + t1 * dy) if not cur: cur = [a, b] else: