Skip to content

Commit 6a8991d

Browse files
committed
Starting to work on moving.
- Adding arrows and loading new pano on click works - Starting analysis for heading
1 parent 2a716bb commit 6a8991d

File tree

7 files changed

+9118
-72
lines changed

7 files changed

+9118
-72
lines changed

analyzeheading.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import json, numpy
2+
from matplotlib import pyplot as plt
3+
4+
with open("eastwestAutobahn.json", "r") as f:
5+
# import as json
6+
json_obj = json.load(f)
7+
8+
panos = json_obj["pano"]
9+
10+
unknown_8s = []
11+
unknown_9s = []
12+
unknown_10s = []
13+
unknown_11s = []
14+
15+
for p in panos:
16+
unknown_8s.append(p["unknown4"]["unknown8"])
17+
unknown_9s.append(p["unknown4"]["unknown9"])
18+
unknown_10s.append(p["unknown4"]["unknown10"])
19+
unknown_11s.append(p["unknown4"]["unknown11"])
20+
21+
22+
plt.figure()
23+
#plt.hlines(1,1,20) # Draw a horizontal line
24+
plt.eventplot(unknown_8s, orientation='horizontal', colors='b')
25+
#plt.axis('off')
26+
plt.show()
27+

app.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,28 @@ def closest_pano_to_coord(lat, lon):
9191
if distance < smallest_distance:
9292
smallest_distance = distance
9393
closest = pano
94+
print(x,y)
9495
return jsonify(closest)
9596

97+
98+
99+
@app.route("/tile/<float(signed=True):lat>/<float(signed=True):lon>/")
100+
def tile_of_coord(lat, lon):
101+
x, y = wgs84_to_tile_coord(lat, lon, 17)
102+
103+
return jsonify(x=x,y=y)
104+
105+
106+
@app.route("/fullTileInfo/<int:x>/<int:y>/")
107+
def full_tile_coverage_incl_neighbors(x, y):
108+
panos = get_coverage_tile(x, y)
109+
#print(panos)
110+
if len(panos) == 0:
111+
return jsonify(None)
112+
113+
return jsonify(panos)
114+
115+
96116
@app.route("/pano/<int:panoid>/<int:region_id>/<int:zoom>/")
97117
def relay_full_pano(panoid, region_id, zoom):
98118
heic_array = []

0 commit comments

Comments
 (0)