From cad51e93db7e6100c7c660444ecd3d9085a3d82c Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 2 Jan 2025 23:23:45 -0600 Subject: [PATCH 1/6] Switch satellite imagery PNG->JPG for better compression --- scripts/download_satellite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/download_satellite.py b/scripts/download_satellite.py index 518dea6..0c12903 100755 --- a/scripts/download_satellite.py +++ b/scripts/download_satellite.py @@ -24,8 +24,8 @@ def download_all(): def download_image(z, x, y, total, current): progress = f"[{current:0{len(str(total))}d}/{total}]" - url = f"https://svc.pictometry.com/Image/D2B06344-7A2D-5BD0-FC89-DFDDC9888C41/wmts/PICT-MNITAS23-EDVs7UTOVt/default/GoogleMapsCompatible/{z}/{x}/{y}.png" - file = os.path.normpath(os.path.join(os.path.dirname(__file__), f"../satellite/{z}/{x}/{y}.png")) + url = f"https://svc.pictometry.com/Image/D2B06344-7A2D-5BD0-FC89-DFDDC9888C41/wmts/PICT-MNITAS23-EDVs7UTOVt/default/GoogleMapsCompatible/{z}/{x}/{y}.jpg" + file = os.path.normpath(os.path.join(os.path.dirname(__file__), f"../satellite/{z}/{x}/{y}.jpg")) os.makedirs(os.path.dirname(file), exist_ok=True) if os.path.isfile(file): try: # does it already exist and look good? From 88d3c548ba71c08cf476d5ddc172814fc67f6137 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 2 Jan 2025 23:24:29 -0600 Subject: [PATCH 2/6] Set track color to maroon --- map.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/map.html b/map.html index f1a213e..47b0aa5 100644 --- a/map.html +++ b/map.html @@ -96,7 +96,11 @@ const plats = await plats_req.json(); const data = await data_req.json(); - L.geoJSON(track).addTo(map); + L.geoJSON(track, { + style: { + color: "maroon", + }, + }).addTo(map); L.geoJSON(plats, { filter: feature => !feature.properties.TAO_NAME.toLowerCase().includes("lawrence deer club"), From ec3c151a52d74131e8843362c507143e0d24ede3 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 2 Jan 2025 23:24:51 -0600 Subject: [PATCH 3/6] Place track on top of plats --- map.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/map.html b/map.html index 47b0aa5..efedb45 100644 --- a/map.html +++ b/map.html @@ -96,12 +96,6 @@ const plats = await plats_req.json(); const data = await data_req.json(); - L.geoJSON(track, { - style: { - color: "maroon", - }, - }).addTo(map); - L.geoJSON(plats, { filter: feature => !feature.properties.TAO_NAME.toLowerCase().includes("lawrence deer club"), onEachFeature: function(feature, layer) { @@ -121,6 +115,12 @@ }, }).addTo(map); + L.geoJSON(track, { + style: { + color: "maroon", + }, + }).addTo(map); + for (let stand of data.stands) { if (stand.location) { const marker = L.marker(stand.location).addTo(map); From 5aec4b7e2bdc2aec34972c09c26d90494fff8667 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 2 Jan 2025 23:23:45 -0600 Subject: [PATCH 4/6] Switch satellite imagery PNG->JPG for better compression --- map.html | 2 +- scripts/download_satellite.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/map.html b/map.html index f1a213e..fdf6781 100644 --- a/map.html +++ b/map.html @@ -75,7 +75,7 @@ // maxZoom: 19, // attribution: '© OpenStreetMap' // }).addTo(map); - L.tileLayer('./satellite/{z}/{x}/{y}.png', { + L.tileLayer('./satellite/{z}/{x}/{y}.jpg', { minNativeZoom: 12, maxNativeZoom: 20, bounds: [ diff --git a/scripts/download_satellite.py b/scripts/download_satellite.py index 518dea6..0c12903 100755 --- a/scripts/download_satellite.py +++ b/scripts/download_satellite.py @@ -24,8 +24,8 @@ def download_all(): def download_image(z, x, y, total, current): progress = f"[{current:0{len(str(total))}d}/{total}]" - url = f"https://svc.pictometry.com/Image/D2B06344-7A2D-5BD0-FC89-DFDDC9888C41/wmts/PICT-MNITAS23-EDVs7UTOVt/default/GoogleMapsCompatible/{z}/{x}/{y}.png" - file = os.path.normpath(os.path.join(os.path.dirname(__file__), f"../satellite/{z}/{x}/{y}.png")) + url = f"https://svc.pictometry.com/Image/D2B06344-7A2D-5BD0-FC89-DFDDC9888C41/wmts/PICT-MNITAS23-EDVs7UTOVt/default/GoogleMapsCompatible/{z}/{x}/{y}.jpg" + file = os.path.normpath(os.path.join(os.path.dirname(__file__), f"../satellite/{z}/{x}/{y}.jpg")) os.makedirs(os.path.dirname(file), exist_ok=True) if os.path.isfile(file): try: # does it already exist and look good? From adba133d75c02662f370f8f687a5749fed6a6e30 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 2 Jan 2025 23:24:29 -0600 Subject: [PATCH 5/6] Set track color to maroon --- map.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/map.html b/map.html index fdf6781..1059595 100644 --- a/map.html +++ b/map.html @@ -96,7 +96,11 @@ const plats = await plats_req.json(); const data = await data_req.json(); - L.geoJSON(track).addTo(map); + L.geoJSON(track, { + style: { + color: "maroon", + }, + }).addTo(map); L.geoJSON(plats, { filter: feature => !feature.properties.TAO_NAME.toLowerCase().includes("lawrence deer club"), From beb4592233d1f7cbaab60e3befceae676146f2c3 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 2 Jan 2025 23:24:51 -0600 Subject: [PATCH 6/6] Place track on top of plats --- map.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/map.html b/map.html index 1059595..b47a315 100644 --- a/map.html +++ b/map.html @@ -96,12 +96,6 @@ const plats = await plats_req.json(); const data = await data_req.json(); - L.geoJSON(track, { - style: { - color: "maroon", - }, - }).addTo(map); - L.geoJSON(plats, { filter: feature => !feature.properties.TAO_NAME.toLowerCase().includes("lawrence deer club"), onEachFeature: function(feature, layer) { @@ -121,6 +115,12 @@ }, }).addTo(map); + L.geoJSON(track, { + style: { + color: "maroon", + }, + }).addTo(map); + for (let stand of data.stands) { if (stand.location) { const marker = L.marker(stand.location).addTo(map);