multithreaded image loading implemented
parent
4bf0a6b230
commit
54955efbd2
|
@ -1 +0,0 @@
|
||||||
dataset/*
|
|
|
@ -1,39 +0,0 @@
|
||||||
LAT_START = 45.9887
|
|
||||||
LAT_END = 46.1339
|
|
||||||
LNG_START = 14.4431
|
|
||||||
LNG_END = 14.5910
|
|
||||||
|
|
||||||
TILTS = [i for i in range(10, 60, 20)]
|
|
||||||
HEADINGS = [i for i in range(0, 360, 90)]
|
|
||||||
|
|
||||||
import numpy as np
|
|
||||||
|
|
||||||
## 3
|
|
||||||
## 4
|
|
||||||
#driver.save_screenshot('screenshot.png')
|
|
||||||
## 5
|
|
||||||
#driver.quit()
|
|
||||||
|
|
||||||
def generate_coordinates():
|
|
||||||
urls = []
|
|
||||||
latitudes = np.arange(LAT_START, LAT_END, 0.001)
|
|
||||||
longitudes = np.arange(LNG_START, LNG_END, 0.001)
|
|
||||||
for latitude in latitudes:
|
|
||||||
for longitude in longitudes:
|
|
||||||
for tilt in TILTS:
|
|
||||||
params=f'?lng={longitude}&lat={latitude}&tilt={tilt}&heading=0'
|
|
||||||
url = f'http://localhost:8000/index.html{params}'
|
|
||||||
urls.append(url)
|
|
||||||
|
|
||||||
return urls
|
|
||||||
|
|
||||||
|
|
||||||
urls = generate_coordinates()
|
|
||||||
|
|
||||||
# Write url line by line to text file
|
|
||||||
|
|
||||||
with open("urls.txt", "w") as output:
|
|
||||||
for url in urls:
|
|
||||||
output.write(url + "\n")
|
|
||||||
|
|
||||||
output.close()
|
|
|
@ -1,54 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<script
|
|
||||||
src="#"
|
|
||||||
defer></script>
|
|
||||||
<script src="https://printjs-4de6.kxcdn.com/print.min.js"></script>
|
|
||||||
<script src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="map" style="width: 2000px; height: 1000px;"></div>
|
|
||||||
</body>
|
|
||||||
<script>
|
|
||||||
//let lat_start = 45.9887;
|
|
||||||
//let lng_start = 14.4431;
|
|
||||||
//let lat_end = 46.1339;
|
|
||||||
//let lng_end = 14.5910;
|
|
||||||
//tilts = [0, 45]; // Tilt goes from 0 to 90
|
|
||||||
// headings go from 0 to 360
|
|
||||||
//headings = [0, 90, 180, 270];
|
|
||||||
// Dej to nrdi pol s pitonko
|
|
||||||
const queryString = window.location.search;
|
|
||||||
console.log(queryString);
|
|
||||||
const urlParams = new URLSearchParams(queryString);
|
|
||||||
const lt = parseFloat(urlParams.get('lat'));
|
|
||||||
const lg = parseFloat(urlParams.get('lng'));
|
|
||||||
const tilt = parseInt(urlParams.get('tilt'));
|
|
||||||
const heading = parseInt(urlParams.get('heading'));
|
|
||||||
console.log(lt, lg, tilt, heading);
|
|
||||||
window.onload = async () => {
|
|
||||||
map = new google.maps.Map(document.getElementById("map"), {
|
|
||||||
center: {
|
|
||||||
lat: lt,
|
|
||||||
lng: lg,
|
|
||||||
},
|
|
||||||
zoom: 19,
|
|
||||||
mapTypeId: "satellite",
|
|
||||||
// hide the default map controls
|
|
||||||
disableDefaultUI: true,
|
|
||||||
// disable watermark hehe
|
|
||||||
clickableIcons: false,
|
|
||||||
|
|
||||||
});
|
|
||||||
map.setTilt(tilt); // 0, 45
|
|
||||||
map.setHeading(heading); // 0, 90, 180, 270
|
|
||||||
await new Promise(r => setTimeout(r, 1000));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</html>
|
|
64824
data_scrape/urls.txt
64824
data_scrape/urls.txt
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue