diff --git a/Karte_Deutschland_backup.svg b/Karte_Deutschland_backup.svg deleted file mode 100644 index af3b883..0000000 --- a/Karte_Deutschland_backup.svg +++ /dev/null @@ -1,8 +0,0 @@ - - -image/svg+xml - - - - - diff --git a/coordinates.txt b/coordinates.txt deleted file mode 100644 index 8667e27..0000000 --- a/coordinates.txt +++ /dev/null @@ -1,68 +0,0 @@ -using offline data... -Removing non-german points... -51.2670186 7.145392 {/dev/tal} -50.8924622 5.9712601 {ACKspace} -47.37861 8.54924 {Bastli} -49.00985285639763 12.118982076644897 {Binary Kitchen} -50.7851514 6.1077813 {CCC Aachen} -53.0815 8.8154 {CCC Bremen} -49.46369 8.48862 {CCC Mannheim} -47.993194 7.840502 {CCCFr} -51.37435 7.69803 {Chaosconsulting} -51.438476 7.024991 {Chaospott} -50.830659 12.939537 {Chaostreff Chemnitz} -52.389424 13.078555 {Chaostreff Potsdam (CCCP)} -51.62435592244 7.1690101828426 {Chaostreff Recklinghausen c3RE} -51.527611 7.4649449 {Chaostreff-Dortmund} -53.617 8.091 {Do It Yourself Werkstatt Wilhelmshaven} -49.0067 8.407438 {Entropia} -49.574 11.03 {FAU FabLab} -52.485936 7.333012 {Forschung und Technik e.V.} -52.168625 9.947232 {Freies Labor} -52.03746 5.9026 {Hack42} -52.038224 8.533056 {Hackerspace Bielefeld e.V.} -51.8334 5.88321 {Hackerspace Nijmegen} -53.6011 11.4183 {Hacklabor} -49.240431 6.973817 {Hacksaar} -50.86904 8.00464 {Hackspace Siegen} -50.9292 11.5826 {Krautspace} -52.371484 9.719891 {LeineLab} -49.61629 6.07057 {Level2} -53.231056 6.58389 {Maakplek} -53.14402 8.21988 {Mainframe} -52.119561 11.629398 {Netz39} -50.7396374 7.0965597 {Netzladen} -49.801806 9.923105 {Nerd2Nerd} -51.54533 9.94526 {Noklab} -48.35771 10.886797 {OpenLab Augsburg} -50.8975 14.8044 {Polytechnischer Werkraum Zittau} -47.629304 8.26288 {Reaktor 23} -52.2785658 10.5211247 {Stratum 0} -51.3694 6.16998 {TDvenlo} -52.222388 6.872435 {TkkrLab} -51.9436176 7.6381682 {Warpzone e.V.} -50.81615 8.77851 {[hsmr]} -49.901927 10.892739 {backspace} -48.77082 11.38182 {bytewerk} -51.3182536 9.4848149 {flipdot} -50.268509 10.950683 {hackzogtum} -50.558867664 9.677546918 {mag.lab} -53.8688 10.6712 {nbsp} -47.77252 9.19997 {see-base} -48.777 9.236 {shackspace - stuttgart hackerspace} -48.3965 9.99023 {verschwoerhaus} -48.065002 8.456495 {vspace.one} -51.53575 7.69172 {UN-Hack-Bar} -50.722616453 12.480350733 {z-Labor Zwickau} -50.0544334 10.3106613 {SchonungsLos} -53.55410215 9.9456255 {MERGED: CCC Hamburg Attraktor Makerspace} -50.9519801 6.921542349999999 {MERGED: DingFabrik e.V. CCC Cologne} -50.9779805 11.0382675 {MERGED: Makerspace Erfurt Bytespeicher} -48.156211 11.55450665 {MERGED: Munich Maker Lab MuCCC} -51.47996 11.99221 {MERGED: Terminal.21 Basislager Eigenbaukombinat Halle} -51.201397 6.738047 {MERGED: fNordeingang Chaosdorf} -54.798057 9.4328885 {MERGED: nordlab e. V. Chaostreff Flensburg} -51.48714765 7.2086889 {MERGED: spaceleft Das Labor} -51.05408455 13.72609615 {MERGED: turmlabor C3D2} -49.4626193 11.028578625 {MERGED: MERGED: K4CG FabLab Nürnberg Nerdberg} -52.506793175 13.45348525 {MERGED: MERGED: xHain c-base MERGED: Motionlab AFRA} diff --git a/draw_map.py b/draw_map.py deleted file mode 100755 index b3af452..0000000 --- a/draw_map.py +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/python -import requests -import json -import pickle -import os.path -import svgwrite -import math - -URL = "https://directory.spaceapi.io/" -NORTHERNMOST = 55.05 -EASTERNMOST = 15.033333 -SOUTHERNMOST = 47.270108 -WESTERNMOST = 5.866667 -threshold = 0.10 -YSPAN = NORTHERNMOST - SOUTHERNMOST -XSPAN = EASTERNMOST - WESTERNMOST -locations = {} -doorstati = {} -blacklist = ["Chaostreff Salzburg", "DevLoL", "CCC Basel", "Chaostreff Zürich", - "ChaosStuff", "Level2", "Bastli", "Maakplek", "TkkrLab", "Hack42", - "Hackerspace Nijmegen", "TDvenlo", "ACKspace"] - - -def dist(n1, n2): - y = n1[0] - n2[0] - x = n1[1] - n2[1] - return math.sqrt(math.pow(x, 2) + math.pow(y, 2)) - - -def conflict(targetlist, node): - returner = None - for element in targetlist: - if dist(node, targetlist[element]) < threshold: - returner = element - continue - return returner - - -def merge(n1, n2): - lat = (n1[0] + n2[0]) / 2 - lon = (n1[1] + n2[1]) / 2 - returner = [] - returner.append(lat) - returner.append(lon) - returner.append(n1[2] or n2[2]) - return returner - - -if os.path.isfile('locations.bin'): - print("using offline data...") - with open("locations.bin", "rb") as f: - locations = pickle.load(f) -else: - print("offline data not available, downloading...,") - r = requests.get(url=URL) - data = r.json() - for space in data: - spacerequest = None - try: - spacerequest = requests.get(url=data[space], timeout=1) - except requests.exceptions.RequestException as e: # This is the correct syntax - continue - try: - spacedata = spacerequest.json() - except json.JSONDecodeError as jde: - continue - if "location" in spacedata: - if "lat" in spacedata["location"]: - lat = spacedata["location"]["lat"] - lon = spacedata["location"]["lon"] - if "state" in spacedata: - if "open" in spacedata["state"]: - locations[space] = [float(lat), float( - lon), spacedata["state"]["open"]] - - for space in locations: - print(space + " " + str(locations[space])) - with open("locations.bin", "wb") as f: - pickle.dump(locations, f, pickle.HIGHEST_PROTOCOL) -print("Removing non-german points...") -german_locations = locations.copy() -for space in locations: - if locations[space][0] > NORTHERNMOST: - del german_locations[space] - elif locations[space][0] < SOUTHERNMOST: - del german_locations[space] - elif locations[space][1] < WESTERNMOST: - del german_locations[space] - elif locations[space][1] > EASTERNMOST: - del german_locations[space] - -for space in blacklist: - del german_locations[space] - - -finallist = {} -while german_locations: - n1 = next(iter(german_locations)) - conflictnode = conflict(finallist, german_locations[n1]) - if conflictnode == None: - finallist.update({n1: german_locations[n1]}) - del german_locations[n1] - else: - mergenode = merge(german_locations[n1], finallist[conflictnode]) - del german_locations[n1] - del finallist[conflictnode] - german_locations.update( - {"MERGED: " + n1 + " " + conflictnode: mergenode}) - -for space in finallist: - #print(space + " " + str(finallist[space][0]) + " " + str(finallist[space][1])) - print(str(finallist[space][0]) + " " + str(finallist[space][1]) + " {" + - space + "} Doorstatus: " + str(finallist[space][2])) - -dwg = svgwrite.Drawing('svgwrite-example.svg', profile='tiny') -dwg.add(svgwrite.image.Image(href="Karte_Deutschland.svg", size=(592, 801))) -dwg.add(dwg.circle(center=(0, 0), r=3, fill='black')) -for space in finallist: - ypoint = (801 - (((finallist[space][0] - SOUTHERNMOST) / YSPAN) * 801)) - xpoint = ((finallist[space][1] - WESTERNMOST) / XSPAN) * 592 - if finallist[space][2]: - dwg.add(dwg.circle(center=(xpoint, ypoint), r=5, fill='green')) - else: - dwg.add(dwg.circle(center=(xpoint, ypoint), r=5, fill='green')) -dwg.save() diff --git a/feddich.svg b/feddich.svg deleted file mode 100644 index 6267e7e..0000000 --- a/feddich.svg +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/feddich.svg.png b/feddich.svg.png deleted file mode 100644 index 9bf96a8..0000000 Binary files a/feddich.svg.png and /dev/null differ diff --git a/germany.svg b/germany.svg deleted file mode 100644 index e109b03..0000000 --- a/germany.svg +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/index.html b/index.html deleted file mode 100644 index 1362920..0000000 --- a/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/locations.bin.old b/locations.bin.old deleted file mode 100644 index f47092e..0000000 Binary files a/locations.bin.old and /dev/null differ diff --git a/merged.svg b/merged.svg deleted file mode 100644 index 2828c6d..0000000 --- a/merged.svg +++ /dev/null @@ -1,6 +0,0 @@ -image/svg+xml - - - - - \ No newline at end of file diff --git a/svgwrite-example.svg b/svgwrite-example.svg deleted file mode 100644 index dec543f..0000000 --- a/svgwrite-example.svg +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file