From 851fe9872ca87c27e3b26f6b428aef930ba53861 Mon Sep 17 00:00:00 2001 From: Stream Date: Thu, 14 May 2026 00:10:07 +0300 Subject: [PATCH] auto-sync: 2026-05-14 00:10:01 --- .../enduro-trails/scripts/patch_resampling.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tasks/enduro-trails/scripts/patch_resampling.py diff --git a/tasks/enduro-trails/scripts/patch_resampling.py b/tasks/enduro-trails/scripts/patch_resampling.py new file mode 100644 index 0000000..4a4409c --- /dev/null +++ b/tasks/enduro-trails/scripts/patch_resampling.py @@ -0,0 +1,33 @@ +import sys + +path = "/home/slin/enduro-trails/prototype/static/app.js" +with open(path, 'r') as f: + content = f.read() + +old = """ map.addLayer({ + id: id, + type: 'raster', + source: sourceId, + paint: { + 'raster-opacity': opacity + },""" + +new = """ map.addLayer({ + id: id, + type: 'raster', + source: sourceId, + paint: { + 'raster-opacity': opacity, + 'raster-resampling': 'linear' + },""" + +if old not in content: + print("ERROR: marker not found") + sys.exit(1) + +content = content.replace(old, new) + +with open(path, 'w') as f: + f.write(content) + +print("OK - raster-resampling: linear added")