Switch satellite imagery PNG->JPG for better compression

This commit is contained in:
Chandler Swift 2025-01-02 23:23:45 -06:00
parent 068a0e908b
commit cad51e93db
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F

View file

@ -24,8 +24,8 @@ def download_all():
def download_image(z, x, y, total, current): def download_image(z, x, y, total, current):
progress = f"[{current:0{len(str(total))}d}/{total}]" 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" 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}.png")) 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) os.makedirs(os.path.dirname(file), exist_ok=True)
if os.path.isfile(file): if os.path.isfile(file):
try: # does it already exist and look good? try: # does it already exist and look good?